Claim your Biolink Click Here
0 like 0 dislike
3.2k 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
in Education & Reference by | 3.2k 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);
by (1.6k points)

Related questions

1 like 0 dislike
1 answer
0 like 0 dislike
3 answers
1 like 0 dislike
1 answer
0 like 0 dislike
1 answer
1 like 0 dislike
2 answers
3 like 0 dislike
1 answer
1 like 0 dislike
1 answer
0 like 0 dislike
1 answer
2 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

1,310 questions
1,471 answers
569 comments
4,809 users