Hi all,
I've been able to rewrite R_URI based on prefix matching in the carrierroute module, using: cr_route("default", "0", "$rU", "$rU", "call_id") I used this to normalize the ruri to E164: ex: in france, the country code is +33, if someone dials "01 10 10 10 10", I strip the first 0 and prefix with 33 so that I get 331 10 10 10 10 (space are there for convenience :p)
What I'd like to do is to use the carrierroute module to do the same but for from uri: ex: I receive a call on my phone with a caller using e164 (from_uri: 331 20 20 20 20) and I'd like to present this number as 01 20 20 20 20 to the callee. I added a prefix 331 in the carrierroute tables.
I tried this: - cr_route("default", "0", "$fU", "$fU", "call_id") - cr_route("default", "0", "$fU", "$fU", "from_uri") - cr_route("default", "0", "$fU", "$rU", "call_id") - cr_route("default", "0", "$fU", "$rU", "from_uri")
but I've been unsuccessful with this.
Is there a way to achieve from_uri translation using the carrierroute module.
Regards, rod
On Tuesday 16 December 2008, rod wrote:
I've been able to rewrite R_URI based on prefix matching in the carrierroute module, using: cr_route("default", "0", "$rU", "$rU", "call_id")
Hello Rod,
[..] What I'd like to do is to use the carrierroute module to do the same but for from uri: ex: I receive a call on my phone with a caller using e164 (from_uri: 331 20 20 20 20) and I'd like to present this number as 01 20 20 20 20 to the callee. I added a prefix 331 in the carrierroute tables.
I tried this: - cr_route("default", "0", "$fU", "$fU", "call_id")
This rewrites the uri in the default tree, domain 0, uses the from user for prefix matching and as rewrite source, hashes over callid.
- cr_route("default", "0", "$fU", "$fU", "from_uri")
Same as above, hashes over from_uri.
- cr_route("default", "0", "$fU", "$rU", "call_id")
Uses the request URI user as rewrite source.
- cr_route("default", "0", "$fU", "$rU", "from_uri")
hash over from_uri instead of callid as above.
but I've been unsuccessful with this.
Is there a way to achieve from_uri translation using the carrierroute module.
Carrierroute rewrites the R-URI because you normally want to route your message according them. So this is hardcoded in the logic of the module. The from uri user (like you've tried above) can be only used as the user part for the R-URI. Mangling your from uri is normally not related to routing decisions. But you can use the uac module functions to change this, for example.
Cheers,
Henning
Thanks Henning,
Carrierroute rewrites the R-URI because you normally want to route your message according them. So this is hardcoded in the logic of the module. The from uri user (like you've tried above) can be only used as the user part for the R-URI. Mangling your from uri is normally not related to routing decisions. But you can use the uac module functions to change this, for example.
I understood that CR module is a scalable way to do LCR, I was just hoping that I could get From Uri mangling using the same prefix table provided by the CR module without rewriting a script logic to do a prefix lookup and then use the UAC module. Maybe in a next release :p
Thanks a lot for providing us this module.
regards, rod.