Session-Expires with incoming calls from GW with client with no Session timers

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Session-Expires with incoming calls from GW with client with no Session timers

joel.oliveira
Hello all,

Being trying hard to get the SST to work with a gateway Cisco A5300. Although it seemed to be working all the way, last week I found out it wasn't. You see, when recieving a call via gateway to a user (that doesn't support Session timers) in OpenSIPs, the first negotiation regarding the Invitegoes out OK, with OpenSIPs adding the Session-Expires to the "200 OK" reply because the client doesn't support Session-Expires ( supported: timer ). So now we have a placed call with a Session-Expires of 1800 because that's what Cisco has by default.

After 15 minutes ( half of the 1800 seconds defined above ), Cisco does a Re-Invite that goes out OK but for some reason OpenSIPs doesn't add the Session-Expires header in the "200 OK" reply from the client. That way Cisco doesn't know that it needs to do the Re-Invite and then the call only endures for more 1800 seconds ( 30 minutes ). At the end of the 30 minutes OpenSIPs sends Byes to the Gateway and the client because of the session-timeout.

In my way of thinking OpenSIPs should add the Session-Expires header even if it's a Re-Invite, right? I tryed to add the header "manually" and all but couldn't find a way that on the onreply_route identify the Re-Invite and with that adding the Session-Expires header.

My OpenSIPs script is available here: http://pastebin.com/Q2TUuUWq

Can somebody give me a hand on this? :) Thanks,
Joel Oliveira
Reply | Threaded
Open this post in threaded view
|

Re: Session-Expires with incoming calls from GW with client with no Session timers

joel.oliveira
Hello again,

By setting a dialog variable when I get a Re-Invite from the GW, I managed to know on onreply_route, by comparing that variable, if the reply of the client is related to the Re-Invite.

After this I can append the Session-Expires to the "200 OK" Reply and forward it to the GW:
append_hf("Session-Expires: 1800;refresher=uac  \r\n", "User-Agent");

The problem is that... this didn't resolve my problem. The gateway seems to forge to do the Re-Invite and the call dies 30 minutes after the Re-Invite. Does anyone had a similar problem with incoming calls from a GW to a user, where the GW does support timer but the user does not?

Thanks for your time,
Joel Oliveira


Reply | Threaded
Open this post in threaded view
|

Re: Session-Expires with incoming calls from GW with client with no Session timers

joel.oliveira
Hello all,

Just dropping the message of "I finally did it". It seems like I was on the right track all the time, but failed completely on something very simple:

append_hf("Session-Expires: 1800;refresher=uac\r\n", "User-Agent");

It seems to me that the GW was a little stubborn on the header; I had 2 spaces ("  ") after "refresher=uac" when appending the header and that is why the GW wasn't sending any more keep-alives, because it didn't detected the header as valid.

Finally did it. Thanks to anyone who read this thread and if you're having some similar problem I wish you the best of luck.

Regards,
Joel
Reply | Threaded
Open this post in threaded view
|

Re: Session-Expires with incoming calls from GW with client with no Session timers

Bogdan-Andrei Iancu-2
Hi Joel,

On 09/14/2011 06:23 PM, joel.oliveira wrote:

> Hello all,
>
> Just dropping the message of "I finally did it". It seems like I was on the
> right track all the time, but failed completely on something very simple:
>
> append_hf("Session-Expires: 1800;refresher=uac\r\n", "User-Agent");
>
> It seems to me that the GW was a little stubborn on the header; I had 2
> spaces ("  ") after "refresher=uac" when appending the header and that is
> why the GW wasn't sending any more keep-alives, because it didn't detected
> the header as valid.
seems that the GW is not RFC3261 compliant as before the End-of-Header,
any amount of spacing chars can exists.

Regards,
Bogdan

--
Bogdan-Andrei Iancu
OpenSIPS eBootcamp - 19th of September 2011
OpenSIPS solutions and "know-how"


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users