[sip-comm-dev] SIP: handling the Expires header of an OK response to REGISTER


#1

Hello Sip Communicators,

I just stumbled on an issue in the way Sip Communicator handles the OK response to a REGISTER request.

The processOK() method of classs SipRegistrarConnection looks for the "expires" value in a way that complies with the obsolete specification of SIP (RFC 2543) but not the current RFC 3261. The earlier RFC lets the registrar put the "expires" in either an "Expires: " header in the response, or an "expires=" parameter in the Contact part of the response. The current RFC specifies that the "expires" must be in the Contact (see section 10.3).

Sip Communicator looks first for the header, and then in the Contact if there was no header. The Mitel PBX that I am targetting unfortunately puts a bogus "Expires: 0" in every OK along with a correct expires in the Contact. This makes Sip Communicator unable to register since it never sees the real expires in the Contact.

I understand that the way the method works currently probably lets Sip Communicator support some older SIP servers, but maybe we'd be better off prioritizing the Contact over the header, if only in the name of RFC compliance...

As far as getting Sip Communicator to work with our Mitel 3300MX system, I just stopped it from looking at the header by replacing the "expiresHeader = response.getExpires();" line with "expiresHeader = null;" in processOK(), and now I can register.

Hopefully this helps other Mitel users at least... Cheers!

···

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#2

Hey Frederic,

Good catch! Fixed, committed and ack-ed.

Available with r6712 and builds 2378 and newer.

Thanks for reporting it!

Emil

Frédéric Fournier написа:

···

Hello Sip Communicators,

I just stumbled on an issue in the way Sip Communicator handles the OK
response to a REGISTER request.

The processOK() method of classs SipRegistrarConnection looks for the
"expires" value in a way that complies with the obsolete specification
of SIP (RFC 2543) but not the current RFC 3261. The earlier RFC lets the
registrar put the "expires" in either an "Expires: " header in the
response, or an "expires=" parameter in the Contact part of the
response. The current RFC specifies that the "expires" must be in the
Contact (see section 10.3).

Sip Communicator looks first for the header, and then in the Contact if
there was no header. The Mitel PBX that I am targetting unfortunately
puts a bogus "Expires: 0" in every OK along with a correct expires in
the Contact. This makes Sip Communicator unable to register since it
never sees the real expires in the Contact.

I understand that the way the method works currently probably lets Sip
Communicator support some older SIP servers, but maybe we'd be better
off prioritizing the Contact over the header, if only in the name of RFC
compliance...

As far as getting Sip Communicator to work with our Mitel 3300MX system,
I just stopped it from looking at the header by replacing the
"expiresHeader = response.getExpires();" line with "expiresHeader =
null;" in processOK(), and now I can register.

Hopefully this helps other Mitel users at least... Cheers!

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

--
Emil Ivov, Ph.D. 67000 Strasbourg,
Project Lead France
SIP Communicator
emcho@sip-communicator.org PHONE: +33.1.77.62.43.30
http://sip-communicator.org FAX: +33.1.77.62.47.31

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net