[asterisk-dev] Questions on concurrent Dial

Armin Schindler armin at melware.de
Mon Jul 24 05:19:22 MST 2006


On Mon, 24 Jul 2006, Eric "ManxPower" Wieling 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 ?
> 
> One way to do this might be to use one Dial() command to ring all phones, but
> before running the Dial() set ALERT_INFO to something like "SelectiveRing".
> Define SelectiveRing on some phones as a ring, and on other phones as a silent
> ring.

Why not using a local channel?
  Dial(SIP/102&Local/....)
and in the Local context you set whatever you need and Dial(SIP/103).

Armin




More information about the asterisk-dev mailing list