how to execute code if a call came. help me please

khalid

Joined
Aug 13, 2010
Messages
3
Likes
0
Points
0
#1
Hi. I am new to asterisk and elastix, thought I have a little complicated problem.

I have setup two internal extensions in elastix, one with number 111 and the other is 222

I need asterisk to execute specific php code passing the calling number and the called number to the script, without affecting the call performance. I don't want the call to be affected while the script is executing, as if it used threading.

I am new but I found in other asterisk forum that there is a function that called system. and I wrote the following

[from-internal]
exten => 111,1,Answer()
exten => 111,n,system(php /var/lib/asterisk/agi-bin/test.php)
exten => 111,n,hangup()

the code execute, but it prevent calls to the number 111, and second, I don't know how to pass the calling number to the script so that the code to execute is as follow

test.php?calling=xxxx&called=yyyy

please help me
 

Members online

Latest posts

Forum statistics

Threads
30,915
Messages
130,920
Members
17,594
Latest member
knethardsolutions
Top