Hello,
I'm using openser 1.1.0
I'd like to make a dinamic routing, the plan is radius set an avp, which contains the routeid, but my config is bad, and i don't know what can be the problem
route($avp(i:20)); don't work so i tryied this way:
switch($avp(i:20)) { case 0: route(0); break; case 1: route(1); break; case 2: route(2); break; }
but this is bad too, can anybody give me an advice?
the problem is in the line "switch($avp(i:20)) {" i guess, but switch can accept pseudo vars, so i don't kow what the problem caould be?
Thanks any help, Tamas
I think
if (avp_check("$avp(i:20)","eq/i:0/)) { route(13); exit; } else ...
should work. check the syntax of avp_check
regards klaus
Cseke Tamas wrote:
Hello,
I'm using openser 1.1.0
I'd like to make a dinamic routing, the plan is radius set an avp, which contains the routeid, but my config is bad, and i don't know what can be the problem
route($avp(i:20)); don't work so i tryied this way:
switch($avp(i:20)) { case 0: route(0); break; case 1: route(1); break; case 2: route(2); break; }
but this is bad too, can anybody give me an advice?
the problem is in the line "switch($avp(i:20)) {" i guess, but switch can accept pseudo vars, so i don't kow what the problem caould be?
Thanks any help, Tamas
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Hello,
Thanks, i tried this way.
avp_load_radius("callee");
if (is_avp_set("$avp(s:callee_routeid[0])")) { if (avp_check("$avp(s:callee_routeid[0])", "eq/i:0")) { route(0); } else if (avp_check("$avp(s:callee_routeid[0])", "eq/i:1")) { route(1); } }
Is it possible, that radius set an array of routeid, And try to use them in order, when first failed, the second etc?
is there a way, to somehow pop the first item of the array?
pop the first item, call route with this value, pop again set to t_on_failure() as argument on failure_route pop again and set the next avp to t_on_failure
Is it possible, or i'm dreaming? :9
Regards, Tamas
Klaus Darilion wrote:
I think
if (avp_check("$avp(i:20)","eq/i:0/)) { route(13); exit; } else ...
should work. check the syntax of avp_check
regards klaus
Cseke Tamas wrote:
Hello,
I'm using openser 1.1.0
I'd like to make a dinamic routing, the plan is radius set an avp, which contains the routeid, but my config is bad, and i don't know what can be the problem
route($avp(i:20)); don't work so i tryied this way:
switch($avp(i:20)) { case 0: route(0); break; case 1: route(1); break; case 2: route(2); break; }
but this is bad too, can anybody give me an advice?
the problem is in the line "switch($avp(i:20)) {" i guess, but switch can accept pseudo vars, so i don't kow what the problem caould be?
Thanks any help, Tamas
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Hello,
just to make it clear, the switch you try is valid with 1.2.0. For 1.1.0, the option given by Klaus in another email is the way to go.
Cheers, Daniel
On 02/09/07 14:30, Cseke Tamas wrote:
Hello,
I'm using openser 1.1.0
I'd like to make a dinamic routing, the plan is radius set an avp, which contains the routeid, but my config is bad, and i don't know what can be the problem
route($avp(i:20)); don't work so i tryied this way:
switch($avp(i:20)) { case 0: route(0); break; case 1: route(1); break; case 2: route(2); break; }
but this is bad too, can anybody give me an advice?
the problem is in the line "switch($avp(i:20)) {" i guess, but switch can accept pseudo vars, so i don't kow what the problem caould be?
Thanks any help, Tamas
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Hello,
Thanks the information!
Perhaps are the following commands valid in 1.2.0?
route($avp(s:callee_routeid[0])) t_on_failure($avp(s:callee_routeid[0]))
These would be the better solution for me.
And i need a method to pop the first element from the array of avps, like a fifo, is it possible ?
Thanks, Tamas
Daniel-Constantin Mierla wrote:
Hello,
just to make it clear, the switch you try is valid with 1.2.0. For 1.1.0, the option given by Klaus in another email is the way to go.
Cheers, Daniel
On 02/09/07 14:30, Cseke Tamas wrote:
Hello,
I'm using openser 1.1.0
I'd like to make a dinamic routing, the plan is radius set an avp, which contains the routeid, but my config is bad, and i don't know what can be the problem
route($avp(i:20)); don't work so i tryied this way:
switch($avp(i:20)) { case 0: route(0); break; case 1: route(1); break; case 2: route(2); break; }
but this is bad too, can anybody give me an advice?
the problem is in the line "switch($avp(i:20)) {" i guess, but switch can accept pseudo vars, so i don't kow what the problem caould be?
Thanks any help, Tamas
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Hello,
On 02/09/07 16:32, Cseke Tamas wrote:
Hello,
Thanks the information!
Perhaps are the following commands valid in 1.2.0?
route($avp(s:callee_routeid[0])) t_on_failure($avp(s:callee_routeid[0]))
unfortunately not, will have in mind for next one.
These would be the better solution for me.
And i need a method to pop the first element from the array of avps, like a fifo, is it possible ?
you can use avp_delete()/avp_copy() to delete/rename the first avp from the list and get access to the next one.
Cheers, Daniel
Thanks, Tamas
Daniel-Constantin Mierla wrote:
Hello,
just to make it clear, the switch you try is valid with 1.2.0. For 1.1.0, the option given by Klaus in another email is the way to go.
Cheers, Daniel
On 02/09/07 14:30, Cseke Tamas wrote:
Hello,
I'm using openser 1.1.0
I'd like to make a dinamic routing, the plan is radius set an avp, which contains the routeid, but my config is bad, and i don't know what can be the problem
route($avp(i:20)); don't work so i tryied this way:
switch($avp(i:20)) { case 0: route(0); break; case 1: route(1); break; case 2: route(2); break; }
but this is bad too, can anybody give me an advice?
the problem is in the line "switch($avp(i:20)) {" i guess, but switch can accept pseudo vars, so i don't kow what the problem caould be?
Thanks any help, Tamas
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users