[Asterisk-Users] Outgoing SIP Groups

Martin Pycko martinp at digium.com
Mon May 19 12:53:36 MST 2003


You could imagine creating several contexts and using global variables
like this:

[global]
acc1=0
acc2=0
acc3=0

[c1]
exten => _X.,1,GotoIf,$[${acc1} = 0]?2:c2|${EXTEN}|1
exten => _X.,2,SetVar,acc1=1
exten => _X.,3,Dial,SIP/${EXTEN}@iconnnect1
exten => h,1,SetVar,acc1=0
[c2]
exten => _X.,1,GotoIf,$[${acc2} = 0]?2:c3|${EXTEN}|1
exten => _X.,2,SetVar,acc2=1
exten => _X.,3,Dial,SIP/${EXTEN}@iconnnect2
exten => h,1,SetVar,acc2=0
[c3]
exten => _X.,1,GotoIf,$[${acc1} = 0]?2:hangup|1
exten => _X.,2,SetVar,acc3=1
exten => _X.,3,Dial,SIP/${EXTEN}@iconnnect3
exten => h,1,SetVar,acc3=0

You propably need to add some more code to simulate the mutexes.
Or you could do the same with AGI.

regards
Martin

On Mon, 19 May 2003, Marcus Adolfsson wrote:

> How do I setup "groups" for SIP accounts, just like you can do with
> outgoing Zaptel devices?
>
> Ie, to support multiple concurrent iconnecthere.com calls, I have
> several accounts with them. How would I configure asterisk to group the
> SIP connections in one call group, and then when a user requests
> longdistance dial something like
> _1XXXXXXXXXX,2,Dial(SIP/g3/BYEXTENSION at iconnect) have the the first
> available SIP iconnect account be used.
>
> Thanks,
>
> Marcus
>




More information about the asterisk-users mailing list