Sorry !!
I just notice that I used the avp once like "Sfeaturetype" and on the other
hand like "SfeatureType" (the "t" or "T"......)
Sorry again,
BR,
Uri
On Sun, Aug 12, 2012 at 2:50 PM, Uri Shacked <ushacked(a)gmail.com> wrote:
Hi,****
** **
I encountered a problem. While doing some avp's settings I notice that one
avp that I use is changing to <null> without me doing anything.****
** **
Here is the part of the cfg file:****
………….****
………….****
Route[SET]{****
…………..****
$avp(Sfeaturetype)=$avp(next_feature_type);****
…………****
Route(DIDSRV);****
}****
** **
route[DIDSRV] {****
xlog("L_CRIT","$C(rg) SCRIPT: in DIDSRV type = $avp(Sfeaturetype), index
=
$avp(SfeatureIndx) $C(xx)\n");****
if($var(srvcount)>3){****
xlog("L_NOTICE","$C(rg)Too many services loops $C(xx)\n");****
update_stat("nts_subs_srv_loop", "+1");****
$avp(TRMCS)="10";****
t_reply(403,"too many loops");****
exit;****
}****
$var(srvcount)=($var(srvcount)+1);****
xlog("L_CRIT","$C(rg) SCRIPT: in DIDSRV before switch to
$avp(SfeatureType) or $avp(next_feature_type) $C(xx)\n");****
switch ($avp(SfeatureType)){****
case "0" :****
……….****
………****
** **
On the route "SET" I put the value from the $avp(next_feature_type) in
$avp(Sfeaturetype).****
After that I call the route "DIDSRV" and use switch($avp(Sfeaturetype)).
Before the switch I xlog the value of the avp twice.****
As you can see in the log below, on the first xlog print, the value is 0
(as I expect). On the second print it resets to <null>****
WHY?****
** **
Log:****
Aug 12 13:38:50 net-ivr-KamIN-Test kamailio[29309]: <core>
[mem/q_malloc.c:413]: qm_malloc(0x7fe6f9aff000, 72) returns address
0x7fe6fcc4d330 frag. 0x7fe6fcc4d300 (size=72) on 1 -th hit****
Aug 12 13:38:50 net-ivr-KamIN-Test kamailio[29309]: CRITICAL: <script>:
#033[0;31;42m SCRIPT: before DIDSRV type = 0, index = 8888888889
#033[0;39;49m****
Aug 12 13:38:50 net-ivr-KamIN-Test kamailio[29309]: CRITICAL: <script>:
#033[0;31;42m SCRIPT*: in DIDSRV type = 0*, index = 8888888889
#033<8888888889%C2%A0%20%23033>
[0;39;49m****
Aug 12 13:38:50 net-ivr-KamIN-Test kamailio[29309]: <core>
[mem/q_malloc.c:369]: qm_malloc(0x7fe7ff765010, 848) called from <core>:
rvalue.c: rval_new_empty(236)****
Aug 12 13:38:50 net-ivr-KamIN-Test kamailio[29309]: <core>
[mem/q_malloc.c:413]: qm_malloc(0x7fe7ff765010, 848) returns address
0x7fe7ff8f25b0 frag. 0x7fe7ff8f2580 (size=1232) on 1 -th hit****
Aug 12 13:38:50 net-ivr-KamIN-Test kamailio[29309]: <core>
[mem/q_malloc.c:437]: qm_free(0x7fe7ff765010, 0x7fe7ff8f25b0), called from
<core>: rvalue.c: rval_destroy(141)****
Aug 12 13:38:50 net-ivr-KamIN-Test kamailio[29309]: <core>
[mem/q_malloc.c:461]: qm_free: freeing frag. 0x7fe7ff8f2580 alloc'ed from
<core>: rvalue.c: rval_new_empty(236)****
Aug 12 13:38:50 net-ivr-KamIN-Test kamailio[29309]: CRITICAL: <script>:
#033[0;31;42m SCRIPT*: in DIDSRV before switch to <null>* or 0
#033[0;39;49m****
Aug 12 13:38:50 net-ivr-KamIN-Test kamailio[29309]: <core>
[mem/q_malloc.c:369]: qm_malloc(0x7fe7ff765010, 928) called from <core>:
rvalue.c: rval_new_empty(236)****
Aug 12 13:38:50 net-ivr-KamIN-Test kamailio[29309]: <core>
[mem/q_malloc.c:413]: qm_malloc(0x7fe7ff765010, 928) returns address
0x7fe7ff8f25b0 frag. 0x7fe7ff8f2580 (size=1232) on 1 -th hit****
Aug 12 13:38:50 net-ivr-KamIN-Test kamailio[29309]: <core>
[mem/q_malloc.c:437]: qm_free(0x7fe7ff765010, 0x7fe7ff8f25b0), called from
<core>: rvalue.c: rval_destroy(141)****
Aug 12 13:38:50 net-ivr-KamIN-Test kamailio[29309]: <core>
[mem/q_malloc.c:461]: qm_free: freeing frag. 0x7fe7ff8f2580 alloc'ed from
<core>: rvalue.c: rval_new_empty(236)