[asterisk-users] handling SIP trunk with limited concurent calls

benoit plessis benoit at plessis.info
Thu Jun 5 01:55:48 CDT 2008


Hi,

Now that we have a working asterisk server, i'm looking
toward cost optimization :)

We are actually testing a SIP provider, which has an interessting
limitation: each account support at max only two concurrent calls.

My problem is how to combine multiple accounts and fail back to PSTN
lines if all accounts are 'full'. I've added a "call-limit=2" in the
sip.conf entry, but i dont really now how to use it in the dialplan.
ChanIsAvail() was my first try but didn't work.

I've tried chaining Dial() calls:
	Dial(SIP/line1/${EXTEN})
	Dial(SIP/line2/${EXTEN})
	...
but when an error condition occurs (busy/unavailable/whatever) it
dial the same number on every line, which can take a while at the end.

So, is there a way with the DIALSTATUS variable to detect a 'full' peer 
?

-- 
Benoit




More information about the asterisk-users mailing list