[asterisk-dev] Questions on concurrent Dial

Rich Adamson radamson at routers.com
Mon Jul 24 00:19:29 MST 2006


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.




More information about the asterisk-dev mailing list