Hello,
in openser 1.3 and current trunk the AVP script flags still not work as expected. So here again the fixes I did to solve that problems in 1.3 and trunk:
...
Hi again,
further tests with avp and script_flags raised new problems. When I write resp. set an AVP like "$avp(i1:10)=10; $avp(i2:10)=20;" and checking them with "xlog('L_INFO', 'avp(i1:10) avp(i1:20)\n');" it leads to "20 20" as output.
In file pvar.c in function pv_get_avp_name() I had to replace
*name_type = 0;
with
*name_type = ip->pvn.u.isname.type;
Then that worked.
- -.-
Additionally I fixed the Alias-Duplicate Problem when you do something like avp_aliases("A=i1:10; B=i2:20");
In file usr_avp.c I had to change line 427 in function check_avp_galias() from
type &= AVP_NAME_STR;
to
type &= (AVP_NAME_STR|AVP_SCRIPT_MASK);
- -.-
Then at last, if u want assign a value to an AVP-Alias which uses script flags replace in file usr_avp.c in function add_avp_galias() around line 482 the line
ga->avp.type = type&AVP_NAME_STR;
with
ga->avp.type = type&(AVP_NAME_STR|AVP_SCRIPT_MASK);
regards Helmut
On Friday 14 December 2007, Helmut Kuper wrote:
Hello,
in openser 1.3 and current trunk the AVP script flags still not work as expected. So here again the fixes I did to solve that problems in 1.3 and trunk: [..]
Hello Helmut,
could you please post a unified diff (diff -u or svn diff) from the needed changes?
Thank you,
Hennin
Hi,
ok, here they are. I did it seperately for openser 1.3 and trunk 3402 (openser 1.4)
regards helmut
Henning Westerholt schrieb:
On Friday 14 December 2007, Helmut Kuper wrote:
Hello,
in openser 1.3 and current trunk the AVP script flags still not work as expected. So here again the fixes I did to solve that problems in 1.3 and trunk: [..]
Hello Helmut,
could you please post a unified diff (diff -u or svn diff) from the needed changes?
Thank you,
Hennin
Hello,
can you send me the relevant parts of the configuration file? I want to reproduce the issue, maybe there are other side effects.
Cheers, Daniel
On 12/15/07 19:04, Helmut Kuper wrote:
Hi,
ok, here they are. I did it seperately for openser 1.3 and trunk 3402 (openser 1.4)
regards helmut
Henning Westerholt schrieb:
On Friday 14 December 2007, Helmut Kuper wrote:
Hello,
in openser 1.3 and current trunk the AVP script flags still not work as expected. So here again the fixes I did to solve that problems in 1.3 and trunk: [..]
Hello Helmut,
could you please post a unified diff (diff -u or svn diff) from the needed changes?
Thank you,
Hennin
Users mailing list Users@lists.openser.org http://lists.openser.org/cgi-bin/mailman/listinfo/users
Hi Daniel,
here are the config parts:
avp_aliases="A_status=i1:10; B_status=i2:10"
route{
$avp(i1:11)=111; $avp(i2:11)=222; $avp(A_status)=333; $avp(B_status)=444;
xlog("L_INFO", "$avp(A_status), $avp(B_status), $avp(i1:11), $avp(i2:11)\n");
if(!avp_db_load("$fu","i1")) { sl_send_reply("404", "Not Found - caller"); exit; }
if(!avp_db_load("$ru","i2")) { sl_send_reply("404", "Not Found - callee"); exit; }
avp_print();
}
Daniel-Constantin Mierla schrieb:
Hello,
can you send me the relevant parts of the configuration file? I want to reproduce the issue, maybe there are other side effects.
Cheers, Daniel
Hello,
I have tried: $avp(i1:22) = 22; $avp(i2:33) = 33;
resulting in:
Dec 17 23:40:43 [13418] INFO:avpops:ops_print_avp: p=0xb5b98fa8, flags=0x0200 Dec 17 23:40:43 [13418] INFO:avpops:ops_print_avp: id=<33> Dec 17 23:40:43 [13418] INFO:avpops:ops_print_avp: val_int=<33> Dec 17 23:40:43 [13418] INFO:avpops:ops_print_avp: p=0xb5b98f90, flags=0x0100 Dec 17 23:40:43 [13418] INFO:avpops:ops_print_avp: id=<22> Dec 17 23:40:43 [13418] INFO:avpops:ops_print_avp: val_int=<22>
And it is correct. The part with aliases does not work, as aliases were defined for names, not for flags, I sent you a reply: http://lists.openser.org/pipermail/users/2007-November/014472.html
I have it in the todo list to extend the aliases for avp flags as well.
Cheers, Daniel
On 12/17/07 13:12, Helmut Kuper wrote:
Hi Daniel,
here are the config parts:
avp_aliases="A_status=i1:10; B_status=i2:10"
route{
$avp(i1:11)=111; $avp(i2:11)=222; $avp(A_status)=333; $avp(B_status)=444; xlog("L_INFO", "$avp(A_status), $avp(B_status), $avp(i1:11),
$avp(i2:11)\n");
if(!avp_db_load("$fu","i1")) { sl_send_reply("404", "Not Found - caller"); exit; } if(!avp_db_load("$ru","i2")) { sl_send_reply("404", "Not Found - callee"); exit; } avp_print();
}
Daniel-Constantin Mierla schrieb:
Hello,
can you send me the relevant parts of the configuration file? I want to reproduce the issue, maybe there are other side effects.
Cheers, Daniel
Users mailing list Users@lists.openser.org http://lists.openser.org/cgi-bin/mailman/listinfo/users
Hi Daniel,
ok thanks for that. So I have to use my fix in the meanwhile and hope there is no side effect.
regards Helmut
Daniel-Constantin Mierla schrieb:
Hello,
I have tried: $avp(i1:22) = 22; $avp(i2:33) = 33;
resulting in:
Dec 17 23:40:43 [13418] INFO:avpops:ops_print_avp: p=0xb5b98fa8, flags=0x0200 Dec 17 23:40:43 [13418] INFO:avpops:ops_print_avp: id=<33> Dec 17 23:40:43 [13418] INFO:avpops:ops_print_avp: val_int=<33> Dec 17 23:40:43 [13418] INFO:avpops:ops_print_avp: p=0xb5b98f90, flags=0x0100 Dec 17 23:40:43 [13418] INFO:avpops:ops_print_avp: id=<22> Dec 17 23:40:43 [13418] INFO:avpops:ops_print_avp: val_int=<22>
And it is correct. The part with aliases does not work, as aliases were defined for names, not for flags, I sent you a reply: http://lists.openser.org/pipermail/users/2007-November/014472.html
I have it in the todo list to extend the aliases for avp flags as well.
Cheers,