summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorJenkins2 <jenkins2@gerrit.asterisk.org>2017-09-21 11:11:15 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2017-09-21 11:11:15 -0500
commitb9da3d643c5025413496b78634badc307e936686 (patch)
treebd9c1e036bba15564588ae15f21e66e3b68637ba /channels
parent7ff464bc0a53e16c24cd641f85ec233cea503785 (diff)
parenta5f1d58fe1a5fe14061afc879872ed033e089880 (diff)
Merge "chan_sip: Expose read-only access to the full SIP INVITE Request-URI"
Diffstat (limited to 'channels')
-rw-r--r--channels/sip/dialplan_functions.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/channels/sip/dialplan_functions.c b/channels/sip/dialplan_functions.c
index 59e841df4..36d4ea9e4 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>
@@ -162,6 +165,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")) {