Could any help me to find way to extract IP & Port from route header received (which is on the SIP INVITE received from a remote server).
KAMAILO ----> A Server
A - Server is appending router header with destination IP address like below.
A Server ----> KAMAILIO
Route: <sip:<KAMILIO IP (Unchanged)>:5060;lr>,<sip:<B-Server>:5060;lr>
Here i need to extract the destination server (B-Server) IP & Port from received route header in the SIP INVITE.
KAMAILI ----> B - Server
i have found below from kamailio forum for extracting VIA header using select method, but i am not sure how to use the right variable for Route header.
onreply_route[MANAGE_REPLY] {
...
if(search_hf("Via", "received", "f")) {
xdbg("received param exists on top most via header \n");
$var(public_ip) = $sel(via.received);
}
...
}
please help.
thanks in advance.