Transfering a call by opensips

classic Classic list List threaded Threaded
20 messages Options
Reply | Threaded
Open this post in threaded view
|

Transfering a call by opensips

Engineer voip
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
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Transfering a call by opensips

qasimakhan@gmail.com
I haven’t tried doing this before but if i am not wrong you can write a script in perl using opensips perl module.

Regards,
Qasim

On Thu, Oct 18, 2012 at 11:53 AM, Engineer Voip <[hidden email]> wrote:
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
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Transfering a call by opensips

Binan83
In reply to this post by Engineer voip
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 <[hidden email]>
Till: [hidden email]
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
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
voipmagazine.wordpress.com/
Reply | Threaded
Open this post in threaded view
|

Re: Transfering a call by opensips

Muhammad Shahzad
In reply to this post by Engineer voip

Use dynamic routing module.

Thank you.

On Oct 18, 2012 8:54 AM, "Engineer Voip" <[hidden email]> wrote:
>
> 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
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Transfering a call by opensips

Engineer voip
In reply to this post by Binan83
Hi,

I don't have the fields in user_preferences  table or i add them ?

2012/10/18 Binan AL Halabi <[hidden email]>
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 <[hidden email]>
Till: [hidden email]
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
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



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




--

Best Regards.



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Transfering a call by opensips

Engineer voip
In reply to this post by Muhammad Shahzad
Muhammad Shahzad,  dynamic routing i use it but just to routing a calls to a gateway but not to number phone !

2012/10/18 Muhammad Shahzad <[hidden email]>

Use dynamic routing module.

Thank you.

On Oct 18, 2012 8:54 AM, "Engineer Voip" <[hidden email]> wrote:
>
> 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
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


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




--

Best Regards.



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Transfering a call by opensips

Binan83
In reply to this post by Engineer voip
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 <[hidden email]>
Till: Binan AL Halabi <[hidden email]>; OpenSIPS users mailling list <[hidden email]>
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 <[hidden email]>
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 <[hidden email]>
Till: [hidden email]
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
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



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




--

Best Regards.





_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
voipmagazine.wordpress.com/
Reply | Threaded
Open this post in threaded view
|

Re: Transfering a call by opensips

Muhammad Shahzad

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" <[hidden email]> 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 <[hidden email]>
Till: Binan AL Halabi <[hidden email]>; OpenSIPS users mailling list <[hidden email]>
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 <[hidden email]>
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 <[hidden email]>
Till: [hidden email]
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
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



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




--

Best Regards.





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


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Transfering a call by opensips

Engineer voip
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 <[hidden email]>

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" <[hidden email]> 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 <[hidden email]>
Till: Binan AL Halabi <[hidden email]>; OpenSIPS users mailling list <[hidden email]>
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 <[hidden email]>
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 <[hidden email]>
Till: [hidden email]
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
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



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




--

Best Regards.





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


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




--

Best Regards.



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

VB: Transfering a call by opensips

Binan83
In reply to this post by Muhammad Shahzad

Hallo,

See implementing call forwarding in opensips1.6 book.

// Binan

Från: Muhammad Shahzad <[hidden email]>
Till: Binan AL Halabi <[hidden email]>; OpenSIPS users mailling list <[hidden email]>
Skickat: torsdag, 18 oktober 2012 11:30
Ämne: Re: [OpenSIPS-Users] Transfering a call by opensips

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" <[hidden email]> 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 <[hidden email]>
Till: Binan AL Halabi <[hidden email]>; OpenSIPS users mailling list <[hidden email]>
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 <[hidden email]>
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 <[hidden email]>
Till: [hidden email]
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
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



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




--

Best Regards.





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






_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
voipmagazine.wordpress.com/
Reply | Threaded
Open this post in threaded view
|

Re: VB: Transfering a call by opensips

Muhammad Shahzad

Thanks. I will look at it.

Thank you

On Oct 18, 2012 11:54 AM, "Binan AL Halabi" <[hidden email]> wrote:
>
>
> Hallo,
>
> See implementing call forwarding in opensips1.6 book.
>
> // Binan
> ________________________________
> Från: Muhammad Shahzad <[hidden email]>
> Till: Binan AL Halabi <[hidden email]>; OpenSIPS users mailling list <[hidden email]>
> Skickat: torsdag, 18 oktober 2012 11:30
> Ämne: Re: [OpenSIPS-Users] Transfering a call by opensips
>
> 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" <[hidden email]> 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 <[hidden email]>
>> Till: Binan AL Halabi <[hidden email]>; OpenSIPS users mailling list <[hidden email]>
>> 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 <[hidden email]>
>>>
>>> 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 <[hidden email]>
>>> Till: [hidden email]
>>> 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
>>> [hidden email]
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>>
>>>
>>> _______________________________________________
>>> Users mailing list
>>> [hidden email]
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>
>>
>>
>> --
>>
>> Best Regards.
>>
>>
>>
>>
>>
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>
>
>
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Transfering a call by opensips

