[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.

Olle E. Johansson oej at edvina.net
Fri May 13 02:19:58 CDT 2011


12 maj 2011 kl. 19.52 skrev David Vossel:

> t 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'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.
> 
> 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.

yes, and for backwards compatibility it needs to be enabled by default.

/O


More information about the asterisk-dev mailing list