[Asterisk-code-review] app_queue.c: added DIALEDPEERNUMBER on outgoing channel (asterisk[master])

Friendly Automation asteriskteam at digium.com
Wed Dec 15 10:16:57 CST 2021


Friendly Automation has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/17687 )

Change subject: app_queue.c: added DIALEDPEERNUMBER on outgoing channel
......................................................................

app_queue.c: added DIALEDPEERNUMBER on outgoing channel

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
---
M apps/app_queue.c
A doc/CHANGES-staging/app_queue_DIALEDPEERNUMBER.txt
2 files changed, 12 insertions(+), 0 deletions(-)

Approvals:
  Joshua Colp: Looks good to me, but someone else must approve
  Kevin Harwell: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved
  Friendly Automation: Approved for Submit



diff --git a/apps/app_queue.c b/apps/app_queue.c
index acd0ace..d03d9f0 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -295,6 +295,9 @@
 					<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>
@@ -4644,6 +4647,9 @@
 	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
index 0000000..ef15e9e
--- /dev/null
+++ b/doc/CHANGES-staging/app_queue_DIALEDPEERNUMBER.txt
@@ -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

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/17687
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: Icbc589ea2066f0c401a892bf478f6b2fd44e62f6
Gerrit-Change-Number: 17687
Gerrit-PatchSet: 2
Gerrit-Owner: Mark Petersen <bugs.digium.com at zombie.dk>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20211215/818ec682/attachment.html>


More information about the asterisk-code-review mailing list