diff options
author | Benny Prijono <bennylp@teluu.com> | 2006-09-25 13:40:12 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2006-09-25 13:40:12 +0000 |
commit | cf3c435e0093cf2f1fb8add2298ee468f8c6afc5 (patch) | |
tree | 93bbdb60b762ce015dc8f55147eed38bb034d1ca /pjsip/src/pjsua-lib | |
parent | e3f862fca94af0cb4812796055b18d2ba107b613 (diff) |
Tests with other user agents revealed some bugs which
have been fixed below:
- some UAs sends "telephone-event/8000/1" instead of
"telephone-event/8000", which caused SDP negotiation
to fail. Fixed in sdp_neg.c.
- codec name was (incorrectly) compared case-sensitively,
causing negotiation to fail. Fixed in sdp_neg.c.
- Also improved error reporting in SDP negotiation by
introducing few more error codes.
- Added Warning header in Not Acceptable response sent
by pjsip_inv_session when SDP negotiation fails.
- PJSUA-LIB will try to negotiate both SDPs before
sending 100 response.
- Fixed bug in iLBC codec when setting the mode to 30.
Also:
- Echo cancellation by default is disabled now since
it doesn't seem to work. Further investigation needed.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@738 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/src/pjsua-lib')
-rw-r--r-- | pjsip/src/pjsua-lib/pjsua_call.c | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_call.c b/pjsip/src/pjsua-lib/pjsua_call.c index bb2ccd18..d3b88a7b 100644 --- a/pjsip/src/pjsua-lib/pjsua_call.c +++ b/pjsip/src/pjsua-lib/pjsua_call.c @@ -394,38 +394,6 @@ pj_bool_t pjsua_call_on_incoming(pjsip_rx_data *rdata) PJSUA_LOCK(); - /* Verify that we can handle the request. */ - status = pjsip_inv_verify_request(rdata, &options, NULL, NULL, - pjsua_var.endpt, &response); - if (status != PJ_SUCCESS) { - - /* - * No we can't handle the incoming INVITE request. - */ - - if (response) { - pjsip_response_addr res_addr; - - pjsip_get_response_addr(response->pool, rdata, &res_addr); - pjsip_endpt_send_response(pjsua_var.endpt, &res_addr, response, - NULL, NULL); - - } else { - - /* Respond with 500 (Internal Server Error) */ - pjsip_endpt_respond_stateless(pjsua_var.endpt, rdata, 500, NULL, - NULL, NULL); - } - - PJSUA_UNLOCK(); - return PJ_TRUE; - } - - - /* - * Yes we can handle the incoming INVITE request. - */ - /* Find free call slot. */ for (call_id=0; call_id<(int)pjsua_var.ua_cfg.max_calls; ++call_id) { if (pjsua_var.calls[call_id].inv == NULL) @@ -461,6 +429,35 @@ pj_bool_t pjsua_call_on_incoming(pjsip_rx_data *rdata) return PJ_TRUE; } + + /* Verify that we can handle the request. */ + status = pjsip_inv_verify_request(rdata, &options, answer, NULL, + pjsua_var.endpt, &response); + if (status != PJ_SUCCESS) { + + /* + * No we can't handle the incoming INVITE request. + */ + + if (response) { + pjsip_response_addr res_addr; + + pjsip_get_response_addr(response->pool, rdata, &res_addr); + pjsip_endpt_send_response(pjsua_var.endpt, &res_addr, response, + NULL, NULL); + + } else { + + /* Respond with 500 (Internal Server Error) */ + pjsip_endpt_respond_stateless(pjsua_var.endpt, rdata, 500, NULL, + NULL, NULL); + } + + PJSUA_UNLOCK(); + return PJ_TRUE; + } + + /* * Get which account is most likely to be associated with this incoming * call. We need the account to find which contact URI to put for @@ -1837,6 +1834,9 @@ static void pjsua_call_on_media_update(pjsip_inv_session *inv, pjsua_perror(THIS_FILE, "SDP negotiation has failed", status); + /* Stop/destroy media, if any */ + call_destroy_media(call->index); + /* Disconnect call if we're not in the middle of initializing an * UAS dialog and if this is not a re-INVITE */ |