Hello.
Can someone please explain to me hoy can i use the command “defunct_gw()” is used to mark a gw down?.
I understand that the gateway is marked down for period of time with the command, but how can I check if a gateway is down?. Can someone show me this with an example in the configuration?
*Thanks in advance,*
*Regards,*
* *
* *
*Ricardo Martinez.-*
Ricardo Martinez writes:
Can someone please explain to me hoy can i use the command “defunct_gw()” is used to mark a gw down?.
as the README tells, the function defuncts the gateway of previous next_gw() call.
I understand that the gateway is marked down for period of time with the command, but how can I check if a gateway is down?. Can someone show me this with an example in the configuration?
you activate failure route before calling t_relay() and then in the failure route you can call defunct_gw() depending on the response code.
-- juha
Hello Juha.. Maybe I did not read the README file so well, but I can't find where it says that the defunct_gw() function defunct a gateway of previous next_gw() call. So, according to a response code I can mark a gateway down, but how can I mark a gateway down upon no response?, let's say that my gateway is offline. How can I check this status? Thanks
Ricardo.-
-----Mensaje original----- De: sr-users-bounces@lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org] En nombre de Juha Heinanen Enviado el: jueves, 31 de marzo de 2011 2:26 Para: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List Asunto: [SR-Users] LCR defunct_gw use
Ricardo Martinez writes:
Can someone please explain to me hoy can i use the command “defunct_gw()” is used to mark a gw down?.
as the README tells, the function defuncts the gateway of previous next_gw() call.
I understand that the gateway is marked down for period of time with the command, but how can I check if a gateway is down?. Can someone show me this with an example in the configuration?
you activate failure route before calling t_relay() and then in the failure route you can call defunct_gw() depending on the response code.
-- juha
_______________________________________________ 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
Ricardo Martinez writes:
Maybe I did not read the README file so well, but I can't find where it says that the defunct_gw() function defunct a gateway of previous next_gw() call.
well, it is sort of indirectly specified if you read what is said about defunct_gw_avp and lcr_id_avp, but i'll make it more explicit.
So, according to a response code I can mark a gateway down, but how can I mark a gateway down upon no response?, let's say that my gateway is offline. How can I check this status?
you set tm timers using t_set_fr() call before calling t_relay() and if there is no response, failure route will be called with 408 response code.
-- juha
Thanks Juha. So please, can you clarify me one more thing?. This 408 response code is generated in the failure_route only?.... what if a gateway really answers a call with 408 because there was no answer from the client... this response is handled by the on_reply route , isn't?
Thanks Ricardo.-
-----Mensaje original----- De: sr-users-bounces@lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org] En nombre de Juha Heinanen Enviado el: jueves, 31 de marzo de 2011 10:15 Para: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List Asunto: Re: [SR-Users] LCR defunct_gw use
Ricardo Martinez writes:
Maybe I did not read the README file so well, but I can't find where it
says
that the defunct_gw() function defunct a gateway of previous next_gw() call.
well, it is sort of indirectly specified if you read what is said about defunct_gw_avp and lcr_id_avp, but i'll make it more explicit.
So, according to a response code I can mark a gateway down, but how can
I
mark a gateway down upon no response?, let's say that my gateway is
offline.
How can I check this status?
you set tm timers using t_set_fr() call before calling t_relay() and if there is no response, failure route will be called with 408 response code.
-- juha
_______________________________________________ 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
Ricardo Martinez writes:
So please, can you clarify me one more thing?. This 408 response code is generated in the failure_route only?.... what if a gateway really answers a call with 408 because there was no answer from the client... this response is handled by the on_reply route , isn't?
before you call t_relay you set no-answer timeout to be a small value (a few seconds) so that you are able to try the next gw as soon as possible. if your gw is alive, it will give you immediately a 1xx response, which you process in on_reply route. if you get 408 without having seen 1xx, you can defunct the gw in failure route.
-- juha
Hi,
On 03/31/2011 03:38 PM, Juha Heinanen wrote:
Ricardo Martinez writes:
This 408 response code is generated in the failure_route only?.... what if a gateway really answers a call with 408 because there was no answer from the client... this response is handled by the on_reply route , isn't?
before you call t_relay you set no-answer timeout to be a small value (a few seconds) so that you are able to try the next gw as soon as possible. if your gw is alive, it will give you immediately a 1xx response, which you process in on_reply route. if you get 408 without having seen 1xx, you can defunct the gw in failure route.
Until 1.5.x, there has been a t_local_replied() in tm for checking whether the reply (e.g. the 408) has been generated locally. What happened to that one? How would you do this in 3.x reliably without depending on an 1xx response from the outside?
Andreas
Andreas Granig writes:
Until 1.5.x, there has been a t_local_replied() in tm for checking whether the reply (e.g. the 408) has been generated locally. What happened to that one? How would you do this in 3.x reliably without depending on an 1xx response from the outside?
beats me. i don't myself use defunct_gw() and the issue has not risen before.
-- juha
maybe you can use t_any_timeout? I do not know if it handles internal and external timeout identical http://www.kamailio.org/docs/modules/3.1.x/modules/tm#t_any_timeout
On 31.03.2011 16:58, Andreas Granig wrote:
Hi,
On 03/31/2011 03:38 PM, Juha Heinanen wrote:
Ricardo Martinez writes:
This 408 response code is generated in the failure_route only?.... what if a gateway really answers a call with 408 because there was no answer from the client... this response is handled by the on_reply route , isn't?
before you call t_relay you set no-answer timeout to be a small value (a few seconds) so that you are able to try the next gw as soon as possible. if your gw is alive, it will give you immediately a 1xx response, which you process in on_reply route. if you get 408 without having seen 1xx, you can defunct the gw in failure route.
Until 1.5.x, there has been a t_local_replied() in tm for checking whether the reply (e.g. the 408) has been generated locally. What happened to that one? How would you do this in 3.x reliably without depending on an 1xx response from the outside?
Andreas
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
I would say: http://www.kamailio.org/docs/modules/3.1.x/modules/tm.html#t_branch_timeout would be more appropriate for detection local timeouts. If a reply is generated locally (from the script) I don't think that will end up in the failure route (I have not tested this scenario). And even if it ends up in a failure route, a flag can be set to identify it.
Regards, Ovidiu Sas
On Thu, Mar 31, 2011 at 11:28 AM, Klaus Darilion klaus.mailinglists@pernau.at wrote:
maybe you can use t_any_timeout? I do not know if it handles internal and external timeout identical http://www.kamailio.org/docs/modules/3.1.x/modules/tm#t_any_timeout
On 31.03.2011 16:58, Andreas Granig wrote:
Hi,
On 03/31/2011 03:38 PM, Juha Heinanen wrote:
Ricardo Martinez writes:
This 408 response code is generated in the failure_route only?.... what if a gateway really answers a call with 408 because there was no answer from the client... this response is handled by the on_reply route , isn't?
before you call t_relay you set no-answer timeout to be a small value (a few seconds) so that you are able to try the next gw as soon as possible. if your gw is alive, it will give you immediately a 1xx response, which you process in on_reply route. if you get 408 without having seen 1xx, you can defunct the gw in failure route.
Until 1.5.x, there has been a t_local_replied() in tm for checking whether the reply (e.g. the 408) has been generated locally. What happened to that one? How would you do this in 3.x reliably without depending on an 1xx response from the outside?
Andreas
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
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