[asterisk-users] Get dialed numbers in AGI

Lee Jenkins lee at datatrakpos.com
Wed Jan 10 14:59:06 MST 2007


Ralph Liebessohn wrote:
> Using:
> fwrite(STDOUT,"exec read 
> my_var|//usr/share/asterisk/sounds/please-wait-connect-oncall-eng|5|||15 
> \n");
> fwrite(STDOUT,"get variable my_var \n");
> fflush(STDOUT);
> $my_var=STDIN;
> fwrite(STDOUT,"exec saydigits $my_var \n");
> 
> I got it:
> 

Also you might try concatenating the values together like this:

fwrite(STDOUT,"exec saydigits " + $my_var  + "\n");

Of course, that might not be the correct operator (+) to glue together 
strings, but I bet this has something to do with it.  Your version above 
puts the variable name in the string itself and probably the php engine 
ignores it (unlike asterisk which seems to replace ${VAR} symbols within 
quotes).  So try bringing the variable out of the quoted string like the 
example that I gave above.

Just another suggestion.

-- 

Warm Regards,

Lee



More information about the asterisk-users mailing list