[asterisk-dev] [Code Review] SIP user fields are crazy. Repeat extension searches if they all fail and semicolons are obfuscating the extension in the uri.

Saúl Ibarra Corretgé saghul at gmail.com
Thu May 12 13:01:36 CDT 2011


> It looks like we might be getting into some theoretical discussions about things that are beyond the scope of the issue at hand.  The issue at hand is that there's stuff in the user field being sent from some devices that is screwing up extension and peer matching.
>
> I want to make this simple, so here's a simple proposal.
>
> For those people who have devices that do this to the user field and they don't want it there, lets just make a sip.conf option that strips those values out entirely out of every URI so their devices work.  No storing of the values in channel variables or anything like that to complicated it.  Just strip them off and let pattern matching do its thing without them.  If my understanding is correct, that is all people really want that are having interoperability issues with these user field options.
>

I guess someone will eventually ask for the stipped part, but your
proposal seems like a good start to me.

> I'd imagine the option would look like this.
>
> strip_uri_user_options = yes  ; When this option is enabled any parts of the user field of a URI delimited by a ';' will be stripped off before extensions or peer pattern matching occurs. This option is purely for interoperability purposes for devices that put options in the user field that are not supposed to be used during pattern matching.
>

s/options/parameters/ ?

> If someone doesn't what those undefined fields stripped off their user fields, then they don't enable the option and have to do dialplan magic to get the extension to match correctly.
>
> Does this work for everyone?  I know there is more to discuss here, but this approach seems to have merit regardless of what other changes in this area may be introduced in the future.
>

+1


-- 
/Saúl
http://saghul.net | http://sipdoc.net



More information about the asterisk-dev mailing list