[Serusers] avpops - avp_pushto bug - maybe a do_action bug too.

Marco Figus marco.figus at abbeynet.it
Fri May 20 14:58:03 CEST 2005


Using avpops to change ruri/domani I found a strange behaviour:

If you try to modify the ruri/domain of a previously received msg using avp_push to, you can't handle with the port.

Suppose to receive a msg with ruri: name at domain:port and you wanna change it to name at newdomain:newport  it seems to be impossible.

if you do something like:

avp_write("newdomain","s:_newdomain");
avp_pushto("$ruri/domain","s:_newdomain");

the result is:

name at newdomain:port    

the do_action method just change the domain using the SET_HOST_T action type and leaves the final part of the string unchanged!!

But I wanna change it too setting the newport value.

A possible solution could be to recall the do_action wiht action SET_PORT_T with an empty value to reset the :port in the ruri field of the received domain, so I can set entire new domain using:

avp_write("newdomain:newport","s:_newdomain");
avp_pushto("$ruri/domain","s:_newdomain");

having as a result:

name at newdomain:newport

and not

name at newdomain:newport:port

as happens now.

Or (the best way I think) add a new value for the first parameters in method avp_pushto(destination, name) that allows to have the domainport as destination (invoking do_action whit SET_PORT_T action). I'm disposable to work on it, let me know.


Marco.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20050520/1e70a2ec/attachment.htm>


More information about the sr-users mailing list