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

Bogdan-Andrei Iancu bogdan at opensips.org
Wed Apr 4 11:44:02 EDT 2018


Hi Robert,

Sorry for the late reply, the 2.4 release sucked all our time.

So, by looking at the network level, you see only the last set (of 
attr=val) being sent over ?

Best regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   http://www.opensips-solutions.com
OpenSIPS Summit 2018
   http://www.opensips.org/events/Summit-2018Amsterdam

On 03/28/2018 06:16 PM, Mundkowsky, Robert wrote:
>
> 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 at 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 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/20180404/37975a63/attachment.html>


More information about the Users mailing list