Engineer voip
In reply to this post by Engineer voip
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);
                            }



<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAzMAAAB/CAIAAABUuwtrAAAf5klEQVR4nO2dzW8VR9bGCwlheZOwCAukd8vCmyxwNhFSJMQ/wLtBSqREWTkSbCELhKxsmERRFlmwmGtFaCKEZxbIQWJmpAmLBG8cpEZJ5LGiKB6GmPErMq8D2MaA8UfPoieXprvq9KmP7lPd/fxUi3v7dp065/Spquf2vfZVGwAAAAAAIA6UtAMAAAAAAOC/qPnFu2imluUoZoOtc0C29Tx8pC62uLqaVbQ4G+otqgZl5pW4mA22zgHZ1vPwkbrY4upqVtHibKi3qFp0ymx7e8eqySYuZoOtc0C29Tx8pC62uLqaVbQ4G+otqhaXMtvc2jp7/m9WbXNrSzBxMRtsnQOyrefhI3WxxdXVrKLF2VBvUbW4lFmapu+d/sKqpWkqmDjTq0qlSmkcMx2vNGjbxB1oXWsmfCL/rbAvkrp8UE0GCGXWuiZS/91ozWxAkTTTknLl2sbRY7tKpe+d2rENIWzIcSmzf/zrl8V/rpRbJsK0L/3jX7+IXFoos441KLPmU/fl7NqZs9vlx0RQtgESZn3i8jFbd1b73CIXBDG3GJRZA9Oq7F7+cSbL3EJosTJb33hSec4//+//C214Iy1N0/KrQQZ1TpxtL3FhJO5AtE08/+1tzqlzkFxNLpdEXA1cx57PR7fWyfnVTItBmTV2+RzuXDTsfHPKbHX98e8/v7m6/ti2Y16ZNTYoM3HMi3Tm7PaJt3auXNtwFkamPYzzOIgDtCc3bq4Ob/+eObt94+ZqdsIHv9vKDl6Y2ixYOHN2+71TO8OnX86uHT22e/TY7pVr//Xhxs3VM2e3s1dPvLXz5+uP8t2z285Hj+1+dunpZ5eeFvqahna+oJ7NlP8LU5vZu7RyfugA6eTkH5cTG7xVpk7rbfa03EwVkg/q8pUnR4/t5t9ea8uyYNa2Kkxx5c2eeGtHqXTuu/vzi3fnvrufHSlcxCwK28qEMvtydi0rg+GRrIq+nF3j13/5sW0Z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oDAAAAANBnWEqr8Dtldfv026BpuTUzNO1VIDvqxae1B1s2GHCIgGmpr9KCGCxdOC+b0b7V+fb1Q3NjBxoYaDAxkSg1mJggzkkayVL5BxmHpGmaKJWmKd6dAgAaoHqV0S5VDXiWc8Bl169JxtWkzDztc3oVzgmbn9oEa8hK87dWtmBrsxX7+q0jYzuXPnn47pHrh0bqHitRKh2Mp0oNdJlJDMfrQCk1GCRZyz/OZFnWMnHWjD8AgN7yH/zr/rNdekUgAAAAAElFTkSuQmCC" alt="">

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 <[hidden email]>
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 <[hidden email]>

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" <[hidden email]> 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 <[hidden email]>
Till: Binan AL Halabi <[hidden email]>; OpenSIPS users mailling list <[hidden email]>
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 <[hidden email]>
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 <[hidden email]>
Till: [hidden email]
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
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



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




--

Best Regards.





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


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




--

Best Regards.





--

Best Regards.



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Transfering a call by opensips

Engineer voip
Hi,
I have resolved my probleme,  now i stocked this time 2012-10-18  17:50:00 in usr_preferences table
and i want to convert it to seconds
wa can convert the current time to secondes by using $Ts but i don't know if is possible to convert a precise that like
2012-10-18  17:50:00

