]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
app_queue.c: added DIALEDPEERNUMBER on outgoing channel
authorMark Petersen <bugs.digium.com@zombie.dk>
Wed, 8 Dec 2021 11:24:04 +0000 (12:24 +0100)
committerFriendly Automation <jenkins2@gerrit.asterisk.org>
Wed, 15 Dec 2021 16:17:46 +0000 (10:17 -0600)
added that we set DIALEDPEERNUMBER on the outgoing channels
so it is avalible in b(content^extension^line)
this add the same behaviour as Dial

ASTERISK-29795

Change-Id: Icbc589ea2066f0c401a892bf478f6b2fd44e62f6

apps/app_queue.c
doc/CHANGES-staging/app_queue_DIALEDPEERNUMBER.txt [new file with mode: 0644]

index ca8fc6f29fa7a905aff3b73ffbe20a13f6b8c651..dcd5aa837379d0edabac623eba5d46dc40ab51fd 100644 (file)
                                        <para>If the call was not answered by an agent this variable will be TRUE.</para>
                                        <value name="TRUE" />
                                </variable>
+                               <variable name="DIALEDPEERNUMBER">
+                                       <para>Resource of the agent that was dialed set on the outbound channel.</para>
+                               </variable>
                        </variablelist>
                </description>
                <see-also>
@@ -4647,6 +4650,9 @@ static int ring_entry(struct queue_ent *qe, struct callattempt *tmp, int *busies
        ast_channel_unlock(tmp->chan);
        ast_channel_unlock(qe->chan);
 
+       /* location is tmp->interface where tech/ has been stripped, so it follow the same syntax as DIALEDPEERNUMBER in app_dial.c */
+       pbx_builtin_setvar_helper(tmp->chan, "DIALEDPEERNUMBER", strlen(location) ? location : tmp->interface);
+
        /* PREDIAL: Run gosub on the callee's channel */
        if (qe->predial_callee) {
                ast_pre_call(tmp->chan, qe->predial_callee);
diff --git a/doc/CHANGES-staging/app_queue_DIALEDPEERNUMBER.txt b/doc/CHANGES-staging/app_queue_DIALEDPEERNUMBER.txt
new file mode 100644 (file)
index 0000000..ef15e9e
--- /dev/null
@@ -0,0 +1,6 @@
+Subject: app_queue
+Subject: Applications
+
+added that we set DIALEDPEERNUMBER on the outgoing channels
+so it is avalible in b(content^extension^line)
+this add the same behaviour as Dial