In my dial plan I have these two lines: exten => _NXXXXXX,n,Set(recordfilename=${CALLERID(num)}-${EXTEN}-${STRFTIME(${EPOCH},MST,%C%y-%m-%d-%H%M)}.wav) exten => _NXXXXXX,n,MixMonitor(${recordfilename},b) How to add "if" statement to execute these line only after let say 5pm. To record conversation only after 5pm. -- Joseph
GotoIfTime() Check out- http://www.voip-info.org/wiki/view/Asterisk+cmd+GotoIfTime If the time is within a certain range, execute the recording dialplan. If it's outside the range, then skip to the dialplan after the recording stuff. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20140911/06e3d136/attachment.html>
See ExecIf in the output of "core show applications". The IF function might be useful, see "core show functions". I assume the Asterisk Book also covers this. -----Original Message----- From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Joseph Sent: Thursday, September 11, 2014 5:43 PM To: asterisk-users at lists.digium.com Subject: [asterisk-users] if statement recording - after hours In my dial plan I have these two lines: exten => _NXXXXXX,n,Set(recordfilename=${CALLERID(num)}-${EXTEN}-${STRFTIME(${EPOCH},MST,%C%y-%m-%d-%H%M)}.wav) exten => _NXXXXXX,n,MixMonitor(${recordfilename},b) How to add "if" statement to execute these line only after let say 5pm. To record conversation only after 5pm. -- Joseph -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Read GotoIfTime function.p On 12-Sep-2014 3:13 AM, "Joseph" <syscon780 at gmail.com> wrote:> In my dial plan I have these two lines: > > exten => _NXXXXXX,n,Set(recordfilename=${CALLERID(num)}-${EXTEN}-${ > STRFTIME(${EPOCH},MST,%C%y-%m-%d-%H%M)}.wav) > exten => _NXXXXXX,n,MixMonitor(${recordfilename},b) > > How to add "if" statement to execute these line only after let say 5pm. > To record conversation only after 5pm. > > -- > Joseph > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: > http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20140912/6e63eccd/attachment.html>
Reasonably Related Threads
- Record call ends in 10min
- conversation record prematurely
- How to get ringing sound in outbound call in asterisk
- file.c:1160 ast_writefile: Unable to open file /var/spool/asterisk/monitor/11Feb2014/_11-Feb-2014-17-44-01.wav: No such file or directory
- Changing or Adding a Line to the Extensions.conf in Asterisk