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: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 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 <[EMAIL PROTECTED]> wrote: 


>From: "Ralph Liebessohn" <[EMAIL PROTECTED]>
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 

_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to