diff options
author | Benny Prijono <bennylp@teluu.com> | 2010-06-21 13:28:55 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2010-06-21 13:28:55 +0000 |
commit | 9a61cdc66183f1c4ed0c4a4e27ebc1b6a67ac183 (patch) | |
tree | 939edcabf9094e583729718acfe0087bf238c8c3 /pjsip/src/pjsua-lib | |
parent | 6fa4d964245209d05d9c1cce6e8f12ab993a03a1 (diff) |
Fixes #1047 (Don't send UPDATE if remote doesn't support it (thanks Bogdan Krakowski for the report)) and fixes #1097 (Support sending UPDATE without SDP). Details:
- Session timer fixes:
- will look at remote capability in Allow header
- if UPDATE is supported, will send UPDATE without SDP first.
If this fails, will send UPDATE with SDP
- otherwise will send re-INVITE
- PJSUA-LIB will look at dialog's remote capability to determine
whether re-INVITE or UPDATE should be sent to change default
addresses after ICE negotiation.
- pjsip_inv_update() now allows NULL offer, in which case the
UPDATE will be sent without SDP.
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3215 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/src/pjsua-lib')
-rw-r--r-- | pjsip/src/pjsua-lib/pjsua_media.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/pjsip/src/pjsua-lib/pjsua_media.c b/pjsip/src/pjsua-lib/pjsua_media.c index 84012080..fd8163a0 100644 --- a/pjsip/src/pjsua-lib/pjsua_media.c +++ b/pjsip/src/pjsua-lib/pjsua_media.c @@ -855,10 +855,25 @@ static void on_ice_complete(pjmedia_transport *tp, pj_sockaddr_cmp(&tpinfo.sock_info.rtp_addr_name, &pjsua_var.calls[id].med_rtp_addr)) { + pj_bool_t use_update; + const pj_str_t STR_UPDATE = { "UPDATE", 6 }; + pjsip_dialog_cap_status support_update; + pjsip_dialog *dlg; + + dlg = pjsua_var.calls[id].inv->dlg; + support_update = pjsip_dlg_remote_has_cap(dlg, PJSIP_H_ALLOW, + NULL, &STR_UPDATE); + use_update = (support_update == PJSIP_DIALOG_CAP_SUPPORTED); + PJ_LOG(4,(THIS_FILE, "ICE default transport address has changed for " - "call %d, sending UPDATE", id)); - pjsua_call_update(id, 0, NULL); + "call %d, sending %s", id, + (use_update ? "UPDATE" : "re-INVITE"))); + + if (use_update) + pjsua_call_update(id, 0, NULL); + else + pjsua_call_reinvite(id, 0, NULL); } } break; |