I'm trying to arm the failure route for a message sent via uac_req_send - similar to:
{ $uac_req(method)="OPTIONS"; $uac_req(ruri)="sip:kamailio.org"; $uac_req(furi)="sip:kamailio.org"; $uac_req(turi)="sip:kamailio.org";
t_on_failure("UAC_FAIL"); uac_req_send(); }
failure_route("UAC_FAIL") { xlog ...... }
If there is no response from the remote server, kamailio resends until the timers expire; but the failure route is not run. Similarly, if a 404 is sent back from the remote server, the failure route is not run.
Am I missing something obvious?
Thanks
It is, unfortunately, not possible. The uac_req_send() requests fly under the radar of TM state.
-- This message was painstakingly thumbed out on my mobile, so apologies for brevity, errors, and general sloppiness.
Alex Balashov - Principal Evariste Systems LLC 260 Peachtree Street NW Suite 2200 Atlanta, GA 30303 Tel: +1-678-954-0670 Fax: +1-404-961-1892 Web: http://www.evaristesys.com/
On Jan 16, 2012, at 5:08 PM, Nathan Angelacos nangel@nothome.org wrote:
I'm trying to arm the failure route for a message sent via uac_req_send - similar to:
{ $uac_req(method)="OPTIONS"; $uac_req(ruri)="sip:kamailio.org"; $uac_req(furi)="sip:kamailio.org"; $uac_req(turi)="sip:kamailio.org";
t_on_failure("UAC_FAIL"); uac_req_send(); }
failure_route("UAC_FAIL") { xlog ...... }
If there is no response from the remote server, kamailio resends until the timers expire; but the failure route is not run. Similarly, if a 404 is sent back from the remote server, the failure route is not run.
Am I missing something obvious?
Thanks
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
On 01/16/2012 02:10 PM, Alex Balashov wrote:
On Jan 16, 2012, at 5:08 PM, Nathan Angelacosnangel@nothome.org wrote:
I'm trying to arm the failure route for a message sent via uac_req_send - similar to:
{ $uac_req(method)="OPTIONS"; $uac_req(ruri)="sip:kamailio.org"; $uac_req(furi)="sip:kamailio.org"; $uac_req(turi)="sip:kamailio.org";
t_on_failure("UAC_FAIL"); uac_req_send(); }
failure_route("UAC_FAIL") { xlog ...... }
If there is no response from the remote server, kamailio resends until the timers expire; but the failure route is not run. Similarly, if a 404 is sent back from the remote server, the failure route is not run.
Am I missing something obvious?
Thanks
It is, unfortunately, not possible. The uac_req_send() requests fly
under the radar of TM state.
Thanks for the quick response Alex!
As an alternative, this seems to work, although seems hackish; better suggestions welcomed.
mhomed=1
route { ... if (( $ru == "sip:deadbeef@127.0.0.1" ) && ($ri == "127.0.01") ) { $ru = "sip:kamailio.org"; t_on_failure("UAC_FAIL"); t_relay(); exit; } ...
$uac_req(ruri)="sip:deadbeef@127.0.0.1"; ... uac_req_send(); }
I once had a similar problem. In my case I just "pinged" other hosts and wanted to know if they are alive. I solved it by reversing the logic - not reacting on errors but reacting on successful responses. Reply routes work fine with uac_req_send.
regards Klaus
On 17.01.2012 01:16, Nathan Angelacos wrote:
On 01/16/2012 02:10 PM, Alex Balashov wrote:
On Jan 16, 2012, at 5:08 PM, Nathan Angelacosnangel@nothome.org wrote:
I'm trying to arm the failure route for a message sent via uac_req_send - similar to:
{ $uac_req(method)="OPTIONS"; $uac_req(ruri)="sip:kamailio.org"; $uac_req(furi)="sip:kamailio.org"; $uac_req(turi)="sip:kamailio.org";
t_on_failure("UAC_FAIL"); uac_req_send(); }
failure_route("UAC_FAIL") { xlog ...... }
If there is no response from the remote server, kamailio resends until the timers expire; but the failure route is not run. Similarly, if a 404 is sent back from the remote server, the failure route is not run.
Am I missing something obvious?
Thanks
It is, unfortunately, not possible. The uac_req_send() requests fly
under the radar of TM state.
Thanks for the quick response Alex!
As an alternative, this seems to work, although seems hackish; better suggestions welcomed.
mhomed=1
route { ... if (( $ru == "sip:deadbeef@127.0.0.1" ) && ($ri == "127.0.01") ) { $ru = "sip:kamailio.org"; t_on_failure("UAC_FAIL"); t_relay(); exit; } ...
$uac_req(ruri)="sip:deadbeef@127.0.0.1"; ... uac_req_send(); }
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users