[SR-Users] Simultaneous usage of t_on_reply() and t_on_failure()
Hello everyone, I wanted to ask those who know if Kamailio's behavior I'm facing is expected or I should make some improvements to the configuration. Kamailio version is 5.1.0. I have a route where RTPEngine parameters are being collected and *rtpengine_offer()* is called. After that *t_on_reply("REPLY_SIP_TO_SIP");* followed by the *t_on_failure("FAILURE_SIP_TO_SIP");* are used. The idea is to process all responces except 415 or 488 from UAC as usual in *onreply_route[REPLY_SIP_TO_SIP]* and use *failure_route[FAILURE_SIP_TO_SIP]* to update SDP with *rtpengine_offer()* if necessary. *onreply_route[REPLY_SIP_TO_SIP]* just goes to *exit;* if *$rs* equals 415 or 488. This works fine with Htek phone which sends 100, 180 and then 488. But I can not see *failure_route[FAILURE_SIP_TO_SIP]* execution for calls to Zoiper which replies with 100 and immediately 415. t_on_failure(failure_route) documentation says: "Sets failure routing block, to which control is passed after a transaction completed with a negative result but before sending a final reply." and to be honest I don't really understand how lacking of responce prevents failure_route from executing. Thanks a lot! ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Simultaneous usage of t_on_reply() and t_on_failure()
How many branches do you have? Failure route is called for the whole transaction failure and not for every individual failed branch. On 05.09.18 15:03, Володимир Іванець wrote: Hello everyone, I wanted to ask those who know if Kamailio's behavior I'm facing is expected or I should make some improvements to the configuration. Kamailio version is 5.1.0. I have a route where RTPEngine parameters are being collected and /rtpengine_offer()/ is called. After that /t_on_reply("REPLY_SIP_TO_SIP");/ followed by the /t_on_failure("FAILURE_SIP_TO_SIP");/ are used. The idea is to process all responces except 415 or 488 from UAC as usual in /onreply_route[REPLY_SIP_TO_SIP]/ and use /failure_route[FAILURE_SIP_TO_SIP]/ to update SDP with /rtpengine_offer()/ if necessary. /onreply_route[REPLY_SIP_TO_SIP]/ just goes to /exit;/ if /$rs/ equals 415 or 488. This works fine with Htek phone which sends 100, 180 and then 488. But I can not see /failure_route[FAILURE_SIP_TO_SIP]/ execution for calls to Zoiper which replies with 100 and immediately 415. t_on_failure(failure_route) documentation says: "Sets failure routing block, to which control is passed after a transaction completed with a negative result but before sending a final reply." and to be honest I don't really understand how lacking of responce prevents failure_route from executing. Thanks a lot! ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Simultaneous usage of t_on_reply() and t_on_failure()
There is only one branch_route - MANAGE_BRANCH. Same as in default Kamailio configuration file. Thank you. 2018-09-05 17:31 GMT+03:00 Vitalii Aleksandrov : > How many branches do you have? Failure route is called for the whole > transaction failure and not for every individual failed branch. > > On 05.09.18 15:03, Володимир Іванець wrote: > > Hello everyone, > > I wanted to ask those who know if Kamailio's behavior I'm facing is > expected or I should make some improvements to the configuration. Kamailio > version is 5.1.0. > > I have a route where RTPEngine parameters are being collected and > *rtpengine_offer()* is called. After that > *t_on_reply("REPLY_SIP_TO_SIP");* followed by the > *t_on_failure("FAILURE_SIP_TO_SIP");* are used. The idea is to process > all responces except 415 or 488 from UAC as usual in > *onreply_route[REPLY_SIP_TO_SIP]* and use > *failure_route[FAILURE_SIP_TO_SIP]* to update SDP with *rtpengine_offer()* if > necessary. > > *onreply_route[REPLY_SIP_TO_SIP]* just goes to *exit;* if *$rs* equals 415 > or 488. This works fine with Htek phone which sends 100, 180 and then 488. > But I can not see *failure_route[FAILURE_SIP_TO_SIP]* execution for > calls to Zoiper which replies with 100 and immediately 415. > > t_on_failure(failure_route) documentation says: "Sets failure routing > block, to which control is passed after a transaction completed with a > negative result but before sending a final reply." and to be honest I don't > really understand how lacking of responce prevents failure_route from > executing. > > Thanks a lot! > > > ___ > Kamailio (SER) - Users Mailing > Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users > > > > ___ > Kamailio (SER) - Users Mailing List > sr-users@lists.kamailio.org > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users > > ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Simultaneous usage of t_on_reply() and t_on_failure()
Am Mittwoch, 5. September 2018, 14:03:10 CEST schrieb Володимир Іванець: > I wanted to ask those who know if Kamailio's behavior I'm facing is > expected or I should make some improvements to the configuration. Kamailio > version is 5.1.0. > > I have a route where RTPEngine parameters are being collected and > *rtpengine_offer()* is called. After that *t_on_reply("REPLY_SIP_TO_SIP");* > followed by the *t_on_failure("FAILURE_SIP_TO_SIP");* are used. The idea is > to process all responces except 415 or 488 from UAC as usual in > *onreply_route[REPLY_SIP_TO_SIP]* and use > *failure_route[FAILURE_SIP_TO_SIP]* to update SDP with *rtpengine_offer()* > if necessary. > > *onreply_route[REPLY_SIP_TO_SIP]* just goes to *exit;* if *$rs* equals 415 > or 488. This works fine with Htek phone which sends 100, 180 and then 488. > But I can not see *failure_route[FAILURE_SIP_TO_SIP]* execution for calls > to Zoiper which replies with 100 and immediately 415. > > t_on_failure(failure_route) documentation says: "Sets failure routing > block, to which control is passed after a transaction completed with a > negative result but before sending a final reply." and to be honest I don't > really understand how lacking of responce prevents failure_route from > executing. Hello, I did not understand you completely here. Did you receive a 415 and the failure route is not entered, or you did not receive a response as stated in the last sentence? If the failure_route is entered for the 488, then it should be also entered for the 415. I am not aware of a special handling of this code in tm. (Only that 415 is one of the replies that get a priority comparing to normal 4xx.) I would suggest to try with debugging enabled and compare the logs for a working, and for a non-working call. You could also try to concentrate on one problem first, like the failure_route topic, and then combining this with the reply_route. Best regards, Henning -- Henning Westerholt https://skalatan.de/blog/ ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Simultaneous usage of t_on_reply() and t_on_failure()
I think you need to use t_on_branch_failure() If I got you correctly Regards, Igor On Sep 6, 2018, 10:06 PM +0300, Henning Westerholt , wrote: > Am Mittwoch, 5. September 2018, 14:03:10 CEST schrieb Володимир Іванець: > > I wanted to ask those who know if Kamailio's behavior I'm facing is > > expected or I should make some improvements to the configuration. Kamailio > > version is 5.1.0. > > > > I have a route where RTPEngine parameters are being collected and > > *rtpengine_offer()* is called. After that *t_on_reply("REPLY_SIP_TO_SIP");* > > followed by the *t_on_failure("FAILURE_SIP_TO_SIP");* are used. The idea is > > to process all responces except 415 or 488 from UAC as usual in > > *onreply_route[REPLY_SIP_TO_SIP]* and use > > *failure_route[FAILURE_SIP_TO_SIP]* to update SDP with *rtpengine_offer()* > > if necessary. > > > > *onreply_route[REPLY_SIP_TO_SIP]* just goes to *exit;* if *$rs* equals 415 > > or 488. This works fine with Htek phone which sends 100, 180 and then 488. > > But I can not see *failure_route[FAILURE_SIP_TO_SIP]* execution for calls > > to Zoiper which replies with 100 and immediately 415. > > > > t_on_failure(failure_route) documentation says: "Sets failure routing > > block, to which control is passed after a transaction completed with a > > negative result but before sending a final reply." and to be honest I don't > > really understand how lacking of responce prevents failure_route from > > executing. > > Hello, > > I did not understand you completely here. Did you receive a 415 and the > failure route is not entered, or you did not receive a response as stated in > the last sentence? > > If the failure_route is entered for the 488, then it should be also entered > for the 415. I am not aware of a special handling of this code in tm. (Only > that 415 is one of the replies that get a priority comparing to normal 4xx.) > > I would suggest to try with debugging enabled and compare the logs for a > working, and for a non-working call. You could also try to concentrate on one > problem first, like the failure_route topic, and then combining this with the > reply_route. > > Best regards, > > Henning > > -- > Henning Westerholt > https://skalatan.de/blog/ > > ___ > Kamailio (SER) - Users Mailing List > sr-users@lists.kamailio.org > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Simultaneous usage of t_on_reply() and t_on_failure()
Hello Igor and Henning, I used t_on_branch_failure() instead of t_on_failure() as Igor suggested and now I can see that *event_route[tm:branch-failure:FAILURE_SIP_TO_SIP]* is executed for both Htek 488 and Zoiper 415 responces. Thanks a lot for your help! 2018-09-08 9:46 GMT+03:00 Igor Olhovskiy : > I think you need to use > t_on_branch_failure() > If I got you correctly > > Regards, Igor > On Sep 6, 2018, 10:06 PM +0300, Henning Westerholt , > wrote: > > Am Mittwoch, 5. September 2018, 14:03:10 CEST schrieb Володимир Іванець: > > I wanted to ask those who know if Kamailio's behavior I'm facing is > expected or I should make some improvements to the configuration. Kamailio > version is 5.1.0. > > I have a route where RTPEngine parameters are being collected and > *rtpengine_offer()* is called. After that *t_on_reply("REPLY_SIP_TO_SIP" > );* > followed by the *t_on_failure("FAILURE_SIP_TO_SIP");* are used. The idea > is > to process all responces except 415 or 488 from UAC as usual in > *onreply_route[REPLY_SIP_TO_SIP]* and use > *failure_route[FAILURE_SIP_TO_SIP]* to update SDP with *rtpengine_offer()* > if necessary. > > *onreply_route[REPLY_SIP_TO_SIP]* just goes to *exit;* if *$rs* equals 415 > or 488. This works fine with Htek phone which sends 100, 180 and then 488. > But I can not see *failure_route[FAILURE_SIP_TO_SIP]* execution for calls > to Zoiper which replies with 100 and immediately 415. > > t_on_failure(failure_route) documentation says: "Sets failure routing > block, to which control is passed after a transaction completed with a > negative result but before sending a final reply." and to be honest I don't > really understand how lacking of responce prevents failure_route from > executing. > > > Hello, > > I did not understand you completely here. Did you receive a 415 and the > failure route is not entered, or you did not receive a response as stated > in > the last sentence? > > If the failure_route is entered for the 488, then it should be also entered > for the 415. I am not aware of a special handling of this code in tm. (Only > that 415 is one of the replies that get a priority comparing to normal > 4xx.) > > I would suggest to try with debugging enabled and compare the logs for a > working, and for a non-working call. You could also try to concentrate on > one > problem first, like the failure_route topic, and then combining this with > the > reply_route. > > Best regards, > > Henning > > -- > Henning Westerholt > https://skalatan.de/blog/ > > ___ > Kamailio (SER) - Users Mailing List > sr-users@lists.kamailio.org > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users > > > ___ > Kamailio (SER) - Users Mailing List > sr-users@lists.kamailio.org > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users > > ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users