i tried to define route
route [+358] { ... }
but got syntax error. is there a good reason why + is not allowed in name of route?
-- juha
Are PV mathematical expressions evaluated in lexical argument scope of routines that accept a route name?
In other words, maybe it's a problem because
route($(avp(s:port)+1));
or something like that may also have some meaning?
-- Alex Balashov - Principal Evariste Systems LLC 1170 Peachtree Street 12th Floor, Suite 1200 Atlanta, GA 30309 Tel: +1-678-954-0670 Fax: +1-404-961-1892
On May 5, 2010, at 1:10 PM, Juha Heinanen jh@tutpro.com wrote:
i tried to define route
route [+358] { ... }
but got syntax error. is there a good reason why + is not allowed in name of route?
-- juha
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Juha,
On Wed, May 5, 2010 at 1:10 PM, Juha Heinanen jh@tutpro.com wrote:
i tried to define route
route [+358] { ... }
but got syntax error. is there a good reason why + is not allowed in name of route?
This is not intentional; it's simply the result of how the configuration parser is written now. When parsing the route statement above, the parser expects one of ID,NUMBER,STRING tokens and the token NUMBER does not allow '+' at the beginning.
There's more surprises like that. For example, one cannot use an arbitrary text token as route name. For example if you write:
route[myself]
then you get a parser error because 'myself' happens to be a reserved word and has its own token.
You can fix this by quoting the name: route["+358"] or route["myself"]
-Jan
On 5/5/10 8:14 PM, Juha Heinanen wrote:
Jan Janak writes:
You can fix this by quoting the name: route["+358"] or route["myself"]
thanks, juha
to add a bit more about, just for reference, the name is considered always a string:
route[123] is the same as route["123"]
similar route[abc] and route["abc"]
Daniel
Daniel-Constantin Mierla writes:
to add a bit more about, just for reference, the name is considered always a string:
route[123] is the same as route["123"]
similar route[abc] and route["abc"]
how then you can explain that
route ["+358"] {
does not give error message, but
route ["+358"] {
Daniel
-- Daniel-Constantin Mierla
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
Daniel-Constantin Mierla writes:
On 5/5/10 8:14 PM, Juha Heinanen wrote:
Jan Janak writes:
You can fix this by quoting the name: route["+358"] or route["myself"]
thanks, juha
to add a bit more about, just for reference, the name is considered always a string:
route[123] is the same as route["123"]
similar route[abc] and route["abc"]
Daniel
-- Daniel-Constantin Mierla
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
On 5/5/10 8:36 PM, Juha Heinanen wrote:
Juha Heinanen writes:
how then you can explain that
route ["+358"] {
does not give error message, but
route [+358] {
the mail got sent too soon. i was going to write:
does not give error message, but
route [+358] {
does,
I don't understand your question again, that was answered by Jan. I added that if a route id is accepted without quotes then putting the id between the quotes is the same.
Daniel