Hi,
I use Kamailio for basic call setup with one exception where it has to route call to
another server by seeing the domain name in the Request URI.
If the Request uri in the received INVITE message looks like
"sip12345@video-conf", then it should route the INVITE request to the video-conf
server by resolving the domain name. I changed the config file kamailio.cfg as given
below.
route[SIPOUT] {
if (!uri==myself)
{
append_hf("P-hint: outbound\r\n");
# AKS: call routing
if (uri=~".*@video-conf")
{
rewritehost("video-conf");
}
# AKS
route(RELAY);
}
}
It resolves the domain name and routes the INVITE message to the resolved IP address.
However it uses the domain name in the Request line and To header and I need to replace
domain with the resolved IP address in the Request URI and To header.
Now Request URI and To header look like "INVITE sip:12345@video-conf" and
"To: <sip:12345:video-conf>" respectively and I need them as "INVITE
sip:12345@video-conf" and "To: <sip:12345:video-conf>".
I don't have any knowledge in tweaking kamailio. I tried some tricks like the
following by going through documents and pervious emails in the forum. But it didn't
work. Some of them have spoken about avp and pseudo variables. But I am getting confused
as I have just begun using Kamailio and it is vast.
# $ru = "sip:" + $rU + "@" + to_ip;
I will appreciate if you could help me or guide me in right direction.
Thanks,
Ajay