<html><head></head><body bgcolor="#FFFFFF"><div>Hi,</div><div>Iwant to convert 2012-10-19 09:00:00 to secondes<br><br><div>Cordialement. </div>Envoyé de mon iPhone</div><div><br>Le 19 oct. 2012 à 09:01, "Gohar Ahmed" <<a href="mailto:gohar.ahmed@vopium.com">gohar.ahmed@vopium.com</a>> a écrit :<br><br></div><div></div><blockquote type="cite"><div><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="Generator" content="Microsoft Word 12 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Comic Sans MS";
        panose-1:3 15 7 2 3 3 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.hoenzb
        {mso-style-name:hoenzb;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--><div class="WordSection1"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hi Engineer,<o:p></o:p></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Can you please explain a little bit more what should the result look like, seems like it’s already a timestamp “</span>2012-10-19 09:00:00<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">”! <o:p></o:p></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Do you mean to extract only the “09:00:00” part ! <o:p></o:p></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Regards,<o:p></o:p></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Gohar<o:p></o:p></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p><div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in"><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> <a href="mailto:users-bounces@lists.opensips.org">users-bounces@lists.opensips.org</a> [mailto:users-bounces@lists.opensips.org] <b>On Behalf Of </b>Engineer Voip<br><b>Sent:</b> Friday, October 19, 2012 11:45 AM<br><b>To:</b> <a href="mailto:users@lists.opensips.org">users@lists.opensips.org</a><br><b>Subject:</b> Re: [OpenSIPS-Users] Transfering a call by opensips<o:p></o:p></span></p></div></div><p class="MsoNormal"><o:p> </o:p></p><div><p class="MsoNormal">Hi,<o:p></o:p></p></div><div><p class="MsoNormal" style="margin-bottom:12.0pt">Can we convert this time 2012-10-19 09:00:00 to timestamp in opensips.cfg without using an external script?<o:p></o:p></p><div><p class="MsoNormal">Cordialement. <o:p></o:p></p></div><p class="MsoNormal">Envoyé de mon iPhone<o:p></o:p></p></div><div><p class="MsoNormal" style="margin-bottom:12.0pt"><br>Le 18 oct. 2012 à 17:51, Engineer voip <<a href="mailto:forvoip4@gmail.com">forvoip4@gmail.com</a>> a écrit :<o:p></o:p></p></div><blockquote style="margin-top:5.0pt;margin-bottom:5.0pt"><div><p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-family:"Comic Sans MS"">Hi,<br>I have resolved my probleme, now i stocked this time 2012-10-18 17:50:00 in usr_preferences table <br>and i want to convert it to seconds<br>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<br><br>someone know how do it?</span><o:p></o:p></p><div><p class="MsoNormal">2012/10/18 Engineer voip <<a href="mailto:forvoip4@gmail.com" target="_blank">forvoip4@gmail.com</a>><o:p></o:p></p><p class="MsoNormal" style="margin-bottom:12.0pt">Hi,<br>I trying to do that with avpops module and usr_preferenses table.<br>my script is:<br><br>if ( avp_db_load("$ru/username","a") ) <br> {<br> xlog("L_INFO", " ------------- OFF LINE FORWARD phone number: $avp(s:callfwd)\n");<br> xlog("L_INFO", " ------------- OFF LINE FORWARD from time: $avp(s:from_time)\n");<br> xlog("L_INFO", " ------------- OFF LINE FORWARD TO time: $avp(s:to_time)\n");<br> xlog("L_INFO", "method <$rm> Transforwarding Call from <$fu> r-uri <$ru>\n");<br> <br> <br> if( avp_check("$avp(s:from_time)", "ge/s:10") ) <br> {<br> $ru = $avp(callfwd);<br> route(13);<br> }<br><br><br><br><o:p></o:p></p><div><p class="MsoNormal"><b>but the result is: <br> </b><br> <b> ------------- OFF LINE FORWARD phone number: 12<br> ------------- OFF LINE FORWARD from time: 14<br> ------------- OFF LINE FORWARD TO time: <nul></b><br><br><b>Why i get 12 instead of callfwd value ??</b><o:p></o:p></p><div><div><p class="MsoNormal"><br><br>2012/10/18 Engineer voip <<a href="mailto:forvoip4@gmail.com" target="_blank">forvoip4@gmail.com</a>><o:p></o:p></p><p class="MsoNormal">Hi Muhammad,<br><br>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.<br><b> (user A is an external user and B is an User registred on My opensips)</b><o:p></o:p></p><div><div><p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p><div><p class="MsoNormal">2012/10/18 Muhammad Shahzad <<a href="mailto:shaheryarkh@googlemail.com" target="_blank">shaheryarkh@googlemail.com</a>><o:p></o:p></p><p>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.<o:p></o:p></p><p>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.<o:p></o:p></p><p>Thank you.<o:p></o:p></p><div><div><p>On Oct 18, 2012 10:34 AM, "Binan AL Halabi" <<a href="mailto:binanalhalabi@yahoo.com" target="_blank">binanalhalabi@yahoo.com</a>> wrote:<br>><o:p></o:p></p><blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in"><div><div><div><p class="MsoNormal"><span style="font-size:10.0pt">Hi,<o:p></o:p></span></p></div><div><p class="MsoNormal"><span style="font-size:10.0pt">Add them as Attribute and Value(opensipsctl avp add ....... ): Add them as two separate AVP. <o:p></o:p></span></p></div><div><p class="MsoNormal"><span style="font-size:10.0pt">Then load them in your script as AVP (avp_db_load function).<o:p></o:p></span></p></div><div><p class="MsoNormal"><span style="font-size:10.0pt"><o:p> </o:p></span></p></div><div><p class="MsoNormal"><span style="font-size:10.0pt">// Binan<o:p></o:p></span></p></div><div><p class="MsoNormal"><span style="font-size:10.0pt"><o:p> </o:p></span></p></div><div><div><div><div class="MsoNormal" align="center" style="text-align:center"><span style="font-family:"Arial","sans-serif""><hr size="1" width="100%" align="center"></span></div><p class="MsoNormal"><b><span style="font-family:"Arial","sans-serif"">Från:</span></b><span style="font-family:"Arial","sans-serif""> Engineer voip <<a href="mailto:forvoip4@gmail.com" target="_blank">forvoip4@gmail.com</a>><br><b>Till:</b> Binan AL Halabi <<a href="mailto:binanalhalabi@yahoo.com" target="_blank">binanalhalabi@yahoo.com</a>>; OpenSIPS users mailling list <<a href="mailto:users@lists.opensips.org" target="_blank">users@lists.opensips.org</a>> <br><b>Skickat:</b> torsdag, 18 oktober 2012 10:21<br><b>Ämne:</b> Re: [OpenSIPS-Users] Transfering a call by opensips</span><o:p></o:p></p></div><p class="MsoNormal"><o:p> </o:p></p><div><p class="MsoNormal" style="margin-bottom:12.0pt">Hi,<br><br><span lang="EN">I don't have the fields in user_preferences table or i add them ?</span><o:p></o:p></p><div><p class="MsoNormal">2012/10/18 Binan AL Halabi <<a href="mailto:binanalhalabi@yahoo.com" target="_blank">binanalhalabi@yahoo.com</a>><o:p></o:p></p><div><div><p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:10.0pt">Hi,<br><br>Store in usr_preferences table the time_from and time_to<br>then read them in your script using avpops module <br>Take the hour of the call and compare it to the range you got it from database.<br><br><a href="http://www.opensips.org/html/docs/modules/1.7.x/avpops.html" target="_blank">http://www.opensips.org/html/docs/modules/1.7.x/avpops.html</a><br><br>// Binan <o:p></o:p></span></p><div><div><div><div class="MsoNormal" align="center" style="text-align:center"><span style="font-family:"Arial","sans-serif""><hr size="1" width="100%" align="center"></span></div><p class="MsoNormal"><b><span style="font-family:"Arial","sans-serif"">Från:</span></b><span style="font-family:"Arial","sans-serif""> Engineer Voip <<a href="mailto:forvoip4@gmail.com" target="_blank">forvoip4@gmail.com</a>><br><b>Till:</b> <a href="mailto:users@lists.opensips.org" target="_blank">users@lists.opensips.org</a> <br><b>Skickat:</b> torsdag, 18 oktober 2012 8:53<br><b>Ämne:</b> [OpenSIPS-Users] Transfering a call by opensips</span><o:p></o:p></p></div><div><div><p class="MsoNormal"><br>Hello all, <br>I want to transfert the call to user C when user A calls user B in interval of time for example: 11h-14h<br>I can do that by asterisk but i prefer to do it by opensips<br>It's possible to do that by opensips?<br><br>Cordialement. <br>Envoyé de mon iPhone<o:p></o:p></p></div></div><div><p class="MsoNormal" style="margin-bottom:12.0pt">_______________________________________________<br>Users mailing list<br><a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br><br><o:p></o:p></p></div></div></div></div></div><p class="MsoNormal" style="margin-bottom:12.0pt"><br>_______________________________________________<br>Users mailing list<br><a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><o:p></o:p></p></div><p class="MsoNormal" style="margin-bottom:12.0pt"><br><br clear="all"><br>-- <br><span style="font-family:"Comic Sans MS";color:#663300"><br>Best Regards.<br><br></span><o:p></o:p></p></div><p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p></div></div></div></div><p class="MsoNormal" style="margin-bottom:12.0pt"><br>_______________________________________________<br>Users mailing list<br><a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><o:p></o:p></p></blockquote></div></div><p class="MsoNormal" style="margin-bottom:12.0pt"><br>_______________________________________________<br>Users mailing list<br><a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><o:p></o:p></p></div><p class="MsoNormal" style="margin-bottom:12.0pt"><br><br clear="all"><br>-- <br><span style="font-family:"Comic Sans MS";color:#663300"><br>Best Regards.<br><br></span><o:p></o:p></p></div></div></div></div></div><p class="MsoNormal" style="margin-bottom:12.0pt"><span style="color:#888888"><br><br clear="all"><br><span class="hoenzb">-- </span><br></span><span style="font-family:"Comic Sans MS";color:#663300"><br><span class="hoenzb">Best Regards.</span><br><br></span><o:p></o:p></p></div><p class="MsoNormal" style="margin-bottom:12.0pt"><br><br clear="all"><br>-- <br><span style="font-family:"Comic Sans MS";color:#663300"><br></span><span style="font-family:"Comic Sans MS";color:black">Best Regards.</span><span style="font-family:"Comic Sans MS";color:#663300"><br><br></span><o:p></o:p></p></div></blockquote></div></div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>Users mailing list</span><br><span><a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a></span><br><span><a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a></span><br></div></blockquote></body></html>