[asterisk-dev] "sip:" or "SIP:" in chan_sip
Steve Langstaff
steve.langstaff at citel.com
Wed May 16 02:18:22 MST 2007
Assuming Asterisk 'complies' to RFC 3261, the BNF in that document says:
From = ( "From" / "f" ) HCOLON from-spec
from-spec = ( name-addr / addr-spec )
*( SEMI from-param )
addr-spec = SIP-URI / SIPS-URI / absoluteURI
SIP-URI = "sip:" [ userinfo ] hostport
uri-parameters [ headers ]
RFC2243 "Augmented BNF for Syntax Specifications: ABNF" says:
ABNF permits specifying literal text string directly, enclosed in
quotation-marks.
...
NOTE: ABNF strings are case-insensitive and
the character set for these strings is us-ascii.
> -----Original Message-----
> From: asterisk-dev-bounces at lists.digium.com
> [mailto:asterisk-dev-bounces at lists.digium.com] On Behalf Of
> Tony Mountifield
> Sent: 16 May 2007 09:45
> To: asterisk-dev at lists.digium.com
> Subject: [asterisk-dev] "sip:" or "SIP:" in chan_sip
>
> 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
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-dev
>
More information about the asterisk-dev
mailing list