[SR-Users] Rewrite From domain
Gonzalo Gasca Meza
gascagonzalo at gmail.com
Tue Dec 13 12:05:29 CET 2016
I'm using Kamailio to forward calls between 2 Service Providers and I need
to rewrite the From header "domain" URI.
From: "+18888888888" <sip:+18888888888 at sip.sp1.com> to
From: "+18888888888" <sip:+18888888888@*sip.sp2.com <http://sip.sp2.com>*>
Phone A --- > SP1 ---> sip ----> (kamailio) SP2 --(LOCATION)-> Phone B
When Phone A calls SP2 PhoneB, it contains original sip domain from sp1. (
sip.sp1.com) hence user in SP2 can see call comes from SP1. I would like to
rewrite the From domain field in this conditions:
a) Calls comes from "sip.sp1.com" AND
b) Call is being routed to PhoneB.
Right now Im using the following code to find user and send call to B.
# search in DB-based aliases
xlog("L_INFO","alias_db_lookup: Call received. $rU\n");
I found this in documentation:
$fd - From URI domain
But not sure where is the best place to overwrite the From URI domain
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the sr-users