[OpenSER-Users] Carrierroute... Do I almost have it???

Henning Westerholt henning.westerholt at 1und1.de
Fri Mar 28 01:32:59 CET 2008


On Wed, March 26, 2008 6:20 pm, Douglas Garstang wrote:
> Ok... I can do it if I use cr_user_rewrite_uri("sip:.*@192.168.1.240",
> "1") in openser.cfg and then change the username from blank to '.*' (WHERE
> is that documented?? I only worked it out by tracing port 3306!!!).
>
> But... this isn't feesible. This means that I have to HARD CODE the name
> of the user in the openser.cfg...

Hi Douglas,

no, this is not necessary. The function cr_user_rewrite_uri lookup the
carrier for a user from the subscriber table, yes. But you don't need to
hardcode it. You can just any pseudo-variable, including AVP variables as
lookup source. The '.*' is just used in the SQL query, so you get the
first carrier, i guess. This is not a recommended mode of operation. ;-)

Normally you just use the user from the SIP message, so there is no need
to do fancy variable operations in the script.

Cheers,

Henning





More information about the sr-users mailing list