Kamailio Regex
Timothy Delin via sr-users <[email protected]>
| Newsgroups | gmane.comp.voip.ser |
|---|---|
| Message-ID | <SEZPR04MB62206BBB5722929EA19E023AE565A@SEZPR04MB6220.apcprd04.prod.outlook.com> |
Hi everyone,
I need your advice. I am extracting a SIP Body message from a User Agent Client using the regex as such
"$var(calling_party)= $(var(body){re.subst,/.*Calling-party:\s*sip:(\+[0-9]+)@.*/\1/});"
And I tried to log it as
"xlog("L_INFO", "Extracted number 1: $var(calling_party) <><><>\n");"
However, the output in my logs is only showing as below, where I cannot see any value after my variables.
"1(6) INFO: {1 10 SUBSCRIBE 5017ae21204c72a3} <script>: Extracted number 1: +6512345678"
I suspect this is the reason why when I tried to use this variable in a redis_cmd, it returns as null as the variable may have impacted the command input to Redis.
I tried to change the $var(calling_party)="+6512345678" and it is working perfectly fine
Best regards,
Timothy
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the sender!