[Asterisk-Dev] escaping @ in extensions ?

Luigi Rizzo rizzo at icir.org
Wed May 25 10:34:37 MST 2005


On Wed, May 25, 2005 at 11:12:25AM -0500, Tilghman Lesher wrote:
> On Wednesday 25 May 2005 04:08, Luigi Rizzo wrote:
> > quick question - SIP "addresses" are of the type 'foo at some.address',
> > but the @ is also used in asterisk to separate extension and context.
> >
> > Do you expect any ill side effect if we use \@ to allow @ in
> > 'extensions' ?
> 
> There's no need.  You have only 3 possible syntaxes.  Just parse your
> arguments right to left, and you'll get the right syntax:
> 
> SIP/address
> SIP/foo at address
> SIP/foo at context@address

perhaps you mean "SIP/foo at address@context" for the latter case ?

Interesting observation, anyways.
Too bad the code in chan_alsa.c or chan_oss.c and probably everywhere
else does the parsing from left to right :(

	cheers
	luigi




More information about the asterisk-dev mailing list