[OpenSIPS-Users] parameters missing with event_datagram.so

Bogdan-Andrei Iancu bogdan at opensips.org
Mon Jan 22 11:21:43 UTC 2024


Hi,

Please carefully read the doc:
https://www.opensips.org/Documentation/Script-CoreFunctions-3-4#raise_event

/vals/ (var, optional) - AVP containing values attached to the event; if 
this parameter is missing, the raised event will not have any 
attributes, even if the /attrs/ parameter is provided.

^^^ this is your case, passing only "attrs", no "vals"

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   https://www.opensips-solutions.com
   https://www.siphub.com

On 17.01.2024 05:05, noname via Users wrote:
> Hi, OpenSIPS experts:
>
> OpenSIPS3.2.16
> CentOS7.9
>
> start `nc -u -l 1234`
> start `opensips`
>
> ```
> {"jsonrpc":"2.0","method":"E_MY_EVENT"}
> ```
> parameters missing.
>
> opensips.cfg:
>
> ```
> log_level=3
> xlog_level=3
> log_stderror=yes
> socket=udp:127.0.0.1:5060
> mpath="/usr/lib64/opensips/modules"
> loadmodule "signaling.so"
> loadmodule "sl.so"
> loadmodule "tm.so"
> modparam("tm", "fr_timeout", 5)
> modparam("tm", "fr_inv_timeout", 30)
> modparam("tm", "restart_fr_on_each_reply", 0)
> modparam("tm", "onreply_avp_mode", 1)
> loadmodule "event_datagram.so"
> loadmodule "proto_udp.so"
> route{
> send_reply(200,"OK");
> exit;
> }
> startup_route{
> subscribe_event("E_MY_EVENT", "udp:127.0.0.1:1234");
> route(FIRE_TEST);
> }
> route[FIRE_TEST]{
> $avp(attr) = 3;
> $avp(attr) = 5;
> raise_event("E_MY_EVENT", $avp(attr));
> }
> ```
>
> _______________________________________________
> 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/20240122/dcf13192/attachment.html>


More information about the Users mailing list