[asterisk-users] [OpenSIPS-Users] OpenSIPS with Asterisk Backend

Bogdan-Andrei Iancu bogdan at voice-system.ro
Wed Jul 7 04:03:47 CDT 2010


Hi Robert,

yes, that the correct approach.

On the other hand, medium / long term, the plan is to have directly in 
opensips the capability of checking the health of ongoing dialogs 
(without relying on the capabilities of the end points):
    1) signalling level - like doing in-dialog pings or implement an SST 
endpoint
    2) media level - we have 95% working an integration with rtpproxy to 
report media timeouts to opensips for cutting the call at signalling 
level also.

Nevertheless, Asterisk provides good capabilities (like SST,media 
timeout, etc) to detect the zombie calls, so you can  rely on the 
OpenSIPS - Asterisk  symbiosis  ;)

Best regards,
Bogdan

-- 
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
20 - 24 September 2010, Frankfurt, Germany
www.voice-system.ro



Robert Borz wrote:
> Solved this issue by setting "min_se" parameter for the SST module in OpenSIPS to 180 and setting "session-minse=180" in Asterisk sip.conf in the general section.
>
> I just should have read the error message more carefully as "422 Session Interval Too Small." says it all... :-P
>
> Nevertheless, thanks a lot. :-)
>
>
> -----Ursprüngliche Nachricht-----
> Von: Robert Borz <robert.borz at web.de>
> Gesendet: 05.07.2010 17:10:08
> An: OpenSIPS users mailling list <users at lists.opensips.org>,Asterisk Users
> 	Mailing List - Non-Commercial Discussion <asterisk-users at lists.digium.com>
> Betreff: Re: [OpenSIPS-Users] [asterisk-users] OpenSIPS with Asterisk Backend
>
>   
>> Hi Bogdan,
>>
>> thank you for your response. In the meantime I set the dialog timeout to three hours, this helps a bit. ;-)
>>
>> I wasn't able to catch a stuck call to get the state. Maybe in the near future...
>>
>> To get rid of stuck calls as fast as possible I want to use SIP Session Timers. For this I upgraded the Asterisk backend to version 1.6 which supports this and loaded and configured the SST module in OpenSIPS. With almost every user agent everything seems to work as expected.
>>
>> But I have a Problem with "AVM FRITZ!Box Fon WLAN 7050 (UI) 14.04.33 (May 10 2007)". When it receives an INVITE with "Session-Expires: 90" it just anwers with "422 Session Interval Too Small". At this point the whole thing doesn't get any further. I can't imagine that this behaviour is in accordance to the standard as this is the only UA I have problems with. Whatever, the UA hasn't any problems in placing outgoing calls... really strange.
>>
>> There are two options for me:
>> a) Find a workaround: My idea is now not to enable SST on calls to this UA. I can't use the $ua scripting variable, as it contains "Asterisk PBX", which is absolutely right here... :-/
>>
>> b) Tell the customer to get a new UA as it is already EOL. ;-)
>>
>> What do you think?
>>
>> Regards,
>> Robert.
>>
>> Here's the SIP-Trace (without SDP):
>> OpenSIPS -> Customer:
>> INVITE sip:10000 at XXX.XXX.XXX.124;uniq=0111AA28F74AE042C3CD6EB4C39F6 SIP/2.0.
>> Record-Route: .
>> Via: SIP/2.0/UDP XXX.XXX.XXX.8;branch=z9hG4bK9007.c4c6808.0.
>> Via: SIP/2.0/UDP XXX.XXX.XXX.12:5060;received=XXX.XXX.XXX.12;branch=z9hG4bK144bb9fe;rport=5060.
>> Max-Forwards: 69.
>> From: ;tag=as152f5077.
>> To: .
>> Contact: .
>> Call-ID: 24029a5240153c151015784f5736aef0 at XXX.XXX.XXX.12.
>> CSeq: 102 INVITE.
>> User-Agent: Asterisk PBX 1.6.2.6-1.
>> Date: Mon, 05 Jul 2010 14:56:42 GMT.
>> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO.
>> Supported: replaces, timer.
>> Content-Type: application/sdp.
>> Content-Length: 265.
>> Session-Expires: 90.
>> .
>>
>>
>> Customer -> OpenSIPS:
>> SIP/2.0 422 Session Interval Too Small.
>> Via: SIP/2.0/UDP XXX.XXX.XXX.8;branch=z9hG4bK9007.c4c6808.0.
>> Via: SIP/2.0/UDP XXX.XXX.XXX.12:5060;received=XXX.XXX.XXX.12;branch=z9hG4bK144bb9fe;rport=5060.
>> From: ;tag=as152f5077.
>> To: ;tag=D748EB0E786BFD44.
>> Call-ID: 24029a5240153c151015784f5736aef0 at XXX.XXX.XXX.12.
>> CSeq: 102 INVITE.
>> User-Agent: AVM FRITZ!Box Fon WLAN 7050 (UI) 14.04.33 (May 10 2007).
>> Content-Length: 0.
>> .
>>
>>
>> OpenSIPS -> Customer:
>> ACK sip:10000 at XXX.XXX.XXX.124;uniq=0111AA28F74AE042C3CD6EB4C39F6 SIP/2.0.
>> Via: SIP/2.0/UDP XXX.XXX.XXX.8;branch=z9hG4bK9007.c4c6808.0.
>> From: ;tag=as152f5077.
>> Call-ID: 24029a5240153c151015784f5736aef0 at XXX.XXX.XXX.12.
>> To: ;tag=D748EB0E786BFD44.
>> CSeq: 102 ACK.
>> Max-Forwards: 70.
>> User-Agent: OpenSIPS (1.5.1-notls (x86_64/linux)).
>> Content-Length: 0.
>> .
>>
>>
>> -----Ursprüngliche Nachricht-----
>> Von: Bogdan-Andrei Iancu 
>> Gesendet: 20.04.2010 11:25:25
>> An: OpenSIPS users mailling list 
>> Betreff: Re: [asterisk-users] [OpenSIPS-Users] OpenSIPS with Asterisk Backend
>>
>>     
>>> Hi Robert,
>>>
>>>
>>> The opensips dialog module mainly does dialog monitoring and has limited 
>>> capability when comes to checking dialog health (like it the call is not 
>>> zombie and it is really ongoing). The dialog module can just expire too 
>>> long calls (using a timeout for call duration).
>>>
>>> First of all, dealing with the cause : what is the state of that zombie 
>>> calls (see the dlg_list output) - maybe it is a bogus setup call or a 
>>> call without BYE.
>>>
>>> Now about how do deal with these calls: first reduce the timeout to 2-3 
>>> hours, so even if you have a bogus call, it will be automatically 
>>> removed. There are other options, but it highly depends on the state of 
>>> the zombie call.
>>>
>>> A basic idea is also to have an external script (simple bash) to 
>>> correlate the dialogs from Asterisk with the ones from OpenSIPS - like 
>>> OpenSIPS claim to have an ongoing call C1 via Asterisk A1, but A1 does 
>>> not report it -> use the MI of OpenSIPS (dlg_end_dlg command) to 
>>> terminate the bogus call on OpenSIPS.
>>>
>>> BTW, is any kind of call keepalive ? like SST with re-INVITEs ? does 
>>> Asterisk do media timeout  ?
>>>
>>> Regards,
>>> Bogdan
>>>
>>> Robert Borz wrote:
>>>       
>>>>  Hi,
>>>>
>>>>  
>>>>
>>>> sorry for cross-posting on both mailing lists, but I think a setup of 
>>>> Asterisk with OpenSIPS as frontend isn't unusual. So maybe both 
>>>> parties would be interested in this.
>>>>
>>>>  
>>>>
>>>> I'm using Asterisk (v1.4.21) to connect my OpenSIPS (v1.5.1) server to 
>>>> the PSTN (Asterisk connects to a local SIP provider doing the PSTN 
>>>> termination) so the Asterisk just acts as an PSTN gateway here. For 
>>>> doing some call control stuff (channel limitation) I'm using the 
>>>> dialog module on OpenSIPS.
>>>>
>>>>  
>>>>
>>>> Generally everything works well with about 250 users at the moment. 
>>>> But sometimes there are stuck dialogs on the OpenSIPS server (seen by 
>>>> #opensipsctl fifo dlg_list). At the same time in Asterisk messages 
>>>> there is this:
>>>>
>>>> [Apr 19 07:21:50] WARNING[13498] chan_sip.c: Maximum retries exceeded 
>>>> on transmission 5CE33D1A20E54183 at XXX.XXX.XXX.XXX for seqno 7912 
>>>> (Critical Response)
>>>>
>>>>  
>>>>
>>>> As I'm doing channel limitation to a single channel by using the 
>>>> dialog module a stuck dialog leads to the user not being able to do 
>>>> any further calls until the dialog is destroyed by dialog timeout.
>>>>
>>>>  
>>>>
>>>> Any ideas how to solve this issue?
>>>>
>>>>  
>>>>
>>>>  
>>>>
>>>> Regards, Robert.
>>>>
>>>>   
>>>>
>>>>         




More information about the asterisk-users mailing list