Hi Doug,
instead of onreply_route() which catches all replies (including provisional ones), use failure_route() which catches only final negative replies:
route[10] { t_on_failure("35"); rewritehostport("pbx1-mgt0.ipt.oneeighty.com:5060"); if ( !t_relay() ) { xlog ("L_INFO","t_relay() returned error"); } else { xlog ("L_INFO","t_relay() returned ok"); } }
failure_route[35] { xlog ("L_INFO","Got some sort of reply"); if (t_check_status("603")) { xlog ("L_INFO","got a decline"); t_reply("603","Declined"); } return; }
regards, bogdan
Douglas Garstang wrote:
Why can't I do this??? Arrgh! I want to be able to call onreply_route[35] when we get a reply. So, not surprisingly, in onreply_route[35] I want to see what sort of reply I got, and then send ANOTHER reply back to the originater of the message telling them something was wrong. Why can't I use t_reply in a reply_route? What's the most likely away around this, because I sure must be missing something fundamental.
route[10] { t_on_failure("11"); t_on_reply("35"); rewritehostport("pbx1-mgt0.ipt.oneeighty.com:5060"); if ( !t_relay() ) { xlog ("L_INFO","t_relay() returned error"); } else { xlog ("L_INFO","t_relay() returned ok"); } }
onreply_route[35] { xlog ("L_INFO","Got some sort of reply"); if (t_check_status("603")) { xlog ("L_INFO","got a decline"); t_reply("603","Declined"); } return; }
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users