[pjsip] via header and TLS on a Freeswitch PBX
Pierre-Luc Bacon
pierre-luc.bacon at savoirfairelinux.com
Mon Aug 24 11:36:59 EDT 2009
I am implementing TLS transport from the PJSIP library and ran over a
via header problem while trying to register to Freeswitch server.
>From the debug output on the freeswitch box I see:
"nta: Via check: invalid transport "SIP/2.0/tls" from
192.168.1.12:37842"
Where 192.168.1.12 is from the the softphone that is implementing
PJSIP.
Digging into the freeswitch source code, I saw that this message was
coming from
libs/sofia-sip/libsofia-sip-ua/nta/nta.c
where they do "[...]!su_strmatch(v->v_protocol, tpv->v_protocol)", and
su_strmatch is a wrapper over strcmp.
It turns out that "SIP/2.0/tls" (pjsip) is compared with
"SIP/2.0/TLS" (sofia) and strcmp being case sensitive, the match fails.
I tried to look in RFC3261 to see what was said about that but I
couldn't find it exactly. I'm pretty sure that PJSIP is doing it right
and that the via header should be processed in a case-insensitive way.
More information about the pjsip
mailing list