[asterisk-commits] qwell: trunk r270260 - /trunk/channels/chan_agent.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Jun 14 14:41:46 CDT 2010
Author: qwell
Date: Mon Jun 14 14:41:43 2010
New Revision: 270260
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=270260
Log:
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
Modified:
trunk/channels/chan_agent.c
Modified: trunk/channels/chan_agent.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_agent.c?view=diff&rev=270260&r1=270259&r2=270260
==============================================================================
--- trunk/channels/chan_agent.c (original)
+++ trunk/channels/chan_agent.c Mon Jun 14 14:41:43 2010
@@ -159,6 +159,9 @@
<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 @@
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';
}
More information about the asterisk-commits
mailing list