aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_agent.c
diff options
context:
space:
mode:
authorqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2010-06-14 19:41:43 +0000
committerqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2010-06-14 19:41:43 +0000
commitdd75894d832bb2c5cf2fc31d17cf3c4a74c62f93 (patch)
tree17115cc8f577cab770ce2a5ab0da3ee7e37570dc /channels/chan_agent.c
parent36320e1203b97d4b5b02652eab9fe957e3ac696f (diff)
Add option to get untruncated channel name from AGENT function.
The "channel" option would chop the channel name at the last '-', which made it useless for something like a channel transfer from the dialplan. The "fullchannel" option will return the channel name as-is. ABE-2218 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@270260 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_agent.c')
-rw-r--r--channels/chan_agent.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/channels/chan_agent.c b/channels/chan_agent.c
index d054bbe9e..02c175388 100644
--- a/channels/chan_agent.c
+++ b/channels/chan_agent.c
@@ -159,6 +159,9 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
<enum name="channel">
<para>The name of the active channel for the Agent (AgentLogin)</para>
</enum>
+ <enum name="fullchannel">
+ <para>The untruncated name of the active channel for the Agent (AgentLogin)</para>
+ </enum>
</enumlist>
</parameter>
</syntax>
@@ -2291,6 +2294,10 @@ static int function_agent(struct ast_channel *chan, const char *cmd, char *data,
if (tmp)
*tmp = '\0';
}
+ } else if (!strcasecmp(args.item, "fullchannel")) {
+ if (agent->chan) {
+ ast_copy_string(buf, agent->chan->name, len);
+ }
} else if (!strcasecmp(args.item, "exten")) {
buf[0] = '\0';
}