[asterisk-users] Get dialed numbers in AGI
Mike D'Ambrogia
miked at jamagination.com
Thu Jan 11 07:52:31 MST 2007
on the php AGI side the ${var} parameter passed in from your dialplan
will be exposed in PHP's $argv[1] array element
fwrite(STDOUT,"exec saydigits $argv[1]\n");
as a side note $argv[0] contains the full path including filename to the
script
Hope this helps
Mike
-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Ralph
Liebessohn
Sent: Thursday, January 11, 2007 6:00 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Get dialed numbers in AGI
On 1/10/07, Yuan LIU <yliu11 at hotmail.com> wrote:
>From: "Ralph Liebessohn" <ralphliebessohn at gmail.com>
I did a quick test and it seems that everything passed to AGI is by
value,
and there is no apparent relationship between variable named used in two
different AGI commands.
However, a small adaption of dial plan could accomplish what you wanted,
that is, to read the variable in dial plan, then pass its value to AGI.
Hope this helps.
Yuan Liu
Hello people,
next step.
With many other tests I may conclude that AGI is not saving my password,
it is giving it to asterisk temporaly and the next step executed by
asterisk doesn 't know the variable.
If I run SAYDIGITS after READ inside extensions it works fine. What I
cannot say running it on AGI.
The architecture of Yuan or Anton can work, but how pass the value from
dialplan to AGI or wich AGI librarie give me the function of READ in
dialplan?
I tried to pass value from dialplan using:
AGI(myagi.php|${var})
But AGI didn't see $var value. And using GET/SET VARIABLE and STREAM
FILE into AGI is passing through the commands, nothing is being done or
waiting to dial digits.
Is that the correct way to go?
--
Ralph Liebessohn
ICQ: 74835911
Skype: liebessohn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20070111/51847f2d/attachment-0001.htm
More information about the asterisk-users
mailing list