[Users] tr_inv_timer

Ibrahim Hamouda ihamouda at itcanint.net
Thu Feb 22 23:44:26 CET 2007


Thanks guys

That worked great
Ibrahim Hamouda
Sphinx Information Technologies Inc.
IT Canada International

-----Original Message-----
From: users-bounces at openser.org [mailto:users-bounces at openser.org] On Behalf
Of Daniel-Constantin Mierla
Sent: Thursday, February 22, 2007 3:14 PM
To: Norman Brandinger
Cc: users at openser.org
Subject: Re: [Users] tr_inv_timer



On 02/22/07 22:36, Norman Brandinger wrote:
> Little typo:
>
> avp_delete("$avp(s:rInvite_Timeout)");
>
> should be:
>
> avp_delete("$avp(s:myInvite_Timeout)");
^^^^^ or:
$avp(s:myInvite_Timeout) = null;

A bit of simplification of your example given below:

if (is_method("INVITE")) {
   avp_db_query("SELECT invite_timeout FROM my_table WHERE (username = 
'$rU'), "$avp(s:Invite_Timeout)");
   if($avp(s:Invite_Timeout) == null)
         $avp(s:Invite_Timeout) = 600;
}

Cheers,
Daniel

>
> n
>
> Norman Brandinger wrote:
>> Perhaps the following little snippet of code will help you out.
>>
>> Regards,
>> Norm
>>
>> ....
>> modparam("tm", "fr_inv_timer_avp", "s:Invite_Timeout")
>> ....
>> if (is_method("INVITE")) {
>>    avp_db_query("SELECT invite_timeout FROM my_table WHERE (username 
>> = '$rU'), "$avp(s:myInvite_Timeout)");
>>    if (is_avp_set("$avp(s:myInvite_Timeout)")) {
>>          $avp(s:Invite_Timeout) = $avp(s:myInvite_Timeout);
>>        } else {
>>          $avp(s:Invite_Timeout) = 600;
>>        }
>>        xlog("L_NOTICE", "Invite_Timeout set to: 
>> $avp(s:Invite_Timeout)\n");
>>    }
>>    avp_delete("$avp(s:rInvite_Timeout)");
>> }
>> ....
>>
>>
>> Ibrahim Hamouda wrote:
>>> I don't want to do it in the modparam part.
>>>
>>> I want to do it inside the script, for PSTN calls as example.
>>>
>>> I don't see anything about it in the TM module
>>>
>>> Ibrahim Hamouda
>>> Sphinx Information Technologies Inc.
>>> IT Canada International
>>> -----Original Message-----
>>> From: Ovidiu Sas [mailto:sip.nslu at gmail.com] Sent: Thursday, 
>>> February 22, 2007 12:23 PM
>>> To: Ibrahim Hamouda
>>> Cc: users at openser.org
>>> Subject: Re: [Users] tr_inv_timer
>>>
>>> yup, take a look at the fr_inv_timer_avp:
>>> http://openser.org/docs/modules/1.2.x/tm.html#AEN249
>>>
>>>
>>> Regards,
>>> Ovidiu Sas
>>>
>>> On 2/22/07, Ibrahim Hamouda <ihamouda at itcanint.net> wrote:
>>>  
>>>>
>>>>
>>>> Is there a way to change the value of the timer from inside the script
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Ibrahim Hamouda
>>>>
>>>> Sphinx Information Technologies Inc.
>>>>
>>>> IT Canada International
>>>>
>>>> Tel: 403-668-6880
>>>>
>>>> Fax: 403-229-0407
>>>>
>>>> N.A.: 1-877-500-7664
>>>>
>>>> Mobile: 403-714-3336
>>>>
>>>>
>>>> _______________________________________________
>>>> Users mailing list
>>>> Users at openser.org
>>>> http://openser.org/cgi-bin/mailman/listinfo/users
>>>>
>>>>
>>>>     
>>>
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users at openser.org
>>> http://openser.org/cgi-bin/mailman/listinfo/users
>>>
>>>
>>>   
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at openser.org
>> http://openser.org/cgi-bin/mailman/listinfo/users
>>
>>
>
>
> _______________________________________________
> Users mailing list
> Users at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/users
>

_______________________________________________
Users mailing list
Users at openser.org
http://openser.org/cgi-bin/mailman/listinfo/users





More information about the sr-users mailing list