ERROR:core:evi_raise_script_event: too many attribute names

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

ERROR:core:evi_raise_script_event: too many attribute names

Arthur
Good day, I try to pass some params to my event handler (by this manual - https://www.opensips.org/Documentation/Tutorials-EventInterface), but when i pass more than 4 attributes it throws an error

    ERROR:core:evi_raise_script_event: too many attribute names

How can I pass more params, or maybe just serialize all vars to json and pass it to event handler?

--
​Arthur

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: ERROR:core:evi_raise_script_event: too many attribute names

Răzvan Crainea-2
Hi, Artur!

It seems you are adding more attributes than values. If you want to have a 4th attribute, you also need to add a value for it. Ie:

    $avp(attributes) = "param1";
    $avp(values) = "value1";
    $avp(attributes) = "param2";
    $avp(values) = "value2";
    $avp(attributes) = "param3"; # you cannot do this - you also have to set a value, like $avp(values) = "value3";

If you do this, you can pass as many parameters as you want.

Best regards,
Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com
On 09/09/2016 08:51 AM, Artur Mega wrote:
Good day, I try to pass some params to my event handler (by this manual - https://www.opensips.org/Documentation/Tutorials-EventInterface), but when i pass more than 4 attributes it throws an error

    ERROR:core:evi_raise_script_event: too many attribute names

How can I pass more params, or maybe just serialize all vars to json and pass it to event handler?

--
​Arthur


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users