[OpenSIPS-Users] How to send multiple parameters to event handlers?

Mundkowsky, Robert rmundkowsky at ets.org
Wed Mar 28 11:00:22 EDT 2018


I am using openSIPS 2.2.3 to send events to an external handler via XMLRPC.

The external handler is a XMLRPC daemon written in Python.

The events are sent correctly, but you can only send two parameters based on the "raise_event" function (https://www.opensips.org/Documentation/Script-CoreFunctions-2-2#toc28) .

I tried using AVP variables to pass multiple parameters, but the python handler only sees the last variable set.

For example, in the opensips.cfg file I have:

startup_route {
        subscribe_event("E_SOME_EVENT", "xmlrpc:127.0.0.1:8000:e_dummy_h");
}
...
$avp(attr-val) = NULL;
$avp(attr-val) = "BBB";
$avp(attr-val) = "DDD";
$avp(attr-name) = NULL;
$avp(attr-name) = "AAA";
$avp(attr-name) = "CCC";
raise_event("E_SOME_EVENT", $avp(attr-name), $avp(attr-val));

But the python script only receives the last set values ("DDD" and "CCC").

________________________________

This e-mail and any files transmitted with it may contain privileged or confidential information. It is solely for use by the individual for whom it is intended, even if addressed incorrectly. If you received this e-mail in error, please notify the sender; do not disclose, copy, distribute, or take any action in reliance on the contents of this information; and delete it from your system. Any other use of this e-mail is prohibited.


Thank you for your compliance.

________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20180328/52f41575/attachment.html>


More information about the Users mailing list