[Serusers] tm module question

Jan Janak jan at iptel.org
Wed Jan 19 23:07:30 CET 2005


If I understand the description correctly, you need to be able to set
different values for the timer based on the callee. That is possible
with the latest ser version using AVPs:

if (uri =~ "jan") {
	set_sattr("callee_fr_inv_timer", "10");
};

t_relay();

The snipped above will test if the request-uri contains "jan" and if so,
it would set the value of the fr_inv_timer for this transaction to 10
seconds. Other transactions (for messages that do not have "jan") in the
request-uri will use the default value of the timer, which would be 60
seconds.

In your case, you would probably that for voicemail group membership and
change the value based on the test.

  Jan.

On 18-01 12:16, Christopher Crawford wrote:
> Hello.
>  
> I am having configuration issues with ser when dealing with users who
> have voicemail and desire a timeout after a set number of rings, and
> those who don't have voicemail and desire a very long ring count.  Here
> is the example:
>  
> Phone A has voicemail
> Phone B does not have voicemail
>  
> Works:
> Phone B calls A.  A does not answer.  After a set period of time
> (fr_inv_timer=24),  the user is proxy'ed to voicemail.
>  
> Doesn't work:
> Phone A calls B. B does not answer.  After a set period of time, the
> proxy responds with a 408 and the transaction is CANCELed .  
>  
> The example above is a case when I just want to proxy the INVITE to a
> user without setting a timer, stateless.  I would consider sending the
> original INVITE using forward() for users without voicemail, but the
> parameters require a port and IP, of which exists in ser.location and I
> may fork to multiple contacts for the user.
>  
> In addition, when responding with a 408, how does the proxy
> differentiate between a timed out INVITE (after a set of retries) and a
> transactional timeout (that had a provisional response)?
>  
> Looking forward to the Paris show (and the food and the wine and...  :->
> )
>  
> Regards,
>  
> Chris
>  
> modparam("tm", "fr_timer", 12) 
> modparam("tm", "fr_inv_timer", 24) 
> modparam("tm", "wt_timer", 180)
>  
>  
> route[7]
> {
>      setflag(5);        
>      if ( is_user_in("Request-URI", "mail" ) )
>      {
>         t_on_failure("5");  /*_media_server_info_*/
>      }
>      else
>      {
>             log( "------------------------------------>route7 \n");
>             t_on_failure("1");  /*_media_server_info_*/
>      }
> }
>  
> failure_route[5] 
> {
>       if ( is_user_in("Request-URI", "mail" ) && ( t_check_status( "486"
> ) || t_check_status( "600" ) || t_check_status( "408" ) ) )
>         {
>             rewritehostport("66.115.232.216:5060");
> /*_media_server_info_*/
>             append_branch(); 
>       
>             if( t_check_status( "486" ) || t_check_status( "600" ) )
>             {
>                   append_urihf("Diversion: ", " ; reason=user-busy
> \r\n");
>             }
>             else if( t_check_status( "408" ) )
>             {
>                   append_urihf("Diversion: ", " ; reason=unavailable
> \r\n");
>             }
>  
>             append_hf("P-hint: Forwarding to Voicemail Media Server\n");
>             t_relay();
>       } 
>       else if ( is_user_in("Request-URI", "mail" ) )
>       {
>             t_relay();
>       }
>       else if ( !is_user_in("Request-URI", "mail" ) || t_check_status(
> "408" ) )
>       {
>             log( "------------------------------------>failureroute5
> conditional \n");
>             t_on_failure("1");;
>       }
>             log( "------------------------------------>failureroute5
> \n");
>       break ;
> }
>  
> failure_route[ 1 ]
> {
> if( t_check_status( "408" ) || t_check_status( "400" ) )
> {
>             log( "------------------------------------>failureroute1
> \n");
> append_branch( );
> t_on_failure("1");
> }
> t_relay();
>  
> break;
> }
>  
>  
>  

> _______________________________________________
> Serusers mailing list
> serusers at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers




More information about the sr-users mailing list