Parallel Dialing / Running Dialplan Process In Background
Hi,
I am trying to write a dialplan that will use Dial() to call two local extensions. One extension will run an AGI script (a continuous background process, running until hangup), the other will connect the active channel to Jack() (also running as continuous process, until hangup).
This is my current dialplan attempt:
——————-
2 thoughts on - Parallel Dialing / Running Dialplan Process In Background
Asterisk will try calling both at once. As soon as one is answered it cancels the call to the other. What you can do is for extension 101 to put it in it’s own context and then call the agi from the h extension. So something like this:
[from-internal]
exten = 514316XXXX,1,Answer()
same => n,Playback(hello)
same => n,Dial(LOCAL/100@extensions&LOCAL/101@extensions)
[extensions]
exten => 100,1,JACK([i(SuperCollider:in_1), o(SuperCollider:out_1)])
same => n,Hangup()
[our_agi]
Exten => 101,1,Congestion Exten => h,1,AGI(test.py)
Hi Dovid, thanks for that, it works! 🙂
[from-internal]
exten = 514316XXXX,1,Answer()
same => n,Dial(LOCAL/100@extensions&LOCAL/101@background)
[extensions]
exten => 100,1,Playback(hello)
same => n,JACK([i(SuperCollider:in_1), o(SuperCollider:out_1)])
same => n,Hangup()
[background]
Exten => 101,1,Congestion Exten => h,1,AGI(test.py)