0010-outgoing_connected_line_method_update.patch 902 B

123456789101112131415161718192021222324252627282930313233
  1. diff --git a/pjsip/src/pjsip-ua/sip_inv.c b/pjsip/src/pjsip-ua/sip_inv.c
  2. --- a/pjsip/src/pjsip-ua/sip_inv.c
  3. +++ b/pjsip/src/pjsip-ua/sip_inv.c
  4. @@ -4185,6 +4185,29 @@
  5. if (tsx->status_code != 100) {
  6. + if (inv->role == PJSIP_ROLE_UAC) {
  7. + pjsip_rx_data *rdata = e->body.tsx_state.src.rdata;
  8. + pjsip_allow_hdr *allow = NULL;
  9. + pjsip_msg *msg = rdata->msg_info.msg;
  10. +
  11. + if (msg) {
  12. + allow = (pjsip_allow_hdr*) pjsip_msg_find_hdr(msg, PJSIP_H_ALLOW,
  13. + NULL);
  14. + }
  15. + if (allow) {
  16. + unsigned i;
  17. + const pj_str_t STR_UPDATE = { "UPDATE", 6 };
  18. +
  19. + for (i=0; i<allow->count; ++i) {
  20. + if (pj_stricmp(&allow->values[i], &STR_UPDATE)==0) {
  21. + /* UPDATE is present in Allow */
  22. + inv->options |= PJSIP_INV_SUPPORT_UPDATE;
  23. + break;
  24. + }
  25. + }
  26. + }
  27. + }
  28. +
  29. if (dlg->remote.info->tag.slen)
  30. inv_set_state(inv, PJSIP_INV_STATE_EARLY, e);