Hello,

 

The BYE, generated by Kamailio in case of dialog timeout, is malformed:

 

BYE sip:anonymous@192.168.225.2:50601 SIP/2.0

Via: SIP/2.0/UDP 172.16.60.113;branch=z9hG4bK77b6.941684b6.0

Via: SIP/2.0/UDP 10.1.1.10;branch=z9hG4bKsr-JfymiMenCtp4urS5CXSnCHJnCXJZiHvRCHYJb6ggNPN9NVDL3-TWhdW0UvOfN1KPTReRiHy1CHmcs6mZiHS*

To: sip:anonymous;cpc=ordinary@192.168.225.2;tag=01e3a8c0-c1c2-t-1

From: sip:1255010006@192.168.225.2:5060;user=phone;tag=813142547-1366730270587

CSeq: 465332801 BYE

Call-ID: 1aebb42c-01e3a8c0-000007c2@192.168.225.2

Content-Length: 0

User-Agent: kamailio (3.3.2 (x86_64/linux))

Max-Forwards: 69

 

The bad syntax is located in the “To” header field.

According to the RFC 3261 section 25.1, the grammar of the To header field is as follow:

 

To        =  ( "To" / "t" ) HCOLON ( name-addr

             / addr-spec ) *( SEMI to-param )

name-addr =  [ display-name ] LAQUOT addr-spec RAQUOT

addr-spec =  SIP-URI / SIPS-URI / absoluteURI

to-param  =  tag-param / generic-param

 

The RFC 3261 section 20.10 explains that:

 

   Even if the "display-name" is empty, the "name-addr" form MUST be

   used if the "addr-spec" contains a comma, semicolon, or question

   mark.  There may or may not be LWS between the display-name and the

   "<".

 

As the “addr-spec” sip:anonymous;cpc=ordinary@192.168.225.2 contains a semicolon, it means that the “name-addr” form must be used. The “To” header field should be encoded as follow:

 

To: <sip:anonymous;cpc=ordinary@192.168.225.2>;tag=01e3a8c0-c1c2-t-1

 

BR,

 

Julia