[OpenSIPS-Users] Raising an exported event with pseudo var

Tito Cumpen tito at xsvoce.com
Tue Aug 12 23:59:16 CEST 2014


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 <razvan at opensips.org> 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 listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20140812/fffb5d4d/attachment-0001.htm>


More information about the Users mailing list