[SR-Users] Kamailio drouting failure not working

Daniel-Constantin Mierla miconda at gmail.com
Wed May 27 08:23:33 CEST 2015


Hello,

On 26/05/15 19:02, Ali Taher wrote:
> Hi 
>
> As mentioned before, i tried 
>
>>     if (t_check_status("486")){
>>
>>             exit;
>>
>>         }
>>
> in failure_route but didnt work.

what you do above is not to re-route in case the reply code is 486.

If you want to re-route only in case of 486, negate that condition.

Cheers,
Daniel

>
> Regards,
> Ali
>
> Sent from my iPhone
>
> On May 26, 2015, at 7:45 PM, Dmitri Savolainen <savolainen at erinaco.ru
> <mailto:savolainen at erinaco.ru>> wrote:
>
>> yes, status code 486 in sip flow  has to match  486 transaction
>> status  in script
>>
>> 2015-05-26 19:21 GMT+03:00 Ali Taher <ataher at vanrise.com
>> <mailto:ataher at vanrise.com>>:
>>
>>     Hi,
>>
>>      
>>
>>     In wireshark, I’m getting *Status: 486 Busy Here | *, when cancel
>>     button is clicked.
>>
>>     Isnt’ that meaning that the reply code is 486?
>>
>>      
>>
>>     Regards,
>>
>>     Ali
>>
>>      
>>
>>     *From:*sr-users [mailto:sr-users-bounces at lists.sip-router.org
>>     <mailto:sr-users-bounces at lists.sip-router.org>] *On Behalf Of
>>     *Dmitri Savolainen
>>     *Sent:* Tuesday, May 26, 2015 6:20 PM
>>
>>
>>     *To:* Kamailio (SER) - Users Mailing List
>>     *Subject:* Re: [SR-Users] Kamailio drouting failure not working
>>
>>      
>>
>>     Sorry, I did not read the question carefully.
>>
>>     Really 486 usually send by phone, when clicking ignore
>>
>>     so this statement before "use_next_gw()" usually works:
>>
>>     if (t_check_status("486")){
>>
>>             exit;
>>
>>         }
>>
>>      
>>
>>     but may be your phone generate smth else (not 486).
>>
>>     i use smth like this before use_next_gw() :
>>
>>     if ( t_is_canceled() ){
>>
>>             exit;
>>
>>         }
>>
>>      
>>
>>         if (t_check_status("....")){ #no backup code list regex
>>
>>             exit;
>>
>>         }
>>
>>      
>>
>>     you may add log string at start of failure_route to determine
>>     error code:
>>
>>     xlog("L_INFO", "failure_route; code: $T_reply_code"); 
>>
>>      
>>
>>     PS include "loadmodule 'tmx.so'" for $T_reply_code 
>>
>>      
>>
>>      
>>
>>      
>>
>>      
>>
>>     2015-05-26 17:46 GMT+03:00 Ali Taher <ataher at vanrise.com
>>     <mailto:ataher at vanrise.com>>:
>>
>>         Hi,
>>
>>         Below is failure_route content:
>>
>>          
>>
>>         failure_route[1] {
>>
>>          
>>
>>         if(t_is_canceled())
>>
>>         {
>>
>>         exit;
>>
>>         }
>>
>>             if (use_next_gw()) {
>>
>>                        
>>
>>                 t_relay();
>>
>>                 exit;
>>
>>             }
>>
>>         else {
>>
>>             t_reply ("503", "Service not available");
>>
>>                 exit;
>>
>>             }
>>
>>         }
>>
>>          
>>
>>         Noting that phone is showing : “Service not available”
>>         meaning that all destinations in avp list were tried.
>>
>>          
>>
>>         Regards,
>>
>>          
>>
>>          
>>
>>         <image001.png>
>>
>>         	
>>
>>         * *
>>
>>         *Ali Taher*
>>
>>         /Technical Support Engineer/
>>
>>         / /
>>
>>         	
>>
>>          
>>
>>         *T&F          *
>>
>>         *M*
>>
>>         *W*
>>
>>         *A*
>>
>>         	
>>
>>         +961-5-457437 *Ext*215
>>
>>         +961-70-010600
>>
>>         http://www.vanrise.com <http://www.vanrise.com/>__
>>
>>         Vanrise Building
>>         <https://maps.google.com/maps/ms?msa=0&msid=208243362929850217065.0004cbc8d612c5f9b4237&ie=UTF8&t=h&vpsrc=0&z=19&iwloc=0004cbc8e4652b4edf71cC:%5CUsers%5CMarie%5CDocuments%5CMy%20Received%20Files>,
>>         Facing Galerie Semaan
>>
>>         Hazmiyeh Highway – Beirut, Lebanon
>>
>>          
>>
>>         	
>>
>>         /<image002.png>/
>>
>>         /Join us at/
>>
>>         	
>>
>>          <image003.png>
>>         <http://www.facebook.com/pages/Vanrise-Solutions-Offshore/128309743915533><image004.png>
>>         <http://www.linkedin.com/company/vanrise-solutions> <image005.png>
>>         <http://twitter.com/VanriseSolution>
>>
>>         * *
>>
>>
>>         	
>>         	
>>         	
>>         	
>>
>>          
>>
>>          
>>
>>          
>>
>>         *From:*sr-users [mailto:sr-users-bounces at lists.sip-router.org
>>         <mailto:sr-users-bounces at lists.sip-router.org>] *On Behalf Of
>>         *Dmitri Savolainen
>>         *Sent:* Tuesday, May 26, 2015 5:42 PM
>>
>>
>>         *To:* Kamailio (SER) - Users Mailing List
>>         *Subject:* Re: [SR-Users] Kamailio drouting failure not working
>>
>>          
>>
>>         show  failure_route content and response from phone (while
>>         clicking on ignore)
>>
>>          
>>
>>         2015-05-26 17:33 GMT+03:00 Ali Taher <ataher at vanrise.com
>>         <mailto:ataher at vanrise.com>>:
>>
>>             Hi,
>>
>>              
>>
>>             Thanks for your fast reply.
>>
>>              
>>
>>             I tried below condition in failure_route  but still
>>             rerouted to next destination when clicking on ignore.
>>
>>              
>>
>>             Appreciate your help.
>>
>>              
>>
>>             Regards,
>>
>>              
>>
>>              
>>
>>             <image001.png>
>>
>>             	
>>
>>             * *
>>
>>             *Ali Taher*
>>
>>             /Technical Support Engineer/
>>
>>             / /
>>
>>             	
>>
>>              
>>
>>             *T&F          *
>>
>>             *M*
>>
>>             *W*
>>
>>             *A*
>>
>>             	
>>
>>             +961-5-457437 *Ext*215
>>
>>             +961-70-010600
>>
>>             http://www.vanrise.com <http://www.vanrise.com/>__
>>
>>             Vanrise Building
>>             <https://maps.google.com/maps/ms?msa=0&msid=208243362929850217065.0004cbc8d612c5f9b4237&ie=UTF8&t=h&vpsrc=0&z=19&iwloc=0004cbc8e4652b4edf71cC:%5CUsers%5CMarie%5CDocuments%5CMy%20Received%20Files>,
>>             Facing Galerie Semaan
>>
>>             Hazmiyeh Highway – Beirut, Lebanon
>>
>>              
>>
>>             	
>>
>>             /<image002.png>/
>>
>>             /Join us at/
>>
>>             	
>>
>>              <image003.png>
>>             <http://www.facebook.com/pages/Vanrise-Solutions-Offshore/128309743915533><image004.png>
>>             <http://www.linkedin.com/company/vanrise-solutions> <image005.png>
>>             <http://twitter.com/VanriseSolution>
>>
>>             * *
>>
>>
>>             	
>>             	
>>             	
>>             	
>>
>>              
>>
>>              
>>
>>              
>>
>>              
>>
>>             *From:*sr-users
>>             [mailto:sr-users-bounces at lists.sip-router.org
>>             <mailto:sr-users-bounces at lists.sip-router.org>] *On
>>             Behalf Of *Dmitri Savolainen
>>             *Sent:* Tuesday, May 26, 2015 5:18 PM
>>
>>
>>             *To:* Kamailio (SER) - Users Mailing List
>>             *Subject:* Re: [SR-Users] Kamailio drouting failure not
>>             working
>>
>>              
>>
>>             486  is a busy error;
>>
>>             you may use in faulure_route :
>>
>>                 if ( t_is_canceled() ){
>>
>>                     exit;
>>
>>                 }
>>
>>              
>>
>>              
>>
>>             2015-05-26 17:09 GMT+03:00 Ali Taher <ataher at vanrise.com
>>             <mailto:ataher at vanrise.com>>:
>>
>>                 Hi,
>>
>>                  
>>
>>                 Thanks for your reply , it’s working fine now.
>>
>>                 Yet, when a call is rerouted to a gateway which
>>                 cancel it (by clicking on ignore button), call is
>>                 then rerouted to next gateway which is not correct.
>>
>>                  
>>
>>                 I tried to add this condition :  
>>                 If(t_check_status(“486”)) { exit;}  in failure_route
>>                 function to exit when cancel occur , but didn’t work L.
>>
>>                  
>>
>>                 Appreciate your help.
>>
>>                  
>>
>>                 Regards,
>>
>>                  
>>
>>                  
>>
>>                 <image001.png>
>>
>>                 	
>>
>>                 * *
>>
>>                 *Ali Taher*
>>
>>                 /Technical Support Engineer/
>>
>>                 / /
>>
>>                 	
>>
>>                  
>>
>>                 *T&F          *
>>
>>                 *M*
>>
>>                 *W*
>>
>>                 *A*
>>
>>                 	
>>
>>                 +961-5-457437 *Ext*215
>>
>>                 +961-70-010600
>>
>>                 http://www.vanrise.com <http://www.vanrise.com/>__
>>
>>                 Vanrise Building
>>                 <https://maps.google.com/maps/ms?msa=0&msid=208243362929850217065.0004cbc8d612c5f9b4237&ie=UTF8&t=h&vpsrc=0&z=19&iwloc=0004cbc8e4652b4edf71cC:%5CUsers%5CMarie%5CDocuments%5CMy%20Received%20Files>,
>>                 Facing Galerie Semaan
>>
>>                 Hazmiyeh Highway – Beirut, Lebanon
>>
>>                  
>>
>>                 	
>>
>>                 /<image002.png>/
>>
>>                 /Join us at/
>>
>>                 	
>>
>>                  <image003.png>
>>                 <http://www.facebook.com/pages/Vanrise-Solutions-Offshore/128309743915533><image004.png>
>>                 <http://www.linkedin.com/company/vanrise-solutions> <image005.png>
>>                 <http://twitter.com/VanriseSolution>
>>
>>                 * *
>>
>>
>>                 	
>>                 	
>>                 	
>>                 	
>>
>>                  
>>
>>                 *From:*sr-users
>>                 [mailto:sr-users-bounces at lists.sip-router.org
>>                 <mailto:sr-users-bounces at lists.sip-router.org>] *On
>>                 Behalf Of *Dmitri Savolainen
>>                 *Sent:* Tuesday, May 26, 2015 3:40 PM
>>                 *To:* Kamailio (SER) - Users Mailing List
>>                 *Subject:* Re: [SR-Users] Kamailio drouting failure
>>                 not working
>>
>>                  
>>
>>                     if (t_check_status("[34][0-9][0-9]")) {
>>
>>                         exit;
>>
>>                     }
>>
>>                  
>>
>>                 request timeout == 408 error, so  "if (use_next_gw())
>>                 {" never called
>>
>>                  
>>
>>                  
>>
>>                  
>>
>>
>>                  
>>
>>                 -- 
>>
>>                 Savolainen Dmitri
>>
>>
>>                 _______________________________________________
>>                 SIP Express Router (SER) and Kamailio (OpenSER) -
>>                 sr-users mailing list
>>                 sr-users at lists.sip-router.org
>>                 <mailto:sr-users at lists.sip-router.org>
>>                 http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>>
>>              
>>
>>             -- 
>>
>>             Savolainen Dmitri
>>
>>
>>             _______________________________________________
>>             SIP Express Router (SER) and Kamailio (OpenSER) -
>>             sr-users mailing list
>>             sr-users at lists.sip-router.org
>>             <mailto:sr-users at lists.sip-router.org>
>>             http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>>
>>          
>>
>>         -- 
>>
>>         Savolainen Dmitri
>>
>>
>>         _______________________________________________
>>         SIP Express Router (SER) and Kamailio (OpenSER) - sr-users
>>         mailing list
>>         sr-users at lists.sip-router.org
>>         <mailto:sr-users at lists.sip-router.org>
>>         http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>>
>>      
>>
>>     -- 
>>
>>     Savolainen Dmitri
>>
>>
>>     _______________________________________________
>>     SIP Express Router (SER) and Kamailio (OpenSER) - sr-users
>>     mailing list
>>     sr-users at lists.sip-router.org <mailto:sr-users at lists.sip-router.org>
>>     http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>>
>>
>> -- 
>> Savolainen Dmitri
>> _______________________________________________
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users at lists.sip-router.org <mailto:sr-users at 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 at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20150527/5e865862/attachment.html>


More information about the sr-users mailing list