[Freeswitch-dev] Bug in SIP URI: ; received="XX.XX.XX.XX:XXXX" is not valid (SIP BNF)

Iñaki Baz Castillo ibc at aliax.net
Tue Nov 18 16:04:54 PST 2008


Hi, when FS calls to a natted user, it generates an INVITE with a Request URI 
as follows:

  INVITE sip:user at XX.XX.XX.XX:XXXX;transport=udp;received="XX.XX.XX.XX:XXXX" SIP/2.0

Well, this is not valid since a SIP URI parameter cannot contain quote symbol (").
You can verify it in RFC 3261 - page 222 (look for "other-param"):

------------
uri-parameters    =  *( ";" uri-parameter)
uri-parameter     =  transport-param / user-param / method-param
                     / ttl-param / maddr-param / lr-param / other-param
transport-param   =  "transport="
                     ( "udp" / "tcp" / "sctp" / "tls"
                     / other-transport)
other-transport   =  token
user-param        =  "user=" ( "phone" / "ip" / other-user)
other-user        =  token
method-param      =  "method=" Method
ttl-param         =  "ttl=" ttl
maddr-param       =  "maddr=" host
lr-param          =  "lr"
other-param       =  pname [ "=" pvalue ]
pname             =  1*paramchar
pvalue            =  1*paramchar
paramchar         =  param-unreserved / unreserved / escaped
param-unreserved  =  "[" / "]" / "/" / ":" / "&" / "+" / "$"
-------------

This causes Twinkle sofphone droping the incoming request since it's malformed.
Quote symbol (") should not be used in a SIP URI parameter in order to be SIP
compliant.

Since I just use Twinkle (the best and more SIP compliant softphone for Linux) I
can't test FreeSwitch for now  :(


Best regards.


-- 
Iñaki Baz Castillo



More information about the Freeswitch-dev mailing list