From: Pirmin Walthert Date: Wed, 28 Nov 2018 07:14:12 +0000 (+0100) Subject: pjproject_bundled: check whether UPDATE is supported on outgoing calls X-Git-Tag: 16.2.0-rc1~46^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5de36abd5af0b94a9fab1b8b51c5d1d90a95697a;p=thirdparty%2Fasterisk.git 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 --- 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 0000000000..218c544787 --- /dev/null +++ b/third-party/pjproject/patches/0010-outgoing_connected_line_method_update.patch @@ -0,0 +1,33 @@ +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,29 @@ + + 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; icount; ++i) { ++ if (pj_stricmp(&allow->values[i], &STR_UPDATE)==0) { ++ /* UPDATE is present in Allow */ ++ inv->options |= PJSIP_INV_SUPPORT_UPDATE; ++ break; ++ } ++ } ++ } ++ } ++ + if (dlg->remote.info->tag.slen) + inv_set_state(inv, PJSIP_INV_STATE_EARLY, e); +