someone know how do it?

2012/10/18 Engineer voip <[hidden email]>
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 <[hidden email]>
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 <[hidden email]>

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" <[hidden email]> 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 <[hidden email]>
Till: Binan AL Halabi <[hidden email]>; OpenSIPS users mailling list <[hidden email]>
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 <[hidden email]>
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 <[hidden email]>
Till: [hidden email]
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
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



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




--

Best Regards.





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


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




--

Best Regards.





--

Best Regards.





--

Best Regards.



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Transfering a call by opensips

Binan83
In reply to this post by Engineer voip
Hi,

Hi,

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


// Binan


Från: Engineer voip <[hidden email]>
Till: OpenSIPS users mailling list <[hidden email]>
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);
                            }



<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAzMAAAB/CAIAAABUuwtrAAAf5klEQVR4nO2dzW8VR9bGCwlheZOwCAukd8vCmyxwNhFSJMQ/wLtBSqREWTkSbCELhKxsmERRFlmwmGtFaCKEZxbIQWJmpAmLBG8cpEZJ5LGiKB6GmPErMq8D2MaA8UfPoieXprvq9KmP7lPd/fxUi3v7dp065/Spquf2vfZVGwAAAAAAIA6UtAMAAAAAAOC/qPnFu2imluUoZoOtc0C29Tx8pC62uLqaVbQ4G+otqgZl5pW4mA22zgHZ1vPwkbrY4upqVtHibKi3qFp0ymx7e8eqySYuZoOtc0C29Tx8pC62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M3I5zxnLrleGlzGhZlqapvzKbOj168f3R6XP7J0++cuKdl2lrfOPJOCXLPI0TtFSZLbz4xqL8EvE0j/Ra9ALM8KXdFKaqaqjUDeuhXDbDI57KbIGsTE9qmpJMh22zWsib6VWTA1YTvHCabHHmA8/XlanqTFHnXyonob4QaFdNl1jrtul6LTAw1RuRIk7B0K7Sbld2CdXL5Dkdgts1YnropcxoWZaGUGZKqTde3Xfq+P7pc/tpU7bGK2UZfdss+KoduTILQk2rmxvM8KXdFIZzWcVLtyZk43IenbkTB0S8Mt224Rhi9HcsFF2dxS3FS5nRsiz1UGZ5XemgyWjjQYAyc6Cm1c0NZvjSbgrDuazipVsTUGYtQht15Z0JPoLzqxm6Ootbipcyk/rdTCbtMi4+McQdkKVuZdZ4QM3R1cqBMmsX/A/OQJmuzuKW4q7MAg4P43UYbJ0DsvQ8fB+6mrqWKjMAHEC9RQWUWSzGxSeGuAOy9Dx8H7qaOigz0B9Qb1EBZRaLcfGJIe6ALD0P34eupg7KDPQH1FtUQJnFYlx8Yog7IEvPw/ehq6mDMgP9AfUWFVBmsRgXnxjiDsjS8/B96GrqoMxAf 0C9RQWlzIjXAAAAAABAk0CZAQAAAADEApQZAAAAAEAsQJkBAAAAAMSChTJTCjIOAAAAAKBGuGJr+FMYtXoDAAAAANBnWEqr8Dtldfv026BpuTUzNO1VIDvqxae1B1s2GHCIgGmpr9KCGCxdOC+b0b7V+fb1Q3NjBxoYaDAxkSg1mJggzkkayVL5BxmHpGmaKJWmKd6dAgAaoHqV0S5VDXiWc8Bl169JxtWkzDztc3oVzgmbn9oEa8hK87dWtmBrsxX7+q0jYzuXPnn47pHrh0bqHitRKh2Mp0oNdJlJDMfrQCk1GCRZyz/OZFnWMnHWjD8AgN7yH/zr/rNdekUgAAAAAElFTkSuQmCC" alt="">

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 <[hidden email]>
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 <[hidden email]>
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" <[hidden email]> 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 <[hidden email]>
Till: Binan AL Halabi <[hidden email]>; OpenSIPS users mailling list <[hidden email]>
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 <[hidden email]>
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 <[hidden email]>
Till: [hidden email]
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
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



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




--

Best Regards.





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


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




--

Best Regards.





--

Best Regards.



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



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
voipmagazine.wordpress.com/
Reply | Threaded
Open this post in threaded view
|

Re: Transfering a call by opensips

