[asterisk-users] Dial option G - Passing parameters?

Michael Collins mcollins at fcnetwork.com
Thu Feb 1 13:37:31 MST 2007


Has anyone used the G option with the Dial app?  I'm looking for a way
to control the called party leg.  Specifically, I'd like to pass a few
variables to the called side for some call control.  Here's a synopsis
of what I'm doing:

Make outbound call w/ AMI Originate action.
Called party answers ("Customer")
Customer identifies himself, and now I use Dial w/ the G option:
Dial(Zap/g9/${agentext}|60|mG(Agent_Xfer^s^1)
Customer hears MOH while the Dial app gets the "agent" on the line

My destination context looks like this:
[Agent_Xfer]
exten => s,1(Customer),Meetme({$ConfRoom}|qM)
exten => s,2(Agent),Macro(Connect_to_agent,${Customerid},${ConfRoom})

Customerid and ConfRoom are channel variables that are set in the
Originate action and at the start of the dialplan processing,
respectively.

The idea is to put the customer in a conference room, listening to MOH,
until I can get an agent on the line.  (This part works pretty well.)
The agent is an extension on a legacy PBX, so a simple Dial with a macro
has undesired side effects.  (Specifically, the customer hears ringing
or the legacy PBX's MOH, depending upon the status of the transfer.)
Putting the customer in a conf room, listening to music, is the best
solution I can think of.

The problem is that I don't know how to get the two channel variables
over to the "Agent" leg of the call.  I don't see anything in the docs
about the G option accepting arguments to pass to the called leg.  Is
there any way that I can get the two variables' values over to the
called leg?

-MC


More information about the asterisk-users mailing list