[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sr-users
Subject:    Re: [SR-Users] How to rewritehostport() dynamically?
From:       Alex Balashov <abalashov () evaristesys ! com>
Date:       2012-07-20 12:02:47
Message-ID: fw2u3dtx21ov87pgtf01hm8r.1342785767716 () email ! android ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]

[Attachment #4 (text/plain)]

Try modifying the request URI with $ru/$rU/$rd/$rp instead. See the pseudovariables \
page on the dokuwiki for more information. 

rewritehostport() is a legacy function that does not deal with variables. 




-- Alex

--
Sent from my Samsung mobile, and thus lacking in the refinement one might expect from \
a proper keyboard. 

Alex Balashov - Principal
Evariste Systems LLC
235 E Ponce de Leon Ave
Suite 106
Decatur, GA 30030
Tel: +1-678-954-0670
Web: http://www.evaristesys.com/intel@intrans.baku.az wrote:Can I use \
rewritehostport() function with argument selected at time of call processing?

I have a lua script, which gets address/port of next hop(from base)
But how to call rewritehostport() with it?
I can't find, how to call this function from lua script directly
(I've tried sr.tm.rewritehostport() and rewritehostport() - no success)
If i set pseudovariable (f.e $avp(relay)) and call
rewritehostport("$avp(relay)") from kamailio.cfg later, i can see in logs
such message:

ERROR: tm [ut.h:327]: failed to resolve "$avp(relay)"

Seems it use name of pv, not value?
What should I do to call this function with correct parameter?

-- 


_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[Attachment #5 (text/html)]

<html><head><meta http-equiv="Content-Type" content="text/html; \
charset=UTF-8"></head><body><div>Try modifying the request URI with $ru/$rU/$rd/$rp \
instead. See the pseudovariables page on the dokuwiki for more \
information.&nbsp;</div><div><br></div><div>rewritehostport() is a legacy function \
that does not deal with \
variables.&nbsp;</div><div><br></div><div><br></div><div><br></div><div><br></div><div><div \
style="font-size:75%;color:#575757">-- Alex<br><br>--<br>Sent from my Samsung mobile, \
and thus lacking in the refinement one might expect from a proper keyboard. \
<br><br>Alex Balashov - Principal<br>Evariste Systems LLC<br>235 E Ponce de Leon \
Ave<br>Suite 106<br>Decatur, GA 30030<br>Tel: +1-678-954-0670<br>Web: \
http://www.evaristesys.com/</div></div> <br>intel@intrans.baku.az wrote:<br>Can I use \
rewritehostport() function with argument selected at time of<br>call \
processing?<br><br>I have a lua script, which gets address/port of next hop(from \
base)<br>But how to call rewritehostport() with it?<br>I can't find, how to call this \
function from lua script directly<br>(I've tried sr.tm.rewritehostport() and \
rewritehostport() - no success)<br>If i set pseudovariable (f.e $avp(relay)) and \
call<br>rewritehostport("$avp(relay)") from kamailio.cfg later, i can see in \
logs<br>such message:<br><br>ERROR: tm [ut.h:327]: failed to resolve \
"$avp(relay)"<br><br>Seems it use name of pv, not value?<br>What should I do to call \
this function with correct parameter?<br><br>-- \
<br><br><br>_______________________________________________<br>SIP Express Router \
(SER) and Kamailio (OpenSER) - sr-users mailing \
list<br>sr-users@lists.sip-router.org<br>http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users<br></body>




_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic