Displaying 12 results from an estimated 12 matches for "func_math".
2020 Feb 13
0
Help with FUNC_MATH
...eed to account for that in your comparison.
--Don
From: asterisk-users [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Dovid Bender
Sent: Thursday, February 13, 2020 4:47 AM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [asterisk-users] Help with FUNC_MATH
Hi,
I have some dialplan code that is trying to convert 12 hour time with AM/PM to 24 hour format. The code has something like this:
Exten => 2,1,ExecIf(${MATH(${HOUR_SELECTED}<12)}?Set(HOUR_SELECTED=${MATH(${HOUR_SELECTED}+12,int)}))
Earlier on in the dialplan HOUR_SELECTED is se...
2020 Feb 13
1
Help with FUNC_MATH
...on
>
>
>
>
>
> *From:* asterisk-users [mailto:asterisk-users-bounces at lists.digium.com] *On
> Behalf Of *Dovid Bender
> *Sent:* Thursday, February 13, 2020 4:47 AM
> *To:* Asterisk Users Mailing List - Non-Commercial Discussion
> *Subject:* [asterisk-users] Help with FUNC_MATH
>
>
>
> Hi,
>
>
>
> I have some dialplan code that is trying to convert 12 hour time with
> AM/PM to 24 hour format. The code has something like this:
> Exten =>
> 2,1,ExecIf(${MATH(${HOUR_SELECTED}<12)}?Set(HOUR_SELECTED=${MATH(${HOUR_SELECTED}+12,int)}))
>...
2020 Feb 13
0
Help with FUNC_MATH
Try using the STRFIME function instead of doing this by hand.
https://wiki.asterisk.org/wiki/display/AST/Function_STRFTIME
*%H*
The hour as a decimal number using a 24-hour clock (range 00 to 23).
*%I*
The hour as a decimal number using a 12-hour clock (range 01 to 12).
On Thu, Feb 13, 2020 at 3:49 AM Dovid Bender <dovid at telecurve.com> wrote:
> Hi,
>
> I have some dialplan
2020 Feb 13
0
Help with FUNC_MATH
My Apologies Dovid, I think I misunderstood your request.
You don't have the time you need to convert in the format of date string,
Instead you have your users entering via DTMF when they want something to
happen?
On Thu, Feb 13, 2020 at 11:08 AM Dovid Bender <dovid at telecurve.com> wrote:
> John,
>
> From looking at the wiki won't STRFIME just give me what I need based
2020 Feb 13
4
Help with FUNC_MATH
Hi,
I have some dialplan code that is trying to convert 12 hour time with AM/PM
to 24 hour format. The code has something like this:
Exten =>
2,1,ExecIf(${MATH(${HOUR_SELECTED}<12)}?Set(HOUR_SELECTED=${MATH(${HOUR_SELECTED}+12,int)}))
Earlier on in the dialplan HOUR_SELECTED is set to 12. When they press
option 2 they are selecting PM. If the time is from 1PM to 11PM then I want
to add 12
2013 Mar 04
2
Asterisk 11 - How to trim the number of modules to minimum ?
...> format_wav.so
load => format_wav_gsm.so
load => res_agi.so
load => res_clioriginate.so
load => res_fax.so
load => res_musiconhold.so
load => res_timing_timerfd.so
load => func_callerid.so
load => func_cdr.so
load => func_channel.so
load => func_cut.so
load => func_math.so
load => func_rand.so
load => func_strings.so
load => func_global.so
load => cdr_csv.so
Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20130304/4dd71bd5/attachment.htm>
2020 Feb 13
2
Help with FUNC_MATH
John,
That is correct. I am trying to figure out why Asterisk is executing the
set part of the execif, if it's coming back as false.
On Thu, Feb 13, 2020 at 2:10 PM John Kiniston <johnkiniston at gmail.com>
wrote:
> My Apologies Dovid, I think I misunderstood your request.
>
> You don't have the time you need to convert in the format of date string,
> Instead you
2020 Feb 13
2
Help with FUNC_MATH
John,
>From looking at the wiki won't STRFIME just give me what I need based on
the unix time that I put in? What I am actually looking to do is convert
over from 12 hour format to 24 (unless strftime does just that and I don't
kow what am I am doing?).
On Thu, Feb 13, 2020 at 12:03 PM John Kiniston <johnkiniston at gmail.com>
wrote:
> Try using the STRFIME function
2006 Dec 20
0
MATH function
I try to use function MATH or GoToIf for checking the negative value
but CLI shows an error as following.
exten => s,11,Set(bt=${MATH(-1>0)})
func_math.c:164 builtin_function_math: '' is not a valid number
exten => s,11,GoToIf($[-1 < 0]?20)
WARNING[12926]: ast_expr2.y:729 op_negate: non-numeric argument
It seems both functions can't accept negative number for comparison.
What function can I use to compare negative number?
2007 May 15
1
Asterisk 1.4.4 reproducibly dumps core on Solaris 10
...ymbols from /opt/asterisk/lib/modules/func_language.so...done.
Loaded symbols for /opt/asterisk/lib/modules/func_language.so
Reading symbols from /opt/asterisk/lib/modules/func_logic.so...done.
Loaded symbols for /opt/asterisk/lib/modules/func_logic.so
Reading symbols from /opt/asterisk/lib/modules/func_math.so...done.
Loaded symbols for /opt/asterisk/lib/modules/func_math.so
Reading symbols from /opt/asterisk/lib/modules/func_md5.so...done.
Loaded symbols for /opt/asterisk/lib/modules/func_md5.so
Reading symbols from /opt/asterisk/lib/modules/func_moh.so...done.
Loaded symbols for /opt/asterisk/lib/mo...
2007 Jul 26
0
Asterisk 1.4.9 reproducibly dumps core on Solaris 10
...erisk/lib/modules/func_language.so...done.
> Loaded symbols for /opt/asterisk/lib/modules/func_language.so
> Reading symbols from /opt/asterisk/lib/modules/func_logic.so...done.
> Loaded symbols for /opt/asterisk/lib/modules/func_logic.so
> Reading symbols from /opt/asterisk/lib/modules/func_math.so...done.
> Loaded symbols for /opt/asterisk/lib/modules/func_math.so
> Reading symbols from /opt/asterisk/lib/modules/func_md5.so...done.
> Loaded symbols for /opt/asterisk/lib/modules/func_md5.so
> Reading symbols from /opt/asterisk/lib/modules/func_moh.so...done.
> Loaded symbols...
2009 Sep 02
1
AMI Originate Commands executed in sequential Order problem
...ing directory `/usr/src/asterisk-1.4.20.1/cdr'
make[1]: Entering directory `/usr/src/asterisk-1.4.20.1/funcs'
for x in func_base64.so func_callerid.so func_cdr.so func_channel.so
func_cut.so func_db.so func_enum.so func_env.so func_global.so
func_groupcount.so func_language.so func_logic.so func_math.so func_md5.so
func_moh.so func_rand.so func_realtime.so func_sha1.so func_strings.so
func_timeout.so func_uri.so; do /usr/bin/install -c -m 755 $x
/usr/lib/asterisk/modules ; done
make[1]: Leaving directory `/usr/src/asterisk-1.4.20.1/funcs'
make[1]: Entering directory `/usr/src/asterisk-1.4.2...