Author Topic: How to escape ; in regexroute.conf?  (Read 5620 times)

abma

  • Newbie
  • *
  • Posts: 19
    • View Profile
How to escape ; in regexroute.conf?
« on: December 08, 2015, 01:16:18 PM »
i want yate to send a NOTIFY message when 9999 is called to the caller. ( http://wiki.snom.com/FAQ/How_to_trigger_the_phone_to_synchronize_its_settings_via_mass_deployment )

this basicly works but i'm having a problem getting a ; into the message:

Code: [Select]
[default]
^9999$=rename xsip.generate;\
method=NOTIFY;uri=\1;sip_From=<sip:${caller}@${domain$nosuch.dom}>;\
xsip_type=${type$text/plain};xsip_body_encoding=${body_encoding};\
sip_Event=check-sync\;reboot=true

this results in everything after \ beeing dropped.

how can ; be escaped?

marian

  • Hero Member
  • *****
  • Posts: 513
    • View Profile
Re: How to escape ; in regexroute.conf?
« Reply #1 on: December 10, 2015, 01:45:37 AM »
See $(chr,CHAR_NUM) function.
; can be set using $(chr,59)

abma

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: How to escape ; in regexroute.conf?
« Reply #2 on: December 10, 2015, 10:40:49 AM »
oh, i didn't expect that a function has to be used.

its even simpler, from http://docs.yate.ro/wiki/Regular_expressions:

Quote
$() = a ; character

thanks!