<html>
<head>
    <base href="https://wiki.asterisk.org/wiki">
            <link rel="stylesheet" href="/wiki/s/en/2171/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+10+Application_GotoIfTime">Asterisk 10 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="Asterisk10Application_GotoIfTime-GotoIfTime%28%29"></a>GotoIfTime()</h1>

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

<h3><a name="Asterisk10Application_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="Asterisk10Application_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="Asterisk10Application_GotoIfTime-Arguments"></a>Arguments</h5>

<ul>
        <li><tt>condition</tt>
        <ul>
                <li><tt>times</tt></li>
                <li><tt>weekdays</tt></li>
                <li><tt>mdays</tt></li>
                <li><tt>months</tt></li>
                <li><tt>timezone</tt></li>
        </ul>
        </li>
        <li><tt>destination</tt>
        <ul>
                <li><tt>labeliftrue</tt></li>
                <li><tt>labeliffalse</tt></li>
        </ul>
        </li>
</ul>



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

<p><a href="/wiki/display/AST/Asterisk+10+Application_GotoIf" title="Asterisk 10 Application_GotoIf">Asterisk 10 Application&#95;GotoIf</a><br/>
<a href="/wiki/display/AST/Asterisk+10+Function_IFTIME" title="Asterisk 10 Function_IFTIME">Asterisk 10 Function&#95;IFTIME</a><br/>
<a href="/wiki/pages/createpage.action?spaceKey=AST&amp;title=Asterisk+10+Function_TESTTIME&amp;linkCreation=true&amp;fromPageId=19005996" class="createlink">Asterisk 10 Function&#95;TESTTIME</a></p>


<h3><a name="Asterisk10Application_GotoIfTime-ImportVersion"></a>Import Version</h3>
<p>This documentation was imported from Asterisk version SVN-branch-10-r340810.</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+10+Application_GotoIfTime">View Online</a>
              |
       <a href="https://wiki.asterisk.org/wiki/display/AST/Asterisk+10+Application_GotoIfTime?showComments=true&amp;showCommentArea=true#addcomment">Add Comment</a>
           </div>
</div>
</div>
</div>
</div>
</body>
</html>