<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<font face="monospace">Hi,<br>
<br>
Please carefully read the doc:<br>
<a class="moz-txt-link-freetext" href="https://www.opensips.org/Documentation/Script-CoreFunctions-3-4#raise_event">https://www.opensips.org/Documentation/Script-CoreFunctions-3-4#raise_event</a><br>
<br>
</font><em>vals</em> (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 <em>attrs</em>
parameter is provided.
<br>
<font face="monospace"><br>
^^^ this is your case, passing only "attrs", no "vals"<br>
<br>
Regards,<br>
<br>
</font>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>
<a class="moz-txt-link-freetext" href="https://www.siphub.com">https://www.siphub.com</a></pre>
<div class="moz-cite-prefix">On 17.01.2024 05:05, noname via Users
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:tencent_9F9C38A1049E8102B7349E598893912CEC09@qq.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<div>Hi, OpenSIPS experts:</div>
<div><br>
</div>
<div>OpenSIPS3.2.16</div>
<div>CentOS7.9</div>
<div><br>
</div>
<div>start `nc -u -l 1234`</div>
<div>start `opensips`</div>
<div><br>
</div>
<div>```</div>
<div><span
style="background-color: rgb(238, 240, 244); color: rgb(79, 79, 79); font-family: -apple-system, "SF UI Text", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif, SimHei, SimSun; font-size: 16px;">{"jsonrpc":"2.0","method":"E_MY_EVENT"}</span></div>
<div><span
style="background-color: rgb(238, 240, 244); color: rgb(79, 79, 79); font-family: -apple-system, "SF UI Text", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif, SimHei, SimSun; font-size: 16px;">```</span></div>
<div>parameters missing.</div>
<div><br>
</div>
<div>opensips.cfg:</div>
<div><br>
</div>
<div>```</div>
<div>
<div>log_level=3</div>
<div>xlog_level=3</div>
<div>log_stderror=yes</div>
<div> </div>
<div>socket=udp:127.0.0.1:5060</div>
<div>mpath="/usr/lib64/opensips/modules"</div>
<div> </div>
<div>loadmodule "signaling.so"</div>
<div>loadmodule "sl.so"</div>
<div> </div>
<div>loadmodule "tm.so"</div>
<div>modparam("tm", "fr_timeout", 5)</div>
<div>modparam("tm", "fr_inv_timeout", 30)</div>
<div>modparam("tm", "restart_fr_on_each_reply", 0)</div>
<div>modparam("tm", "onreply_avp_mode", 1)</div>
<div> </div>
<div>loadmodule "event_datagram.so"</div>
<div>loadmodule "proto_udp.so"</div>
<div> </div>
<div>route{</div>
<div><span style="white-space: normal;"><span
style="white-space:pre"> </span>send_reply(200,"OK");</span></div>
<div><span style="white-space: normal;"><span
style="white-space:pre"> </span>exit;</span></div>
<div>}</div>
<div> </div>
<div>startup_route{</div>
<div><span style="white-space: normal;"><span
style="white-space:pre"> </span>subscribe_event("E_MY_EVENT",
"udp:127.0.0.1:1234");</span></div>
<div><span style="white-space: normal;"><span
style="white-space:pre"> </span>route(FIRE_TEST);</span></div>
<div>}</div>
<div> </div>
<div>route[FIRE_TEST]{</div>
<div><span style="white-space: normal;"><span
style="white-space:pre"> </span>$avp(attr) = 3;</span></div>
<div><span style="white-space: normal;"><span
style="white-space:pre"> </span>$avp(attr) = 5;</span></div>
<div><span style="white-space: normal;"><span
style="white-space:pre"> </span>raise_event("E_MY_EVENT",
$avp(attr));</span></div>
<div>}</div>
</div>
<div>```</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>