Hello,
On 3/11/11 3:03 AM, Asgaroth wrote:
Hi All,
I have a requirement to perform some processing based on the source and
destination addresses on a message in on_reply route. I can get source
ip address using $si pseudo variable, but I cant seem to access the
destination ($dd).
Is there any way I can access destination ip/domain of message in
on_reply route?
an easy (classic way) to do it is to store the the source IP of
request
(the IP address of sender) before t_relay() in an avp:
$avp(reqsrcip) = $si;
The in onreply_route you have access to source IP of reply which is the
IP address of the destination for request.
Assuming you are using kamailio 3.x, then all avps you set for request
are available in the onreply_route and you can do what ever operations
you need now with $avp(reqsrcip) and $si.
Cheers,
Daniel
--
Daniel-Constantin Mierla
http://www.asipto.com