[OpenSIPS-Users] Dispatcher module needs Integer instead of String
Răzvan Crainea
razvan at opensips.org
Wed Nov 20 14:18:04 CET 2013
Hi, Samuel!
Since OpenSIPS 1.7 all AVPs names are strings, no matter how you specify
them. However, your problem is that you are using the port value (not
name) as a string. The correct code is:
...
$avp(i:my_port) = 5060;
if (ds_is_in_list("$avp(my_ip)","$avp(my_port)","1","1")) {
...
Or, in order to eliminate the deprecated warning:
...
$avp(my_port) = 5060;
if (ds_is_in_list("$avp(my_ip)","$avp(my_port)","1","1")) {
...
Best regards,
Răzvan Crainea
OpenSIPS Core Developer
http://www.opensips-solutions.com
On 11/20/2013 03:03 PM, Samuel Muller wrote:
> Hey,
>
> I would like to be sure that since Opensips 1.9 (or 1.10 ?), all AVPs
> are strings only ?
>
> if yes, the dispatcher module should be updated consequently I suppose :
>
> $avp(my_ip) = "1.2.3.4";
> $avp(i:my_port) = "5060";
> if (ds_is_in_list("$avp(my_ip)","$avp(i:my_port)","1","1")) {
> do_something("in_your_life");
> }
>
> Opensips logs :
>
> WARNING:core:parse_avp_spec: Deprecated AVP name format "i:my_port" -
> use "my_port" instead
> ERROR:dispatcher:ds_is_in_list: PORT PV val is not integer
>
> Regards,
>
>
> Samuel MULLER
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
More information about the Users
mailing list