diff options
author | Benny Prijono <bennylp@teluu.com> | 2006-02-22 15:42:31 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2006-02-22 15:42:31 +0000 |
commit | 37a3c53aee2fa10f0d9317322fc4eccd18283aab (patch) | |
tree | 48242dfc50a2f5215b2c1240e4b266af4a941fc4 /pjsip | |
parent | 46d2a28800d1feec83ea52f543efb28bc653c2b3 (diff) |
Added incoming call notification
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@216 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip')
-rw-r--r-- | pjsip/src/pjsua/pjsua_inv.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/pjsip/src/pjsua/pjsua_inv.c b/pjsip/src/pjsua/pjsua_inv.c index 824943cd..5789cbc7 100644 --- a/pjsip/src/pjsua/pjsua_inv.c +++ b/pjsip/src/pjsua/pjsua_inv.c @@ -283,6 +283,8 @@ pj_bool_t pjsua_inv_on_incoming(pjsip_rx_data *rdata) status = pjsip_dlg_create_response(dlg, rdata, 100, NULL, &response); if (status != PJ_SUCCESS) { + pjsua_perror(THIS_FILE, "Unable to create 100 response", status); + pjsip_dlg_respond(dlg, rdata, 500, NULL); /* Free call socket. */ @@ -293,8 +295,19 @@ pj_bool_t pjsua_inv_on_incoming(pjsip_rx_data *rdata) } else { status = pjsip_dlg_send_response(dlg, pjsip_rdata_get_tsx(rdata), response); - } - + if (status != PJ_SUCCESS) + pjsua_perror(THIS_FILE, "Unable to send 100 response", status); + } + + PJ_LOG(3,(THIS_FILE, + "\nIncoming call!!\n" + "From: %.*s\n" + "To: %.*s\n" + "(press 'a' to answer, 'h' to decline)", + (int)dlg->remote.info_str.slen, + dlg->remote.info_str.ptr, + (int)dlg->local.info_str.slen, + dlg->local.info_str.ptr)); /* This INVITE request has been handled. */ return PJ_TRUE; } |