[OpenSIPS-Devel] [ opensips-Bugs-3154271 ] Dialplan error: fail to build rule
SourceForge.net
noreply at sourceforge.net
Wed Jan 12 13:13:45 CET 2011
Bugs item #3154271, was opened at 2011-01-10 15:01
Message generated for change (Comment added) made by zmedve36
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3154271&group_id=232389
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: 1.6.x
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Zoltan Medve (zmedve36)
>Assigned to: Bogdan-Andrei Iancu (bogdan_iancu)
Summary: Dialplan error: fail to build rule
Initial Comment:
Using postgres and opensips 1.6.4
When starting/restarting opensips I got this message:
...
DBG:dialplan:build_rule: building subst rule
ERROR:dialplan:build_rule: values 5 is NULL - not allowed
WARNING:dialplan:dp_load_db: failed to build rule -> skipping
...
The dialplan contains only one row:
id | dpid | pr | match_op | match_exp | match_len | subst_exp | repl_exp | attrs
----+------+----+----------+-----------------------+-----------+-----------+----------+--------
8 | 1 | 0 | 1 | ^[a-zA-Z][0-9A-Za-z]+ | 0 | | | usrloc
(1 row)
----------------------------------------------------------------------
>Comment By: Zoltan Medve (zmedve36)
Date: 2011-01-12 13:13
Message:
After some investigation I've checked /modules/dialplan/dp_db.c
It seems the problem is an extra conditional in 1.6.4:
--- opensips 1.6.2 ---
#define GET_STR_VALUE(_res, _values, _index)\
do{\
(_res).s = VAL_STR((_values)+ (_index)).s;\
(_res).len = strlen(VAL_STR((_values)+ (_index)).s);\
}while(0);
--- ---
--- opensips 1.6.4 ---
#define GET_STR_VALUE(_res, _values, _index)\
do{\
if ( VAL_NULL((_values)+ (_index)) ) { \
LM_ERR(" values %d is NULL - not
allowed\n",_index);\
goto err;\
} \
(_res).s = VAL_STR((_values)+ (_index)).s;\
(_res).len = strlen(VAL_STR((_values)+ (_index)).s);\
}while(0);
--- ---
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3154271&group_id=232389
More information about the Devel
mailing list