[Asterisk-code-review] pjproject bundled: check whether UPDATE is supported on outg... (asterisk[13])

Pirmin Walthert asteriskteam at digium.com
Wed Nov 28 01:28:40 CST 2018


Pirmin Walthert has uploaded this change for review. ( https://gerrit.asterisk.org/10717


Change subject: pjproject_bundled: check whether UPDATE is supported on outgoing calls
......................................................................

pjproject_bundled: check whether UPDATE is supported on outgoing calls

In ASTERISK-27095 an issue had been fixed because of which chan_pjsip was not
trying to send UPDATE messages when connected_line_method was set to invite.
However this only solved the issue for incoming INVITES. For outgoing INVITES
(important when transferring calls) the options variable needs to be updated
at a different place.

ASTERISK-28182 #close
Reported-by: nappsoft

Change-Id: I76cc06da4ca76ddd6dce814a8b97cc66b98aaf29
---
A third-party/pjproject/patches/0010-outgoing_connected_line_method_update.patch
1 file changed, 34 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/17/10717/1

diff --git a/third-party/pjproject/patches/0010-outgoing_connected_line_method_update.patch b/third-party/pjproject/patches/0010-outgoing_connected_line_method_update.patch
new file mode 100644
index 0000000..5959277
--- /dev/null
+++ b/third-party/pjproject/patches/0010-outgoing_connected_line_method_update.patch
@@ -0,0 +1,34 @@
+diff --git a/pjsip/src/pjsip-ua/sip_inv.c b/pjsip/src/pjsip-ua/sip_inv.c
+--- a/pjsip/src/pjsip-ua/sip_inv.c
++++ b/pjsip/src/pjsip-ua/sip_inv.c
+@@ -4185,6 +4185,30 @@
+ 
+ 	    if (tsx->status_code != 100) {
+ 
++		if (inv->role == PJSIP_ROLE_UAC) {
++		    pjsip_rx_data *rdata = e->body.tsx_state.src.rdata;
++		    pjsip_allow_hdr *allow = NULL;
++		    pjsip_msg *msg = rdata->msg_info.msg;
++		    
++		    if (msg) {
++			allow = (pjsip_allow_hdr*) pjsip_msg_find_hdr(msg, PJSIP_H_ALLOW,
++				NULL);
++		    }
++		    if (allow) {
++			unsigned i;
++			const pj_str_t STR_UPDATE = { "UPDATE", 6 };
++
++			for (i=0; i<allow->count; ++i) {
++			    if (pj_stricmp(&allow->values[i], &STR_UPDATE)==0)
++				break;
++			}
++			if (i != allow->count) {
++			    /* UPDATE is present in Allow */
++			    inv->options |= PJSIP_INV_SUPPORT_UPDATE;
++			}
++		    }
++		}
++
+ 		if (dlg->remote.info->tag.slen)
+ 		    inv_set_state(inv, PJSIP_INV_STATE_EARLY, e);
+ 

-- 
To view, visit https://gerrit.asterisk.org/10717
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: newchange
Gerrit-Change-Id: I76cc06da4ca76ddd6dce814a8b97cc66b98aaf29
Gerrit-Change-Number: 10717
Gerrit-PatchSet: 1
Gerrit-Owner: Pirmin Walthert <infos at nappsoft.ch>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20181128/95b5f040/attachment-0001.html>


More information about the asterisk-code-review mailing list