Hi,

Hi,

Without s for example: 
$avp(callfwd)
not:
$avp(s:callfwd)



// Binan




________________________________
 Från: Engineer voip <[email protected]>
Till: OpenSIPS users mailling list <[email protected]> 
Skickat: torsdag, 18 oktober 2012 15:34
Ämne: Re: [OpenSIPS-Users] Transfering a call by opensips
 

Hi,
I trying to do that with avpops module and usr_preferenses table.
my script is:

if ( avp_db_load("$ru/username","a") ) 
                        {
                          xlog("L_INFO", " ------------- OFF LINE FORWARD phone 
number: $avp(s:callfwd)\n");
                          xlog("L_INFO", " ------------- OFF LINE FORWARD from 
time: $avp(s:from_time)\n");
                          xlog("L_INFO", " ------------- OFF LINE FORWARD TO 
time: $avp(s:to_time)\n");
                          xlog("L_INFO", "method <$rm> Transforwarding Call 
from <$fu> r-uri <$ru>\n");
                        
                        
                           if(  avp_check("$avp(s:from_time)", "ge/s:10") ) 
                            {
                               $ru = $avp(callfwd);
                               route(13);
                            }






but the result is: 
 
                        ------------- OFF LINE FORWARD phone number:  12
                        ------------- OFF LINE FORWARD from time:  14
                        ------------- OFF LINE FORWARD TO time:  <nul>

Why i get 12 instead of callfwd value   ??

2012/10/18 Engineer voip <[email protected]>

Hi Muhammad,
>
>I think dynamic routing is used only to routing outgoing calls but me i want 
>to routing an incomming calls to user C between 11h and 14h when the user A 
>called him.
> (user A is an external user and B is an User registred on My opensips)
>
>
>
>2012/10/18 Muhammad Shahzad <[email protected]>
>
>Binan, avp db is usually used for temporary data storage e.g. To share some 
>value between two call session etc. So while avp db can be used for this but 
>then you need to make sure you never call avp db clear in your script.
>>Secondly you can use drouting to route any call, not just calls to gw. You 
>>need to create rule that call should not be routed to user B during 11h to 
>>14h. So drouting lookup will fail. Then you check in alias db which will tell 
>>you user c is alias to user b and you can then route call to user c. This way 
>>you can create N x N drouting to alias rules.
>>Thank you.
>>
>>On Oct 18, 2012 10:34 AM, "Binan AL Halabi" <[email protected]> wrote:
>>>
>>Hi,
>>>Add them as Attribute and Value(opensipsctl avp add ....... ): Add them as 
>>>two separate AVP. 
>>>
>>>Then load them in your script as AVP (avp_db_load function).
>>>
>>>
>>>
>>>// Binan
>>>
>>>
>>>
>>>________________________________
>>> Från: Engineer voip <[email protected]>
>>>Till: Binan AL Halabi <[email protected]>; OpenSIPS users mailling 
>>>list <[email protected]> 
>>>Skickat: torsdag, 18 oktober 2012 10:21
>>>Ämne: Re: [OpenSIPS-Users] Transfering a call by opensips
>>> 
>>>
>>>Hi,
>>>
>>>I don't have the fields in user_preferences  table or i add them ?
>>>
>>>
>>>2012/10/18 Binan AL Halabi <[email protected]>
>>>
>>>Hi,
>>>>
>>>>Store in usr_preferences table the time_from and time_to
>>>>then read them in your script using avpops module 
>>>>Take the hour of the call and compare it to the range you got it from 
>>>>database.
>>>>
>>>>http://www.opensips.org/html/docs/modules/1.7.x/avpops.html
>>>>
>>>>// Binan  
>>>>
>>>>
>>>>
>>>>________________________________
>>>> Från: Engineer Voip <[email protected]>
>>>>Till: [email protected] 
>>>>Skickat: torsdag, 18 oktober 2012 8:53
>>>>Ämne: [OpenSIPS-Users] Transfering a call by opensips
>>>> 
>>>>
>>>>Hello all, 
>>>>I want to transfert the call to user C when user A calls user B in interval 
>>>>of time for example: 11h-14h
>>>>I can do that by asterisk but i prefer to do it by opensips
>>>>It's possible to do that by opensips?
>>>>
>>>>Cordialement. 
>>>>Envoyé de mon iPhone
>>>>
>>>>_______________________________________________
>>>>Users mailing list
>>>>[email protected]
>>>>http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>
>>>>
>>>>
>>>>_______________________________________________
>>>>Users mailing list
>>>>[email protected]
>>>>http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>
>>>>
>>>
>>>
>>>-- 
>>>
>>>Best Regards.
>>>
>>>
>>>
>>>
>>>
>>>_______________________________________________
>>>Users mailing list
>>>[email protected]
>>>http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>>
>>_______________________________________________
>>Users mailing list
>>[email protected]
>>http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>
>
>-- 
>
>Best Regards.
>
>
>


-- 

Best Regards.



_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to