0 like 0 dislike
1,509 views
I want to be able to pass the extension entered by a caller to the agi script and after it is manupulate I would like the agi script to send the result back to the dial plan as a variable. Can anyone give me an example of how to achive this in any dialplan language
asked Aug 26, 2013 in Education & Reference by Mohana | 1,509 views
    

1 Answer

0 like 0 dislike
//in dial plan
Send Command from Dialplan to AGI
exten => 1,1,AGI(MyAPP.php, anyvalue)
 
 
// in myapp.php
 
Get Variable to AGI
In Asterisk 1.6 or above
$Variable =$agi->request[agi_arg_1];
 
In Asterisk 1.4
$Variable =$argv[1];
 
 
set_variable
Sets a variable to the specified value. The variables so created can later be used by later using 
 
${<variablename>} in the dialplan.
# return values to asterisk 
In Asterisk 1.6 or above
$agi->set_variable("Variable", $value); 
 
In Asterisk 1.4
$agi->set_var("Variable", $value);
answered Aug 26, 2013 by Sam (1,350 points)

Related questions

0 like 0 dislike
3 answers
1 like 0 dislike
1 answer
1 like 0 dislike
1 answer
0 like 0 dislike
1 answer
1 like 0 dislike
2 answers
1 like 0 dislike
1 answer
0 like 0 dislike
1 answer
asked Sep 12, 2013 in Education & Reference by Sidh | 1,030 views
2 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer

Where your donation goes
Technology: We will utilize your donation for development, server maintenance and bandwidth management, etc for our site.

Employee and Projects: We have only 15 employees. They are involved in a wide sort of project works. Your valuable donation will definitely boost their work efficiency.

How can I earn points?
Awarded a Best Answer 10 points
Answer questions 10 points
Asking Question -20 points

Mathe Forum Schule und Studenten
1,177 questions
1,318 answers
276 comments
1,617 users