Can anyone please give me a hint how to access the reply reason in failure_route - or is it really not possible to trigger some event on the response _reason_. 0(704) SIP Reply (status): 0(704) version: <SIP/2.0> 0(704) status: <404> 0(704) reason: <CLIR Inactive> <----- I want this!
There is a pseudo variable for that, but no function can search the replied reason! Is it really true, that you can use the reply status only (t_check_status("404"))?
Using avpops the pseude variables $rr and $rs are <null> at that moment. Do I miss something? I'm doing that: failure_route[3] { if (t_check_status("404") ) { avp_printf("$reason", "The reply: $rr, $rs"); log("\n----------------------------------------\n"); avp_print(); log("\n----------------------------------------\n"); } } resulting in: 0(740) DEBUG:avpops:print_avp: p=0xb6177838, flags=2 0(740) DEBUG: id=<32> 0(740) DEBUG: val_str=<The reply: <null>, <null>>
Any hints welcome. /Walter
In the failure_route is processed the original INVITE. You cannot have access to the reply. What you can do is to set a onreply_route for the INVITE and in this route to set some avps to reply code and reason. Since the failure_route is executed after the onreply_route you can check them in failure_route.
Cheers, Daniel
On 01/15/06 12:50, Walter Schober wrote:
Can anyone please give me a hint how to access the reply reason in failure_route - or is it really not possible to trigger some event on the response _reason_. 0(704) SIP Reply (status): 0(704) version: <SIP/2.0> 0(704) status: <404> 0(704) reason: <CLIR Inactive> <----- I want this! There is a pseudo variable for that, but no function can search the replied reason! Is it really true, that you can use the reply status only (t_check_status("404"))?
Using avpops the pseude variables $rr and $rs are <null> at that moment. Do I miss something? I'm doing that: failure_route[3] { if (t_check_status("404") ) { avp_printf("$reason", "The reply: $rr, $rs"); log("\n----------------------------------------\n"); avp_print(); log("\n----------------------------------------\n"); } } resulting in: 0(740) DEBUG:avpops:print_avp: p=0xb6177838, flags=2 0(740) DEBUG: id=<32> 0(740) DEBUG: val_str=<The reply: <null>, <null>>
Any hints welcome. /Walter
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Thanks for the tip! Currently I'm setting flags in the onreply_route() and use them then in failure_route(), which works, but is not nice. Need a lot of flags for that. Unfortunately the doc tells me, that I cannot use avpops in onreply_route(). 0(867) parse error (211,17-18): Command cannot be used in the block
Also found this issue in the archives on searching for "$rr" - that was the keyword!
/Walter
-----Original Message----- From: Daniel-Constantin Mierla [mailto:daniel@voice-system.ro] Sent: Sunday, January 15, 2006 1:08 PM To: Walter Schober Cc: users@openser.org Subject: Re: [Users] route on reply reason in failure_route
In the failure_route is processed the original INVITE. You cannot have access to the reply. What you can do is to set a onreply_route for the INVITE and in this route to set some avps to reply code and reason. Since the failure_route is executed after the onreply_route you can check them in failure_route.
Cheers, Daniel
On 01/15/06 12:50, Walter Schober wrote:
Can anyone please give me a hint how to access the reply reason in failure_route - or is it really not possible to trigger some event on the response _reason_. 0(704) SIP Reply (status): 0(704) version: <SIP/2.0> 0(704) status: <404> 0(704) reason: <CLIR Inactive> <----- I want this! There is a pseudo variable for that, but no function can search the replied reason! Is it really true, that you can use the reply status only (t_check_status("404"))?
Using avpops the pseude variables $rr and $rs are <null> at that moment. Do I miss something? I'm doing that: failure_route[3] { if (t_check_status("404") ) { avp_printf("$reason", "The reply: $rr, $rs"); log("\n----------------------------------------\n"); avp_print(); log("\n----------------------------------------\n"); } } resulting in: 0(740) DEBUG:avpops:print_avp: p=0xb6177838, flags=2 0(740) DEBUG: id=<32> 0(740) DEBUG: val_str=<The reply: <null>, <null>>
Any hints welcome. /Walter
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Anyone want's to know my solution?
route[3] { # forward to Mississippi t_on_failure("3"); t_on_reply("3"); t_relay_to_udp("proxy_which_cannot_play_announcments", "5060"); }
failure_route[3] { if (t_check_status("404") ) { if (isflagset(20)) { t_relay(); } } }
onreply_route[3] { if (t_check_status("404") ) { # if we get something like 404 - CFU Active, ... back if (search("404 CFB Active")) { setflag(20); rewriteuri("sip:ann404cfb1@announmentserver"); append_branch(); } else if (search("404 CFB Inactive")) { setflag(20); rewriteuri("sip:ann404cfb0@announmentserver"); append_branch(); } else if (search("404 CFNR Active")) { ... } } }
-----Original Message----- From: users-bounces@openser.org [mailto:users-bounces@openser.org] On Behalf Of Walter Schober Sent: Sunday, January 15, 2006 1:24 PM To: daniel@voice-system.ro Cc: users@openser.org Subject: RE: [Users] route on reply reason in failure_route
Thanks for the tip! Currently I'm setting flags in the onreply_route() and use them then in failure_route(), which works, but is not nice. Need a lot of flags for that. Unfortunately the doc tells me, that I cannot use avpops in onreply_route(). 0(867) parse error (211,17-18): Command cannot be used in the block
Also found this issue in the archives on searching for "$rr" - that was the keyword!
/Walter
-----Original Message----- From: Daniel-Constantin Mierla [mailto:daniel@voice-system.ro] Sent: Sunday, January 15, 2006 1:08 PM To: Walter Schober Cc: users@openser.org Subject: Re: [Users] route on reply reason in failure_route
In the failure_route is processed the original INVITE. You cannot have access to the reply. What you can do is to set a onreply_route for the INVITE and in this route to set some avps to reply code and reason. Since the failure_route is executed after the onreply_route you can check them in failure_route.
Cheers, Daniel
On 01/15/06 12:50, Walter Schober wrote:
Can anyone please give me a hint how to access the reply reason in failure_route - or is it really not possible to trigger some event on the response _reason_. 0(704) SIP Reply (status): 0(704) version: <SIP/2.0> 0(704) status: <404> 0(704) reason: <CLIR Inactive> <----- I want this! There is a pseudo variable for that, but no function can search the replied reason! Is it really true, that you can use the reply status only (t_check_status("404"))?
Using avpops the pseude variables $rr and $rs are <null> at that moment. Do I miss something? I'm doing that: failure_route[3] { if (t_check_status("404") ) { avp_printf("$reason", "The reply: $rr, $rs"); log("\n----------------------------------------\n"); avp_print(); log("\n----------------------------------------\n"); } } resulting in: 0(740) DEBUG:avpops:print_avp: p=0xb6177838, flags=2 0(740) DEBUG: id=<32> 0(740) DEBUG: val_str=<The reply: <null>, <null>>
Any hints welcome. /Walter
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
_______________________________________________ Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
On 01/15/06 14:24, Walter Schober wrote:
Thanks for the tip! Currently I'm setting flags in the onreply_route() and use them then in failure_route(), which works, but is not nice. Need a lot of flags for that. Unfortunately the doc tells me, that I cannot use avpops in onreply_route(). 0(867) parse error (211,17-18): Command cannot be used in the block
you are right, for the moment I forgot, the AVPs are not allowed to be used in onreply_route because there is no synchronization.
Cheers, Daniel
Also found this issue in the archives on searching for "$rr" - that was the keyword!
/Walter
-----Original Message----- From: Daniel-Constantin Mierla [mailto:daniel@voice-system.ro] Sent: Sunday, January 15, 2006 1:08 PM To: Walter Schober Cc: users@openser.org Subject: Re: [Users] route on reply reason in failure_route
In the failure_route is processed the original INVITE. You cannot have access to the reply. What you can do is to set a onreply_route for the INVITE and in this route to set some avps to reply code and reason. Since the failure_route is executed after the onreply_route you can check them in failure_route.
Cheers, Daniel
On 01/15/06 12:50, Walter Schober wrote:
Can anyone please give me a hint how to access the reply reason in failure_route - or is it really not possible to trigger some event on the response _reason_. 0(704) SIP Reply (status): 0(704) version: <SIP/2.0> 0(704) status: <404> 0(704) reason: <CLIR Inactive> <----- I want this! There is a pseudo variable for that, but no function can search the replied reason! Is it really true, that you can use the reply status only (t_check_status("404"))?
Using avpops the pseude variables $rr and $rs are <null> at that moment. Do I miss something? I'm doing that: failure_route[3] { if (t_check_status("404") ) { avp_printf("$reason", "The reply: $rr, $rs"); log("\n----------------------------------------\n"); avp_print(); log("\n----------------------------------------\n"); } } resulting in: 0(740) DEBUG:avpops:print_avp: p=0xb6177838, flags=2 0(740) DEBUG: id=<32> 0(740) DEBUG: val_str=<The reply: <null>, <null>>
Any hints welcome. /Walter
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users