[asterisk-dev] Questions on concurrent Dial

Chan Kwang Mien kwangmien at asgent-tech.com
Mon Jul 24 02:18:15 MST 2006


I was wondering if there is a way in Asterisk such that 2 separate Dial 
commands can be executed concurrently, without the second Dial waiting
for the first Dial to be answered.

exten =>123,1,Dial(SIP/101)
exten =>123,2,Dial(SIP/102)

>From the above, 101 and 102 should be ringing at the same time. The
reason why I would like to do this is because the configuration for the 
first Dial is different from that of the second Dial, in particular the 
Alert-Info settings.


On Mon, 2006-07-24 at 02:19 -0500, Rich Adamson wrote:
> Chan Kwang Mien wrote:
> > Hi,
> > 
> > I am currently implementing incoming group call in Asterisk. The
> > requirement is such that when a particular extension is received at
> > Asterisk, Asterisk will dial all phones belonging to the same group.
> > However, not all phones ring, only some phones should ring.
> > 
> > I have tried 2 methods :
> > 
> > a) The first one was using Alert-Info as follows. In this example, only
> > phones with extensions 102 and 103 should ring, but 101 will not.
> > However, the problem with this method is that Asterisk will be blocked
> > on the first dial as 101 is ringing. Hence, the second Dial will not be
> > executed.
> > 
> > exten =>123,1,SIPAddHeader("Alert-Info:<http://ip-address/empty.wav>")
> > exten =>123,2,Dial(SIP/101)
> > 
> > exten =>123,3,SIPAddHeader("Alert-Info:<http://ip-address/ring.wav>") 
> > exten =>123,4,Dial(SIP/102&SIP/103....)
> > 
> > 
> > b) The second method was to use threads in perl AGI. One thread executes
> > $AGI->exec('Dial',"SIP/101") while the second thread executes $AGI->exec('Dial',
> > "SIP/102&SIP/103"). I noticed that Asterisk would execute the first thread and 
> > be blocked at the first Dial. Hence, again the second dial cannot be executed 
> > simultaneously with the first Dial.
> > 
> > I was wondering if there is any way in Asterisk such that 2 Dials can be 
> > executed simultaneously ?
> 
> If you only want to ring a small number of phones, you can use:
>   exten => s,2,Dial(${PHONE3}&${PHONE4})
> 
> First to answer gets the call.
> 
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
> 
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev
> 




More information about the asterisk-dev mailing list