When trying to send hex representation of DTMF in NOTIFY message body ( CISCO proprietary) , an additional 4 bytes are added to the message body 0x0a,0x0d,0x0a,0x0d.
NOTIFY [next_url] SIP/2.0 Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch] Record-[routes] To:[$From_Content] From:[$To_Content] [last_Call-ID:] CSeq: 5 NOTIFY Contact: sip:sipp@[local_ip]:[local_port] Max-Forwards: 70 Event:telephone-event Content-Type: audio/telephone-event Content-Length: 4 \x0b\x00\x00\x28 ]]>
This fails to pass through Kamailio as its flagged as incorrect length. If the content length is changed to 8 , it passes through kamailio but is ignored by a CISCO gateway as the content length is now invalid for the content type .
A Notify message sent from a Cisco ISR has a content length of 4 , but no additional \r\n\r\n bytes on the end of the message body.