Răzvan Crainea, Thank you for your very helpful and insightful reply. The issue I encountered using a pseudo variable during an event route is that they are based on a route request on the sip interface. Which means $Ri would have no entries when UL aor_delete event/route are called. The reason I need this variable to be passed is to identify which server raised the event. Would you recommend using an avp that contains the primary ip?
On Mon, Aug 4, 2014 at 4:20 AM, Răzvan Crainea <[email protected]> wrote: > Hi, Tito! > > Unfortunately there is no mechanism to add extra information for static > events. > However, there is a workaround for this: you can register a custom event: > > startup_route { > subscribe_event("E_MY_UL_AOR_DELETE", "rabbitmq:127.0.0.1/reg"); > } > > Then catch the initial event in an event_route and raise the custome event: > > event_route[E_UL_AOR_DELETE] { > fetch_event_params("aor=$avp(aor)"); > $avp(param) = $Ri; > $avp(param) = $avp(aor); > raise_event("E_MY_UL_AOR_DELETE", "$avp(param)"); > } > So basically you have to add some kind of a wrapper on the original event > where you can add extra information. The same thing should be done for the > INSERT event. I hope this helpls. > > Best regards, > Răzvan > > > On 08/01/2014 11:53 PM, Tito Cumpen wrote: > > Group, > > > Can anyone share the procedure in which I can raise and exported event > and include a pseudo variable in the body? I need $Ri to be included to > provide a sense of identification as to which server is raising the event > > > > startup_route { > > subscribe_event("E_UL_AOR_DELETE", "rabbitmq: > 127.0.0.1/reg"); > > subscribe_event("E_UL_AOR_INSERT", "rabbitmq: > 127.0.0.1/reg"); > > > } > > I am getting a payload that defines the user being added and deleted but I > I wish to include the server which raised the event in the body as well. > > > > Thanks, > > Tito > > > _______________________________________________ > Users mailing > [email protected]http://lists.opensips.org/cgi-bin/mailman/listinfo/users > > > > _______________________________________________ > Users mailing list > [email protected] > http://lists.opensips.org/cgi-bin/mailman/listinfo/users > >
_______________________________________________ Users mailing list [email protected] http://lists.opensips.org/cgi-bin/mailman/listinfo/users
