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('<br>
<br> AQUERY="CALL Routing(\"$$SIP_USER\", \"$$SIP_SRCIP\", \"$$SIP_RURI\", \"$$SIP_ORURI\", False);";<br> AURI=`mysql -Broot -pxxxxxxx -e "$$AQUERY" opensips`;<br>
<br> echo $$AQUERY > /tmp/AQUERY.txt<br> echo $$AURI> /tmp/AURI.txt<br><br> if [ ! -z "$$AURI" ] ; then<br> <br> printf ("$$AURI"); <br>
fi;<br> <br> exit;<br> <br> echo > dev/null<br> <br> ');<br><br>AURI contains "+-----------------------------------+ | DestinationURI | +-----------------------------------+ | sip:121255555666@64.55.55.555:5060 | +-----------------------------------+" 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 ("sip:121255555666@64.55.55.555:5060"); 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><br><br>pj<br>