diff options
author | Joshua Colp <jcolp@digium.com> | 2017-09-21 11:10:51 -0500 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2017-09-21 11:10:51 -0500 |
commit | 8ee7ed020f184b0d93c3fc5c6088d721979990ea (patch) | |
tree | 9fb0dd4dc7f540ac1386d969bd4b0bf5bf79de98 | |
parent | e5f911519d544d9822da1017c882402fa1c759e0 (diff) | |
parent | 060cea2cca4f4c8c3497c1d6e6da41aafa39a03d (diff) |
Merge "chan_sip: Expose read-only access to the full SIP INVITE Request-URI" into 14
-rw-r--r-- | channels/sip/dialplan_functions.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/channels/sip/dialplan_functions.c b/channels/sip/dialplan_functions.c index e74e57ecf..b9004c8d6 100644 --- a/channels/sip/dialplan_functions.c +++ b/channels/sip/dialplan_functions.c @@ -41,6 +41,9 @@ <enum name="uri"> <para>R/O Get the URI from the Contact: header.</para> </enum> + <enum name="ruri"> + <para>R/O Get the Request-URI from the INVITE header.</para> + </enum> <enum name="useragent"> <para>R/O Get the useragent.</para> </enum> @@ -164,6 +167,9 @@ int sip_acf_channel_read(struct ast_channel *chan, const char *funcname, char *p ast_copy_string(buf, p->from, buflen); } else if (!strcasecmp(args.param, "uri")) { ast_copy_string(buf, p->uri, buflen); + } else if (!strcasecmp(args.param, "ruri")) { + char *tmpruri = REQ_OFFSET_TO_STR(&p->initreq, rlpart2); + ast_copy_string(buf, tmpruri, buflen); } else if (!strcasecmp(args.param, "useragent")) { ast_copy_string(buf, p->useragent, buflen); } else if (!strcasecmp(args.param, "peername")) { |