Hi all,
I’m stuck with how to pass the return value to asterisk. That is, a value has to be passed from perl script to asterisk. The variable returned in Perl has to be passed to asterisk, where if the return value is 1 from perl , i have to do something and if return value is 0, i have to do something else.
Pls suggest me how to proceed.
In the perl script just set an * dialplan variable with the commad “SET VARIABLE myvar myvalue”, then in the dialplan you can check the value of the variable myvar.
Are you using AGI to call the perl program, or are you using System? Marco already provided the solution if you are using AGI. If you are using System look here: voip-info.org/wiki-Asterisk+cmd+System
I need to pass that [color=red]$value[/color] to the asterisk extensions.conf
Because, if the values are not inserted in database, i need to repeat the process of again accepting the values from the user.
Kindly suggest me how to proceed.
I’ve copied and pasted my code below so you guys can check it out. Its very straightforward, however when I just simply pass back the value I got from asterisk from within perl, nothing gets sent back.
You see I’m just merely passing back the value of “iUID” to asterisk from inside the AGI/perl script using set_variable but when I use the “NoOp” function to check for the value to see if its working but nothing is displayed.
Is there anything else causing this to happen?? PLEASE HELP!