Exec DSET isn&#39;t a very scaleable way to do this.. why not use avp_db_query in avpops instead?<div><br><br><div class="gmail_quote">On Wed, Feb 24, 2010 at 12:44 PM, Phillip Jones <span dir="ltr">&lt;<a href="mailto:pjintheusa@gmail.com">pjintheusa@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi there,<br><br>I am new to opensips - and I am trying to convert a script currently working in SER. I am almost done - but have one last issue that is getting the better of me. This is the script part:<br>

<br>exec_dset(&#39;<br>
                <br>                AQUERY=&quot;CALL Routing(\&quot;$$SIP_USER\&quot;, \&quot;$$SIP_SRCIP\&quot;, \&quot;$$SIP_RURI\&quot;, \&quot;$$SIP_ORURI\&quot;, False);&quot;;<br>                AURI=`mysql -Broot -pxxxxxxx -e &quot;$$AQUERY&quot; opensips`;<br>


<br>                echo $$AQUERY &gt; /tmp/AQUERY.txt<br>                echo $$AURI&gt; /tmp/AURI.txt<br><br>                if [ ! -z &quot;$$AURI&quot; ] ; then<br>                        <br>                    printf (&quot;$$AURI&quot;);            <br>


                fi;<br>                <br>                exit;<br>        <br>                echo &gt; dev/null<br>        <br>            &#39;);<br><br>AURI contains &quot;+-----------------------------------+ | DestinationURI | +-----------------------------------+ | sip:121255555666@64.55.55.555:5060 | +-----------------------------------+&quot; which kind of makes sense.<br>


<br>Opensips falls over with error: ERROR:core:parse_uri: bad uri - which also makes sense.<br><br>If I use  printf (&quot;sip:121255555666@64.55.55.555:5060&quot;); then every thing works nicely.<br><br>What I am missing here? If this worked in SER - what has changed - a config in MySQL??<br>


<br>Any help would be much appreciated. I think I could use REGEX here to extract the uri, but I not familiar with the syntax in opensips.<br><br><br><br>Thanks<br><font color="#888888"><br><br>pj<br>
</font><br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div>