[OpenSIPS-Users] casting eth0 to an avp param
Rik Broers
RBroers at motto.nl
Thu Jun 4 09:18:07 CEST 2015
Hi Tito
For portability have a look into M4, works great!
http://www.opensips.org/Documentation/Tools#toc1
You can put all the unique values in a defines file ☺
If your ETH0 is the same as the interface the packet is received on you could also use:
$Ri - reference to IP address of the interface where the request has been received
Kind regards,
Met vriendelijke groet,
Rik Broers
Voice Engineer
Van: users-bounces at lists.opensips.org [mailto:users-bounces at lists.opensips.org] Namens Tito Cumpen
Verzonden: woensdag 3 juni 2015 21:56
Aan: OpenSIPS users mailling list
Onderwerp: [OpenSIPS-Users] casting eth0 to an avp param
Does anyone know of a way to cast the eth0 to an avp ? Currently I am having to hard set it every time the route is called like this
event_route[E_UL_AOR_DELETE] {
fetch_event_params("aor=$avp(aor)");
$avp(param) = "x.x.x.x.x.";
$avp(param) = $avp(aor);
raise_event("UL_AOR_DELETE", $avp(param));
}
I need this value when passing an event to rabbitmqueue. I am wrapping the event in order to get the aor being deleted. My intention is to make this script more portable when spinning up a new instance with a different address.
Thanks,
Tito
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20150604/56121a69/attachment.htm>
More information about the Users
mailing list