[SR-Users] variable in rewritehost ?`
Ali Jawad
ali.jawad at splendor.net
Mon Dec 17 14:33:42 CET 2012
I did make it simpler as follows :
sql_xquery("cb", "select username,domain from location where
username like 'support1' " , "ra");
$ru = "sip:support1@$xavp(ra=>domain):5060";
xlog ("Pseudo destiantion is $xavp(ra=>domain)");
xlog actually does reply correctly with the value of domain, but $ru is not
recognizing it as the log shows :
ERROR: <core> [resolve.c:1540]: ERROR: sip_hostport2su: could not resolve
hostname: "$xavp(ra=>domain)"
On Mon, Dec 17, 2012 at 2:55 PM, Ali Jawad <ali.jawad at splendor.net> wrote:
> Thanks Alex, now it works if I do set the $ru manually, however if I do
> set it dynamically it still gives destination unresolvable, I do fetch a
> SQL statement and row 1,1 is hostname
>
>
> while($var(i)<$dbr(ra=>rows))
>
> {
>
> $var(j) = 0;
>
> while($var(j)<$dbr(ra=>cols))
>
> {
>
> xlog("[$var(i),$var(j)] =
> $dbr(ra=>[$var(i),$var(j)])\n");
>
> $var(j) = $var(j) + 1;
>
> }
>
> $var(i) = $var(i) + 1;
>
> }
>
> }
>
>
>
> $ru = "sip:support1 at ra=>[$var(1),$var(1)]:5060";
>
>
> On Mon, Dec 17, 2012 at 2:22 PM, Alex Balashov <abalashov at evaristesys.com>wrote:
>
>> $ru
>
>
>
>
> --
> *Ali Jawad
> *
> *Information Systems Manager
> CISSP - PMP - ITIL V3 - RHCE - VCP - C|EH - CCNA - MCSA
> *
> *Splendor Telecom (www.splendor.net)
>
> Beirut, Lebanon
> Phone: +9611373725/ext 116
> FAX: +9611375554
>
> *
>
>
--
*Ali Jawad
*
*Information Systems Manager
CISSP - PMP - ITIL V3 - RHCE - VCP - C|EH - CCNA - MCSA
*
*Splendor Telecom (www.splendor.net)
Beirut, Lebanon
Phone: +9611373725/ext 116
FAX: +9611375554
*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20121217/36e0dfdc/attachment.htm>
More information about the sr-users
mailing list