Sorry for resuming the post.. I can't understand how to handle failure messages after parallel forking. I need a particular configuration or OpenSER must handle them the same way of a single message? I'm using OpenSER 1.2.3-tls and also using debug mode I can't see nothing special. Thanks.
Regards, Antonio.
2008/4/15, Antonio Reale ant.reale@gmail.com:
Hi all, I have a Linksys SPA2102 with 2 phones configured with the same account/number. If I call that number both phones ring and all is OK. The problem is that if I set a call forwarding on one of the two line on the SPA only one phone rings. Openser receives the 302 message from the SPA but the failure route that contains t_check_status("302") is not called. The forwarding works if only one line is connected. How can I handle the 302 in this situation? Thanks in advance.
Regards, Antonio.
Hi Antonio,
The problem is that you miss-understand the the parallel forking and the failure route mechanism. Failure route is called only when the transaction is completed and this means when all the branches are completed. So, if one of your SPAs is sending 302, this will not hit failure route as you still have the second branch still ringing. Only if the second branch will fail too, the whole transaction will fail and the failure route will be called.
For a better understanding, see: http://www.voice-sistem.ro/downloads/2007.08.29-Admin-Course/
There is detailed explanation about openser routes.
Regards, Bogdan
Antonio Reale wrote:
Sorry for resuming the post.. I can't understand how to handle failure messages after parallel forking. I need a particular configuration or OpenSER must handle them the same way of a single message? I'm using OpenSER 1.2.3-tls and also using debug mode I can't see nothing special. Thanks.
Regards, Antonio.
2008/4/15, Antonio Reale <ant.reale@gmail.com mailto:ant.reale@gmail.com>:
Hi all, I have a Linksys SPA2102 with 2 phones configured with the same account/number. If I call that number both phones ring and all is OK. The problem is that if I set a call forwarding on one of the two line on the SPA only one phone rings. Openser receives the 302 message from the SPA but the failure route that contains t_check_status("302") is not called. The forwarding works if only one line is connected. How can I handle the 302 in this situation? Thanks in advance. Regards, Antonio.
Users mailing list Users@lists.openser.org http://lists.openser.org/cgi-bin/mailman/listinfo/users
Bogdan-Andrei Iancu writes:
The problem is that you miss-understand the the parallel forking and the failure route mechanism. Failure route is called only when the transaction is completed and this means when all the branches are completed.
this reminds me hat figure 2.3 of OPENSER Devel Guide is misleading in this regard. i understand that he figure is not an essential part of the guide.
-- juha
Hi Juha,
I will take a look a fix it.
regards, bogdan
Juha Heinanen wrote:
Bogdan-Andrei Iancu writes:
The problem is that you miss-understand the the parallel forking and the failure route mechanism. Failure route is called only when the transaction is completed and this means when all the branches are completed.
this reminds me hat figure 2.3 of OPENSER Devel Guide is misleading in this regard. i understand that he figure is not an essential part of the guide.
-- juha
Bogdan, thank you very much for help.
2008/4/16, Bogdan-Andrei Iancu bogdan@voice-system.ro:
So, if one of your SPAs is sending 302, this will not hit failure route as
you still have the second branch still ringing. Only if the second branch will fail too, the whole transaction will fail and the failure route will be called.
So can I intercept the 302 response in an onreply_route? I tryied to put the below configuration taken from sipwise inside the onreply_route but some of the used functions cannot be used in the onreply_route.
----------------------------------------------------------------------------------------------------------------------- if(t_check_status("301|302")) { avp_delete("$avp(s:acc_caller_user)/g"); avp_delete("$avp(s:acc_caller_domain)/g"); avp_delete("$avp(s:acc_state)/g"); avp_copy("$avp(s:acc_callee_user)", "$avp(s:acc_caller_user)"); avp_copy("$avp(s:acc_callee_domain)", "$avp(s:acc_caller_domain)"); $avp(s:acc_state) = "cfc"; setflag(29); if(!get_redirects("1:1")) {
xlog("L_ERROR", "Failed to fetch contact '$ct' from 301/302 - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n"); acc_db_request("480", "acc"); t_reply("480", "Temporarily Unavailable"); exit; } # get last URI from destination-set and set it as R-URI avp_delete("$avp(s:tmp)/g"); $avp(s:tmp) = $ds; avp_subst("$avp(s:tmp)", "/.*(sip:.+@[^:;>]+).*$/\1/"); avp_pushto("$ru", "$avp(s:tmp)"); setflag(29); append_branch();
t_on_branch("1"); xlog("L_INFO", "Redirect from UAC intercepted - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n"); route(13); exit; }
t_on_branch("1"); xlog("L_INFO", "CFC detected - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n"); route(13); -----------------------------------------------------------------------------------------------------
Regards,
Bogdan
Best regards, Antonio.
(Sorry... losed quotation symbol in the last post)
Bogdan, thank you very much for help.
2008/4/16, Bogdan-Andrei Iancu bogdan@voice-system.ro:
So, if one of your SPAs is sending 302, this will not hit failure route as
you still have the second branch still ringing. Only if the
second branch will fail too, the whole transaction will fail and the
failure route will be called.
So can I intercept the 302 response in an onreply_route? I tryied to put the below configuration taken from sipwise inside the onreply_route but some of the used functions cannot be used in the onreply_route.
----------------------------------------------------------------------------------------------------------------------- if(t_check_status("301|302")) { avp_delete("$avp(s:acc_caller_user)/g"); avp_delete("$avp(s:acc_caller_domain)/g"); avp_delete("$avp(s:acc_state)/g"); avp_copy("$avp(s:acc_callee_user)", "$avp(s:acc_caller_user)"); avp_copy("$avp(s:acc_callee_domain)", "$avp(s:acc_caller_domain)"); $avp(s:acc_state) = "cfc"; setflag(29); if(!get_redirects("1:1")) {
xlog("L_ERROR", "Failed to fetch contact '$ct' from 301/302 - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n"); acc_db_request("480", "acc"); t_reply("480", "Temporarily Unavailable"); exit; } # get last URI from destination-set and set it as R-URI avp_delete("$avp(s:tmp)/g"); $avp(s:tmp) = $ds; avp_subst("$avp(s:tmp)", "/.*(sip:.+@[^:;>]+).*$/\1/"); avp_pushto("$ru", "$avp(s:tmp)"); setflag(29); append_branch();
t_on_branch("1"); xlog("L_INFO", "Redirect from UAC intercepted - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n"); route(13); exit; }
t_on_branch("1"); xlog("L_INFO", "CFC detected - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n"); route(13);
-----------------------------------------------------------------------------------------------------
Regards, Bogdan
Best regards, Antonio.