Binan83
In reply to this post by Engineer voip
You can do string transformation the way you like

For example {s.int}  returns integer value of a string-represented number.

Also see the complete syntax for a pseudo variable here: http://www.opensips.org/Resources/DocsCoreVar


// Binan.


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

Hi,
I have resolved my probleme,  now i stocked this time 2012-10-18  17:50:00 in usr_preferences table
and i want to convert it to seconds
wa can convert the current time to secondes by using $Ts but i don't know if is possible to convert a precise that like
2012-10-18  17:50:00

someone know how do it?

2012/10/18 Engineer voip <[hidden email]>
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 <[hidden email]>
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 <[hidden email]>
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" <[hidden email]> 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 <[hidden email]>
Till: Binan AL Halabi <[hidden email]>; OpenSIPS users mailling list <[hidden email]>
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 <[hidden email]>
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 <[hidden email]>
Till: [hidden email]
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
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



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




--

Best Regards.





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


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




--

Best Regards.





--

Best Regards.





--

Best Regards.



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



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
voipmagazine.wordpress.com/
Reply | Threaded
Open this post in threaded view
|

Re: Transfering a call by opensips

SamyGo
Hi  Bunain I think the issue has been stated as solved !!

regards,
Sammy


On Thu, Oct 18, 2012 at 9:41 PM, Binan AL Halabi <[hidden email]> wrote:
You can do string transformation the way you like

For example {s.int}  returns integer value of a string-represented number.

Also see the complete syntax for a pseudo variable here: http://www.opensips.org/Resources/DocsCoreVar


// Binan.


Från: Engineer voip <[hidden email]>
Till: OpenSIPS users mailling list <[hidden email]>
Skickat: torsdag, 18 oktober 2012 17:51

Ämne: Re: [OpenSIPS-Users] Transfering a call by opensips

Hi,
I have resolved my probleme,  now i stocked this time 2012-10-18  17:50:00 in usr_preferences table
and i want to convert it to seconds
wa can convert the current time to secondes by using $Ts but i don't know if is possible to convert a precise that like
2012-10-18  17:50:00

someone know how do it?

2012/10/18 Engineer voip <[hidden email]>
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 <[hidden email]>
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 <[hidden email]>
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" <[hidden email]> 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 <[hidden email]>
Till: Binan AL Halabi <[hidden email]>; OpenSIPS users mailling list <[hidden email]>
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 <[hidden email]>
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 <[hidden email]>
Till: [hidden email]
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
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



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




--

Best Regards.





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


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




--

Best Regards.





--

Best Regards.





--

Best Regards.



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



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



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Transfering a call by opensips

Engineer voip
In reply to this post by Engineer voip
Hi,
Can we convert this time 2012-10-19 09:00:00 to timestamp in opensips.cfg without using an external script?

Cordialement. 
Envoyé de mon iPhone

Le 18 oct. 2012 à 17:51, Engineer voip <[hidden email]> a écrit :

Hi,
I have resolved my probleme,  now i stocked this time 2012-10-18  17:50:00 in usr_preferences table
and i want to convert it to seconds
wa can convert the current time to secondes by using $Ts but i don't know if is possible to convert a precise that like
2012-10-18  17:50:00

someone know how do it?

2012/10/18 Engineer voip <[hidden email]>
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 <[hidden email]>
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 <[hidden email]>

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" <[hidden email]> 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 <[hidden email]>
Till: Binan AL Halabi <[hidden email]>; OpenSIPS users mailling list <[hidden email]>
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 <[hidden email]>
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 <[hidden email]>
Till: [hidden email]
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
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



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




--

Best Regards.





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


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




--

Best Regards.





--

Best Regards.





--

Best Regards.



_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Transfering a call by opensips

Gohar Ahmed

Hi Engineer,

 

Can you please explain a little bit more what should the result look like, seems like it’s already a timestamp “2012-10-19 09:00:00”!

Do you mean to extract only the “09:00:00” part !

 

Regards,

Gohar

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Engineer Voip
Sent: Friday, October 19, 2012 11:45 AM
To: [hidden email]
Subject: Re: [OpenSIPS-Users] Transfering a call by opensips

 

Hi,

Can we convert this time 2012-10-19 09:00:00 to timestamp in opensips.cfg without using an external script?

Cordialement. 

Envoyé de mon iPhone


Le 18 oct. 2012 à 17:51, Engineer voip <[hidden email]> a écrit :

