<div dir="ltr"><div>Thanks, i managed to use s.rm to remove quotes in single shot.<br><br></div>Thank you.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 24, 2014 at 3:20 PM, Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
no transformation to "unquote", at this time probably chaining
s.strip and s.striptail would be an option.<br>
<br>
Adding transformations to "quote" and "unquote" can be useful indeed
if json operation returns the full value.<br>
<br>
Cheers,<br>
Daniel<div><div class="h5"><br>
<br>
<div>On 23/10/14 21:02, Muhammad Shahzad
wrote:<br>
</div>
</div></div><blockquote type="cite"><div><div class="h5">
<div dir="ltr">
<div>
<div>
<div>
<div>
<div>Hi,<br>
<br>
</div>
Using method json_get_field i am able to extract json
string. However, this string comes with quotes which
cause a hurdle in assigning to various pseudo variables,
for example,<br>
<br>
--<br>
json_get_field($redis(r=>value),
"to_number", "$var(wim_to)");<br>
json_get_field($redis(r=>value),
"domain", "$var(wim_domain)");<br>
<br>
$uac_req(ruri)="sip:" + $var(wim_to) + "@" +
$var(wim_domain);<br>
--<br>
<br>
This results in $uac_req(ruri) being set as.<br>
</div>
<br>
sip:"49XXXXXXXX"@"<a href="http://sip.mydomain.com" target="_blank">sip.mydomain.com</a>"<br>
<br>
</div>
Which is obviously wrong and fails the transaction
processing.<br>
<br>
</div>
Is there any way to get rid of these quotes from json strings?
One possible way i can think of is using string transformation
"s.substr", but there are a lot of json strings i have in
config and it is too hectic to transform all of them. Is there
any easier way out of this?<br>
<br>
</div>
Thank you.<br>
<div>
<div>
<div>
<div><br>
<br>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset></fieldset>
<br>
</div></div><pre>_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><span class="HOEnZb"><font color="#888888">
</font></span></pre><span class="HOEnZb"><font color="#888888">
</font></span></blockquote><span class="HOEnZb"><font color="#888888">
<br>
<pre cols="72">--
Daniel-Constantin Mierla
<a href="http://twitter.com/#!/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a></pre>
</font></span></div>
<br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br></div>