<html>
<head>
    <base href="https://wiki.asterisk.org/wiki">
            <link rel="stylesheet" href="/wiki/s/en/2172/18/9/_/styles/combined.css?spaceKey=AST&amp;forWysiwyg=true" type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+Application_GotoIfTime">Asterisk 11 Application_GotoIfTime</a></h2>
    <h4>Page  <b>added</b> by             <a href="https://wiki.asterisk.org/wiki/display/~wikibot">Wiki Bot</a>
    </h4>
         <br/>
    <div class="notificationGreySide">
         <h1><a name="Asterisk11Application_GotoIfTime-GotoIfTime%28%29"></a>GotoIfTime()</h1>

<h3><a name="Asterisk11Application_GotoIfTime-Synopsis"></a>Synopsis</h3>

<p>Conditional Goto based on the current time.</p>
<h3><a name="Asterisk11Application_GotoIfTime-Description"></a>Description</h3>



<p>This application will set the context, extension, and priority in the channel structure based on the evaluation of the given time specification. After this application completes, the pbx engine will continue dialplan execution at the specified location in the dialplan. If the current time is within the given time specification, the channel will continue at <em>labeliftrue</em>. Otherwise the channel will continue at <em>labeliffalse</em>. If the label chosen by the condition is omitted, no jump is performed, and execution passes to the next instruction. If the target jump location is bogus, the same actions would be taken as for <tt>Goto</tt>. Further information on the time specification can be found in examples illustrating how to do time-based context includes in the dialplan.</p>

<h3><a name="Asterisk11Application_GotoIfTime-Syntax"></a>Syntax</h3>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent panelContent">
<pre>GotoIfTime(timesweekdaysmdaysmonths[timezone]labeliftrue:labeliffalse)</pre>
</div></div>
<h5><a name="Asterisk11Application_GotoIfTime-Arguments"></a>Arguments</h5>


<ul>
        <li>condition
        <ul>
                <li>times</li>
                <li>weekdays</li>
                <li>mdays</li>
                <li>months</li>
                <li>timezone</li>
        </ul>
        </li>
        <li>destination
        <ul>
                <li>labeliftrue - Continue at <em>labeliftrue</em> if the condition is true. Takes the form similar to Goto() of [<a href="/wiki/pages/createpage.action?spaceKey=AST&amp;title=context%2C&amp;linkCreation=true&amp;fromPageId=20187327" class="createlink">context,</a>extension,]priority.</li>
                <li>labeliffalse - Continue at <em>labeliffalse</em> if the condition is false. Takes the form similar to Goto() of [<a href="/wiki/pages/createpage.action?spaceKey=AST&amp;title=context%2C&amp;linkCreation=true&amp;fromPageId=20187327" class="createlink">context,</a>extension,]priority.</li>
        </ul>
        </li>
</ul>


<h3><a name="Asterisk11Application_GotoIfTime-SeeAlso"></a>See Also</h3>


<ul>
        <li><a href="/wiki/display/AST/Asterisk+11+Application_GotoIf" title="Asterisk 11 Application_GotoIf">Asterisk 11 Application&#95;GotoIf</a></li>
        <li><a href="/wiki/display/AST/Asterisk+11+Application_Goto" title="Asterisk 11 Application_Goto">Asterisk 11 Application&#95;Goto</a></li>
        <li><a href="/wiki/display/AST/Asterisk+11+Function_IFTIME" title="Asterisk 11 Function_IFTIME">Asterisk 11 Function&#95;IFTIME</a></li>
        <li><a href="/wiki/pages/createpage.action?spaceKey=AST&amp;title=Asterisk+11+Function_TESTTIME&amp;linkCreation=true&amp;fromPageId=20187327" class="createlink">Asterisk 11 Function&#95;TESTTIME</a></li>
</ul>


<h3><a name="Asterisk11Application_GotoIfTime-ImportVersion"></a>Import Version</h3>

<p>This documentation was imported from Asterisk Version SVN-trunk-r370322</p>
    </div>
    <div id="commentsSection" class="wiki-content pageSection">
       <div style="float: right;" class="grey">
                        <a href="https://wiki.asterisk.org/wiki/users/removespacenotification.action?spaceKey=AST">Stop watching space</a>
            <span style="padding: 0px 5px;">|</span>
                <a href="https://wiki.asterisk.org/wiki/users/editmyemailsettings.action">Change email notification preferences</a>
</div>
       <a href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+Application_GotoIfTime">View Online</a>
              |
       <a href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+Application_GotoIfTime?showComments=true&amp;showCommentArea=true#addcomment">Add Comment</a>
           </div>
</div>
</div>
</div>
</div>
</body>
</html>