Hi,
I have resolved my probleme,  now i stocked this time 2012-10-18  17:50:00 in usr_preferences table
and i want to convert it to seconds
wa can convert the current time to secondes by using $Ts but i don't know if is possible to convert a precise that like 2012-10-18  17:50:00

someone know how do it?

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

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 <[hidden email]>

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 <[hidden email]>

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" <[hidden email]> 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 <[hidden email]>
Till: Binan AL Halabi <[hidden email]>; OpenSIPS users mailling list <[hidden email]>
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 <[hidden email]>

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 <[hidden email]>
Till: [hidden email]
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
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


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




--

Best Regards.

 


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


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




--

Best Regards.




--

Best Regards.




--

Best Regards.


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Transfering a call by opensips

Engineer voip
In reply to this post by Engineer voip
Hi,
Iwant to convert 2012-10-19 09:00:00 to secondes

Cordialement. 
Envoyé de mon iPhone

Le 19 oct. 2012 à 09:01, "Gohar Ahmed" <[hidden email]> a écrit :

Hi Engineer,

 

Can you please explain a little bit more what should the result look like, seems like it’s already a timestamp “2012-10-19 09:00:00”!

Do you mean to extract only the “09:00:00” part !

 

Regards,

Gohar

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Engineer Voip
Sent: Friday, October 19, 2012 11:45 AM
To: [hidden email]
Subject: Re: [OpenSIPS-Users] Transfering a call by opensips

 

Hi,

Can we convert this time 2012-10-19 09:00:00 to timestamp in opensips.cfg without using an external script?

Cordialement. 

Envoyé de mon iPhone


Le 18 oct. 2012 à 17:51, Engineer voip <[hidden email]> a écrit :

Hi,
I have resolved my probleme,  now i stocked this time 2012-10-18  17:50:00 in usr_preferences table
and i want to convert it to seconds
wa can convert the current time to secondes by using $Ts but i don't know if is possible to convert a precise that like 2012-10-18  17:50:00

someone know how do it?

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

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 <[hidden email]>

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 <[hidden email]>

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" <[hidden email]> 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 <[hidden email]>
Till: Binan AL Halabi <[hidden email]>; OpenSIPS users mailling list <[hidden email]>
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 <[hidden email]>

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 <[hidden email]>
Till: [hidden email]
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
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


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




--

Best Regards.

 


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


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




--

Best Regards.




--

Best Regards.




--

Best Regards.

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

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Transfering a call by opensips

Engineer voip
Hi All,
i have resolved my problem of time by using    $time(%Y%m%d%H%M).

thank you all

2012/10/19 Engineer Voip <[hidden email]>
Hi,
Iwant to convert 2012-10-19 09:00:00 to secondes


Cordialement. 
Envoyé de mon iPhone

Le 19 oct. 2012 à 09:01, "Gohar Ahmed" <[hidden email]> a écrit :

Hi Engineer,

 

Can you please explain a little bit more what should the result look like, seems like it’s already a timestamp “2012-10-19 09:00:00”!

Do you mean to extract only the “09:00:00” part !

 

Regards,

Gohar

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Engineer Voip
Sent: Friday, October 19, 2012 11:45 AM
To: [hidden email]
Subject: Re: [OpenSIPS-Users] Transfering a call by opensips

 

Hi,

Can we convert this time 2012-10-19 09:00:00 to timestamp in opensips.cfg without using an external script?

Cordialement. 

Envoyé de mon iPhone


Le 18 oct. 2012 à 17:51, Engineer voip <[hidden email]> a écrit :

Hi,
I have resolved my probleme,  now i stocked this time <a href="tel:2012-10-18%C2%A0%2017" value="+12012101817" target="_blank">2012-10-18  17:50:00 in usr_preferences table
and i want to convert it to seconds
wa can convert the current time to secondes by using $Ts but i don't know if is possible to convert a precise that like <a href="tel:2012-10-18%C2%A0%2017" value="+12012101817" target="_blank">2012-10-18  17:50:00

someone know how do it?

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

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 <[hidden email]>

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 <[hidden email]>

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" <[hidden email]> 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 <[hidden email]>
Till: Binan AL Halabi <[hidden email]>; OpenSIPS users mailling list <[hidden email]>
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 <[hidden email]>

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 <[hidden email]>
Till: [hidden email]
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
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


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




--

Best Regards.

 


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


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




--

Best Regards.




--

Best Regards.




--

Best Regards.

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



--

Best Regards.



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