[Asterisk-Users] Follow me using a loop

Race Vanderdecken asterisk at vanderdecken.com
Tue Oct 19 14:18:59 MST 2004


Greetings,

Drop the third line.
exten => 31xxxxxxx,3,Goto(31xxxxxxx,1)

If everything goes correctly with the multiple Dial then Dial will
complete and return and then go to the next step in the dial plan. Which
in your case is to fall to step 3, which sends asterisk back to step 1.
And you start again.

I bet if there is a failure in step 2 you don't loop. That is because
the errors, timeout or invalid fall to exten => t,1,foo or exten
=>i,1,foo in the dial plan context.

Doing this step will ring both callee's at the same time. If one number
answers then you get a good return code and Dial stops trying to dial
the other number.

31xxxxxxx,2,Dial(IAX2/pascal at pascal&CAPI/31xxxxxxx:079xxxxxxx,120,mgh)

[context-Follow_me]
exten => 31xxxxxxx,1,Wait(1)
exten =>
31xxxxxxx,2,Dial(IAX2/pascal at pascal&CAPI/31xxxxxxx:079xxxxxxx,120,mgh)

exten => i,1,hangup	; dialed an invalid number
exten => t,1,hangup	; timeout


As an aside this is really "Find-Me" when you dial multiple numbers at
the same time.

This is a "follow-me" script, where each number is called one number at
a time until someone answers.

[context-Follow_me]
exten => 31xxxxxxx,1,Setvar(step=3)
exten => 31xxxxxxx,2,Dial(SIP/111|6)                    
exten => 31xxxxxxx,3,Setvar(step=5)                             
exten => 31xxxxxxx,4,Dial(SIP/222|6)                     
exten => 31xxxxxxx,5,Setvar(step=7)                             
exten => 31xxxxxxx,6,Dial(SIP/333|6)                     
exten => 31xxxxxxx,7,Hangup()                                  

exten => i,1,Goto(${DNID}|$[${step}])                   
exten => t,1,Goto(${DNID}|$[${step}])         

Race Vanderdecken

Asterisk at Vanderdecken D0T coM        

-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Pascal C.
Kocher
Sent: 19 October 2004 05:12
To: asterisk-users at lists.digium.com
Subject: [Asterisk-Users] Follow me using a loop

Hello *-users

I'm trying to implement a simple follow me solution. The case is that I
would like to be able to pickup the incoming call on a line (whatever)
hang it up and repick it on another line (mobile)

Currently i'm using the following to accomplish this:

exten => 31xxxxxxx,1,Wait(1)
exten =>
31xxxxxxx,2,Dial(IAX2/pascal at pascal&CAPI/31xxxxxxx:079xxxxxxx,120,mgh)
exten => 31xxxxxxx,3,Goto(31xxxxxxx,1)

This successfully calls my firefly and my mobile phone using CAPI and I
can pick up the call. If I hang up on firefly for example it restarts
the calls on all phones and I'm able to pick it up on the mobile, which
works fine.

What I'm currently missing is, that I'm unable to hang up the call as
callee, as long as ther caller does not hang up, it loops indefinately,
which bothers me a little.

As you can see, I tried using the Option "h" to hangup the call, but of
course it will just continue and start again. Is there a possibility I
might have been missing to exit this loop as callee (maybe a
GotoIf-condition)?

Best regards,
Pascal.
_______________________________________________
Asterisk-Users mailing list
Asterisk-Users at lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users




More information about the asterisk-users mailing list