]> git.ipfire.org Git - thirdparty/asterisk.git/commit
chan_pjsip/res_pjsip: Add CHANNEL(pjsip,request_uri)
authorRichard Mudgett <rmudgett@digium.com>
Thu, 7 Dec 2017 23:51:08 +0000 (17:51 -0600)
committerRichard Mudgett <rmudgett@digium.com>
Tue, 12 Dec 2017 19:47:05 +0000 (13:47 -0600)
commitf493631fc63673f803fa33de9281918faa319160
tree6460ee461ed4352280b3185cd8e3bbc0ecb929fd
parent8640e5d81932308b3f150ee47b3a0b537ce9f55e
chan_pjsip/res_pjsip: Add CHANNEL(pjsip,request_uri)

This patch does three things associated with the initial incoming INVITE
request URI.

1) Add access to the full initial incoming INVITE request URI.

2) We were not setting DNID on incoming PJSIP channels.  The DNID is the
user portion of the initial incoming INVITE Request-URI.  The value is
accessed by reading CALLERID(dnid).

3) Fix CHANNEL(pjsip,target_uri) documentation.

* The initial incoming INVITE request URI is now available using
CHANNEL(pjsip,request_uri).

* Set the DNID on PJSIP channel creation so CALLERID(dnid) can return the
initial incoming INVITE request URI user portion.

* CHANNEL(pjsip,target_uri) now correctly documents that the target URI is
the contact URI.

* Refactored print_escaped_uri() out of channel_read_pjsip() to handle
pjsip_uri_print() error condition when the buffer is too small.

ASTERISK-27478

Change-Id: I512e60d1f162395c946451becb37af3333337b33
channels/chan_pjsip.c
channels/pjsip/dialplan_functions.c
include/asterisk/res_pjsip_session.h
res/res_pjsip_session.c