[pjsip] TCP Transport problem: via should be Via: SIP/2.0/TCP and not Via: SIP/2.0/tcp
bennylp at teluu.com
Tue Aug 18 09:55:35 EDT 2009
On Thu, Aug 13, 2009 at 5:06 PM, Klaus Darilion <
klaus.mailinglists at pernau.at> wrote:
> RFC 3261:
> transport = "UDP" / "TCP" / "TLS" / "SCTP"
> / other-transport
> Unless otherwise stated, tokens are case-insensitive.
> IMO pjsip should send TCP and freeswitch should accept "tls" too :)
I wish it was that easy to change. In PJSIP, these names are generated by
pjsip_transport_get_type_name() (sip_transport.h), and this is used all over
the place, e.g. in Via and also in URI parameters.
It will be easy to change the output to uppercase, but then again if you
look at different place in the RFC:
uri-parameter = transport-param / user-param / method-param
/ ttl-param / maddr-param / lr-param / other-param
transport-param = "transport="
( "udp" / "tcp" / "sctp" / "tls"
It's in lowercase.
So if we change pjsip_transport_get_type_name() to uppercase, wouldn't then
it complain about this in the URI?
We could hack it to manually with toupper() in Via header, but that's just
too much work for something that's perfectly good. ;-)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the pjsip