[OpenSIPS-Users] exec_dset / mySQL / SER
Phillip Jones
pjintheusa at gmail.com
Wed Feb 24 19:44:28 CET 2010
Hi there,
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:
exec_dset('
AQUERY="CALL Routing(\"$$SIP_USER\", \"$$SIP_SRCIP\",
\"$$SIP_RURI\", \"$$SIP_ORURI\", False);";
AURI=`mysql -Broot -pxxxxxxx -e "$$AQUERY" opensips`;
echo $$AQUERY > /tmp/AQUERY.txt
echo $$AURI> /tmp/AURI.txt
if [ ! -z "$$AURI" ] ; then
printf ("$$AURI");
fi;
exit;
echo > dev/null
');
AURI contains "+-----------------------------------+ | DestinationURI |
+-----------------------------------+ | sip:121255555666 at 64.55.55.555:5060 |
+-----------------------------------+" which kind of makes sense.
Opensips falls over with error: ERROR:core:parse_uri: bad uri - which also
makes sense.
If I use printf ("sip:121255555666 at 64.55.55.555:5060"); then every thing
works nicely.
What I am missing here? If this worked in SER - what has changed - a config
in MySQL??
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.
Thanks
pj
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20100224/2b751f71/attachment.htm
More information about the Users
mailing list