[Kamailio-Devel] How to escape "$" when using it into a string?

Iñaki Baz Castillo ibc at aliax.net
Sun Jan 11 19:34:33 CET 2009


El Domingo, 11 de Enero de 2009, Iñaki Baz Castillo escribió:

> Ok, I understand the problem: when the Kamailio reads the $ it expects a
> pseudo-variable ($ru, $dd...) but it finds:
>
>   "^ibc$"
>
> so tries to lookup for a pseudo-variable called "" and returns error.
>
>
> How could I solve it? How could escape a $ when using it in a string
> argument of Kamailio script?

I've also trying using the hexadecimal value of $ (%24):

  pcre_match("$fU", "^ibc\x24")

but it also fails. It seems that Kamailio undecodes it when parsing the script 
and returns the same error:

  ERROR:core:pv_parse_spec: error searching pvar ""

Any trick?


> Thanks a lot.



-- 
Iñaki Baz Castillo



More information about the Devel mailing list