Hi!
If a failure route is executed - how can I distinguish between fr_timer timeout (a broken gateway) and fr_inv_timer timeout (nobdy took up the phone)?
thanks klaus
Hi Klaus,
if(method=="INVITE"){
t_on_reply("1"); t_on_failure("1"); } t_relay();
onreply_route[1]{
if(status("180|183")){ setflag("1"); }
failure_route[1]{ if(is_flaset("1"){ log(1,"It rang\r\n"); }else{ log(1,"It did'nt ring\r\n"); }
Something in the degrees of this ;)
- Atle
* Klaus Darilion klaus.mailinglists@pernau.at [070207 09:48]:
Hi!
If a failure route is executed - how can I distinguish between fr_timer timeout (a broken gateway) and fr_inv_timer timeout (nobdy took up the phone)?
thanks klaus
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Hi Atle!
Thanks for the quick response.
I thought there are some limitations inside reply route regarding flags - but apperently I was wrong.
regards klaus
* Klaus Darilion klaus.mailinglists@pernau.at [070207 10:03]:
Hi Atle!
Thanks for the quick response.
I thought there are some limitations inside reply route regarding flags - but apperently I was wrong.
Ah, Just be aware that there are "race-conditions" if you could call them that.. see scenario where you have 1 contact which is offline, and one wich is online.. ne rings the other is disconnectd.. then you would hit the "rining" entry.. but exept from that...
-Atle
regards klaus
-- ...the more I hear, the less I know ... (c) RHCP 2006
On Wed, February 7, 2007 9:55, Atle Samuelsen said:
Hi Klaus,
if(method=="INVITE"){
t_on_reply("1"); t_on_failure("1"); } t_relay();
onreply_route[1]{
if(status("180|183")){ setflag("1"); }
failure_route[1]{ if(is_flaset("1"){ log(1,"It rang\r\n"); }else{ log(1,"It did'nt ring\r\n"); }
Something in the degrees of this ;)
- Atle
- Klaus Darilion klaus.mailinglists@pernau.at [070207 09:48]:
Hi!
If a failure route is executed - how can I distinguish between fr_timer timeout (a broken gateway) and fr_inv_timer timeout (nobdy took up the phone)?
thanks klaus
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Hi Klaus,
that is an old and a bit heavy approach - you can directly use in failure route the t_local_replied() function: http://www.openser.org/docs/modules/1.2.x/tm.html#AEN438
if t_local_replied("all") is true, it means that all replies wee local generated, so nothing was received.
try in failure route: if (t_check_status("408") && _local_replied("all")) { }
regards, bogdan
Klaus Darilion wrote:
Hi Atle!
Thanks for the quick response.
I thought there are some limitations inside reply route regarding flags - but apperently I was wrong.
regards klaus