Well, after getting the json module to work in opensips 2.2, found it properly lot easier to concatenate parameters with some delimiter and then separate them on the event handler side.
Robert Mundkowsky From: Mundkowsky, Robert Sent: Wednesday, March 28, 2018 11:33 AM To: 'OpenSIPS users mailling list' <users@lists.opensips.org> Subject: RE: How to send multiple parameters to event handlers? Maybe it is possible to pack parameters together using the JSON library? http://www.opensips.org/html/docs/modules/2.2.x/json.html#idp93456 Robert Mundkowsky From: Mundkowsky, Robert Sent: Wednesday, March 28, 2018 11:16 AM To: 'OpenSIPS users mailling list' <users@lists.opensips.org<mailto:users@lists.opensips.org>> Subject: RE: How to send multiple parameters to event handlers? I just looked at the actual data being sent via tcpdump and openSIPS is not sending multiple values, just the last values set. Is there some easy way to send multiple values over XMLRPC? Robert From: Mundkowsky, Robert Sent: Wednesday, March 28, 2018 11:00 AM To: OpenSIPS users mailling list <users@lists.opensips.org<mailto:users@lists.opensips.org>> Subject: How to send multiple parameters to event handlers? 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. ________________________________
_______________________________________________ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users