[SR-Users] Help find out where to modify request uri
Simone Felici
s.felici at mclink.eu
Mon Jun 20 14:50:10 CEST 2011
Hi again,
I've found where I can collect all infromations i need in the "INBOUND" route (called username and
alias). I've saved them into two variables that I've printed out to log to confirm. Into NAT_MANGLE
route I can match the uri that I should change, based on a username:
if (uri=~"^sip:MYUSERNAME@") {
xlog("L_ERR", "LXLOG MATCH!!!! - %$alias_number - %$user_number");
}
It works. But I've no idea how now change the uri to use the new alias instead the old one.
I.ex from original:
<sip:<MYUSERNAME>@<IP>:1032;uniq=7600673C6E68DF3228C4E238ABB24>
to
<sip:<NEWUSERNAME>@<IP>:1032;uniq=7600673C6E68DF3228C4E238ABB24>
When I'll able to edit it statically, I'll then try db_ops to change values based on some MySQL
entries. For now it would great if I could simple edit the uri on a static example.
It's not so clear how to use the t_relay or whatever I could use to rewrite my new destination based
on the above needs.
Any help?
Thank's a lot!
Simon
Il 17/06/2011 16:49, Simone Felici ha scritto:
>
> Thank you for your answer.
> You've absolutely right on the linked ser.cfg. I send a cleaned up and indented version.
> It's attached.
> Meanwhile I'll try out a little your solution.
>
> Thank's
>
> Simon
More information about the sr-users
mailing list