[OpenSIPS-Users] Transfering a call by opensips

Engineer voip forvoip4 at gmail.com
Fri Oct 19 11:22:21 CEST 2012


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 <forvoip4 at gmail.com>

> 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" <gohar.ahmed at vopium.com> 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:* users-bounces at lists.opensips.org [mailto:
> users-bounces at lists.opensips.org] *On Behalf Of *Engineer Voip
> *Sent:* Friday, October 19, 2012 11:45 AM
> *To:* users at lists.opensips.org
> *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 <forvoip4 at gmail.com> 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 <forvoip4 at gmail.com>****
>
> 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 <forvoip4 at gmail.com>****
>
> 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 <shaheryarkh at googlemail.com>****
>
> 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" <binanalhalabi at yahoo.com>
> 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 <forvoip4 at gmail.com>
> *Till:* Binan AL Halabi <binanalhalabi at yahoo.com>; OpenSIPS users
> mailling list <users at lists.opensips.org>
> *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 <binanalhalabi at yahoo.com>****
>
> 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 <forvoip4 at gmail.com>
> *Till:* users at lists.opensips.org
> *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
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
> ****
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users****
>
>
>
>
> --
>
> Best Regards.
>
> ****
>
> ** **
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users****
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users****
>
>
>
>
> --
>
> Best Regards.
>
> ****
>
>
>
>
> --
>
> Best Regards.
>
> ****
>
>
>
>
> --
>
> Best Regards.
>
> ****
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>


-- 

Best Regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20121019/00d7f0a6/attachment.htm>


More information about the Users mailing list