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

Benoit Plessis benoit at plessis.info
Thu Jun 5 17:32:03 CDT 2008


Benoit Plessis a écrit :
> Gordon Henderson a écrit :
>   
>> On Thu, 5 Jun 2008, benoit plessis wrote:
>>
>>   
>>     
>>> 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
>>> ?
>>>     
>>>       
>> Yes.
>>
>> You need to check for CONGESTION.
>>
>> something like:
>>
>>    n,Dial(SIP/line1/{EXTEN})
>>    n,Noop(Dial line1 failed - we got ${DIALSTATUS})
>>    n,GotoIf($["${DIALSTATUS}" = "CONGESTION"]?tryNext)
>>    n,Hangup
>>
>>    n(tryNext),Dial(SIP/line2/${EXTEN})
>>
>> But do check that the SIP provider does indeed return CONGESTION ... (You 
>> may not need the call-limit=2, if they check for you, then if at a later 
>> date, they increase the limit, then you don't need to change anything)
>>
>> Gordon
>>   
>>     
> Isn't there a risk of getting a CONGESTION message from the other party ?
>
> benoit
>
>   
Another problem i foresee is long delay in dialing sequence when 
asterisk will have to dial using 4/5 account
before having a working channel

i think i should look after another sip provider

-- 
Benoit

-------------- next part --------------
A non-text attachment was scrubbed...
Name: benoit.vcf
Type: text/x-vcard
Size: 180 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20080606/df49de5c/attachment.vcf 


More information about the asterisk-users mailing list