I have almost all of the other parts of AVP functioning great but I can't seem to get avp_db_store to work from CVSHEAD. Below is an example and the debug. Not sure if it's my syntax or bug
Thanks for an help
if(uri=~"sip:*78@.*") { log(1, "LOG: Enable DND\n"); avp_write("$to/username", "$to_id"); avp_write("$from/username", "s:fromuser"); avp_db_load("$from/username", "s:7879"); avp_print(); avp_db_store("$from/username","i:7879"); rewritehostport ("xxx.yyy.83.5:5060"); route(9); break; };
8(22938) DEBUG:avpops:load_avps: loaded avps = 1 8(22938) DEBUG:avpops:print_avp: p=0xb61a8340, flags=B 8(22938) DEBUG: name=<7879> 8(22938) DEBUG: val_str=<> 8(22938) DEBUG:avpops:print_avp: p=0xb61a82e4, flags=3 8(22938) DEBUG: name=<fromuser> 8(22938) DEBUG: val_str=<4107358551> 8(22938) DEBUG:avpops:print_avp: p=0xb61a82a0, flags=2 8(22938) DEBUG: id=<57920> 8(22938) DEBUG: val_str=<*78> 8(22938) DEBUG:avpops:store_avps: 0 avps were stored
Hi Glenn
As first guess, you have different AVPs in load and save function - s:7879 and i:7879. Second, why do you load and than save the same AVP without any modifications?
Best regards, Marian
Glenn Dalgliesh wrote:
I have almost all of the other parts of AVP functioning great but I can't seem to get avp_db_store to work from CVSHEAD. Below is an example and the debug. Not sure if it's my syntax or bug
Thanks for an help
if(uri=~"sip:*78@.*") { log(1, "LOG: Enable DND\n"); avp_write("$to/username", "$to_id"); avp_write("$from/username", "s:fromuser"); avp_db_load("$from/username", "s:7879"); avp_print(); avp_db_store("$from/username","i:7879"); rewritehostport ("xxx.yyy.83.5:5060"); route(9); break; };
8(22938) DEBUG:avpops:load_avps: loaded avps = 1 8(22938) DEBUG:avpops:print_avp: p=0xb61a8340, flags=B 8(22938) DEBUG: name=<7879> 8(22938) DEBUG: val_str=<> 8(22938) DEBUG:avpops:print_avp: p=0xb61a82e4, flags=3 8(22938) DEBUG: name=<fromuser> 8(22938) DEBUG: val_str=<4107358551> 8(22938) DEBUG:avpops:print_avp: p=0xb61a82a0, flags=2 8(22938) DEBUG: id=<57920> 8(22938) DEBUG: val_str=<*78> 8(22938) DEBUG:avpops:store_avps: 0 avps were stored
Thanks I need an avp_write to set a value
avp_write("on", "s:7879"); avp_db_store("$from/username","s:7879");
-----Original Message----- From: Marian Dumitru [mailto:marian.dumitru@voice-sistem.ro] Sent: Tuesday, April 12, 2005 3:15 PM To: Glenn Dalgliesh Cc: serusers@lists.iptel.org Subject: Re: [Serusers] avp_db_store
Hi Glenn
As first guess, you have different AVPs in load and save function - s:7879 and i:7879. Second, why do you load and than save the same AVP without any modifications?
Best regards, Marian
Glenn Dalgliesh wrote:
I have almost all of the other parts of AVP functioning great but I can't seem to get avp_db_store to work from CVSHEAD. Below is an example and the debug. Not sure if it's my syntax or bug
Thanks for an help
if(uri=~"sip:*78@.*") { log(1, "LOG: Enable DND\n"); avp_write("$to/username", "$to_id"); avp_write("$from/username", "s:fromuser"); avp_db_load("$from/username", "s:7879"); avp_print(); avp_db_store("$from/username","i:7879"); rewritehostport ("xxx.yyy.83.5:5060"); route(9); break; };
8(22938) DEBUG:avpops:load_avps: loaded avps = 1 8(22938) DEBUG:avpops:print_avp: p=0xb61a8340, flags=B 8(22938) DEBUG: name=<7879> 8(22938) DEBUG: val_str=<> 8(22938) DEBUG:avpops:print_avp: p=0xb61a82e4, flags=3 8(22938) DEBUG: name=<fromuser> 8(22938) DEBUG: val_str=<4107358551> 8(22938) DEBUG:avpops:print_avp: p=0xb61a82a0, flags=2 8(22938) DEBUG: id=<57920> 8(22938) DEBUG: val_str=<*78> 8(22938) DEBUG:avpops:store_avps: 0 avps were stored