[asterisk-dev] "sip:" or "SIP:" in chan_sip

Tony Mountifield tony at softins.clara.co.uk
Wed May 16 01:45:14 MST 2007


Recently I came across someone trying to interface their own Asterisk PBX
to a non-Asterisk SIP interface run by one of our clients.

They could successfully register with Asterisk to the client's system, and
could originate calls from Asterisk. But when making calls via the client's
system to their Asterisk box, they got the following errors:

May 13 23:35:15 NOTICE[1437]: chan_sip.c:7178 check_user_full: From address missing 'sip:', using it anyway
May 13 23:35:15 WARNING[1437]: chan_sip.c:6713 get_destination: Huh? Not a SIP header (SIP:9732xxxx at sip.xxxxxxx.com:5060)?

When I looked at the relevant parts of chan_sip, it became obvious to me
that the client's system was sending SIP URLs beginning with "SIP:" instead
of "sip:", but chan_sip in various places does strncmp(url,"sip:",4).

Is "SIP:" valid? If so, I think there are many places where strncasecmp()
should be used instead.

I checked trunk, and noticed that strncasecmp() is used sometimes, but that
strncmp is also still used in some places. It also affects 1.4 and 1.2.

Comments?

Cheers
Tony
-- 
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org


More information about the asterisk-dev mailing list