Outbound Sip group

Currently I use a digium card with 4 analog channels for outgoing calls. Using a dialplan for outbound as so

POTSLINE=ZAP/g1

exten =>_NXXXXXX,1,Dial(${POTSLINE}/${EXTEN})
exten =>_1NXXNXXXXXX,1,Dial(${POTSLINE}/${EXTEN})

This allows for outbound dialing where an open zap channel is selected from the group and used for calling 7 or 10 digit calls.

The problem I am having now is that we have purchased 2 sip accounts from broadvoice, and while I could dial out on one sip line through them using the standard.

exten => _1NXXNXXXXXX, 1, dial(SIP/${EXTEN}@sip.broadvoice.com,30)

I have not been able to determine how to group the two lines together in a fashion similiar to the zap group I was previously using for outbound calls.

The peers show as functioning and inbound calls work from broadvoice in that context.

Can somone post an example of the sip.conf/extensions.conf entries needed for grouping the outbound lines together so that an outbound call will automatically pickup on a sip line not in use.

Thanks.


look specifically at the 'j' option. if you set call-limit in sip.conf for the peer to the number of channels you can use at once, then construct your dialplan to call via the first provider, jumping to n101 on busy. if the call succeeds then you can hangup, but it jumps you can then dial provider #2.

does that help ? packages like AMP/FreePBX do it differently using macros and variables. i guess technically you could even make your dialstring dial both providers at once e.g. [code]exten => _1NXXNXXXXXX, 1, dial(SIP/${EXTEN}@sip.broadvoice.com&SIP/${EXTEN}@sip.otherprovider.com,30)[/code] but i'm not keen on that !

look specifically at the ‘j’ option. if you set call-limit in sip.conf for the peer to the number of channels you can use at once, then construct your dialplan to call via the first provider, jumping to n101 on busy. if the call succeeds then you can hangup, but it jumps you can then dial provider #2.

does that help ? packages like AMP/FreePBX do it differently using macros and variables. i guess technically you could even make your dialstring dial both providers at once e.g. exten => _1NXXNXXXXXX, 1, dial(SIP/${EXTEN}@sip.broadvoice.com&SIP/${EXTEN}@sip.otherprovider.com,30) but i’m not keen on that !

With a little tweaking using the ,j context worked.

Thanks a lot for the insight on this one as I was banging my head against the wall.