<p>N A has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/17660">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">configs: Updates to sample configs<br><br>Includes some minor updates to extensions.conf<br>and iax.conf. In particular, the demonstration<br>of macros in extensions.conf is removed, as<br>Macro is deprecated and will be removed soon.<br>These examples have been replaced with examples<br>demonstrating the usage of Gosub instead.<br><br>The older exten => ...,n syntax is also mostly<br>replaced with the same keyword to demonstrate the<br>newer, more concise way of defining extensions.<br><br>IAXTEL no longer exists, so this example is replaced<br>with something more generic.<br><br>Some documentation is also added to extensions.conf<br>and iax.conf to clarify some of the new expanded<br>encryption capabilities with IAX2.<br><br>ASTERISK-29758 #close<br><br>Change-Id: I04fba9671aa1ee9ba1bd5027061f80bbe38e7b46<br>---<br>M configs/samples/extensions.conf.sample<br>M configs/samples/iax.conf.sample<br>2 files changed, 142 insertions(+), 129 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/60/17660/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/configs/samples/extensions.conf.sample b/configs/samples/extensions.conf.sample</span><br><span>index 8d6c3e8..a371953 100644</span><br><span>--- a/configs/samples/extensions.conf.sample</span><br><span>+++ b/configs/samples/extensions.conf.sample</span><br><span>@@ -223,10 +223,10 @@</span><br><span> ;</span><br><span> ; so that dialtone remains even after dialing a 9. Please note that ignorepat</span><br><span> ; only works with channels which receive dialtone from the PBX, such as DAHDI,</span><br><span style="color: hsl(0, 100%, 40%);">-; Phone, and VPB. Other channels, such as SIP and MGCP, which generate their</span><br><span style="color: hsl(0, 100%, 40%);">-; own dialtone and converse with the PBX only after a number is complete, are</span><br><span style="color: hsl(0, 100%, 40%);">-; generally unaffected by ignorepat (unless DISA or another method is used to</span><br><span style="color: hsl(0, 100%, 40%);">-; generate a dialtone after answering the channel).</span><br><span style="color: hsl(120, 100%, 40%);">+; Phone, and VPB. Other channels, such as IAX2, PJSIP, SIP and MGCP, which generate</span><br><span style="color: hsl(120, 100%, 40%);">+; generate their own dialtone and converse with the PBX only after a number is</span><br><span style="color: hsl(120, 100%, 40%);">+; complete, are generally unaffected by ignorepat (unless DISA or another method</span><br><span style="color: hsl(120, 100%, 40%);">+; is used to generate a dialtone after answering the channel).</span><br><span> ;</span><br><span> </span><br><span> ;</span><br><span>@@ -241,12 +241,15 @@</span><br><span> ;exten => 12564286000,1,Gosub(6000,stdexten(IAX2/foo))</span><br><span> ;exten => 12564286000,n,Goto(default,s,1) ; exited Voicemail</span><br><span> ;exten => _125642860XX,1,Dial(IAX2/otherbox/${EXTEN:7})</span><br><span style="color: hsl(120, 100%, 40%);">+;exten => _125642861XX,1,Dial(IAX2/user@example.com/${EXTEN:7})</span><br><span style="color: hsl(120, 100%, 40%);">+;exten => _125642862XX,1,Dial(IAX2/user:secret@example.com/${EXTEN:7})</span><br><span style="color: hsl(120, 100%, 40%);">+;exten => _125642863XX,1,Dial(IAX2/user:secret:[outkey]@example.com/${EXTEN:7})</span><br><span> </span><br><span> [dundi-e164-customers]</span><br><span> ;</span><br><span> ; If you are an ITSP or Reseller, list your customers here.</span><br><span> ;</span><br><span style="color: hsl(0, 100%, 40%);">-;exten => _12564286000,1,Dial(SIP/customer1)</span><br><span style="color: hsl(120, 100%, 40%);">+;exten => _12564286000,1,Dial(PJSIP/customer1)</span><br><span> ;exten => _12564286001,1,Dial(IAX2/customer2)</span><br><span> </span><br><span> [dundi-e164-via-pstn]</span><br><span>@@ -279,10 +282,10 @@</span><br><span> include => dundi-e164-local</span><br><span> include => dundi-e164-switch</span><br><span> ;</span><br><span style="color: hsl(0, 100%, 40%);">-; DUNDi can also be implemented as a Macro instead of using</span><br><span style="color: hsl(120, 100%, 40%);">+; DUNDi can also be implemented as a subroutine instead of using</span><br><span> ; the Local channel driver.</span><br><span> ;</span><br><span style="color: hsl(0, 100%, 40%);">-[macro-dundi-e164]</span><br><span style="color: hsl(120, 100%, 40%);">+[dundi-e164]</span><br><span> ;</span><br><span> ; ARG1 is the extension to Dial</span><br><span> ;</span><br><span>@@ -300,13 +303,10 @@</span><br><span> include => dundi-e164-lookup</span><br><span> </span><br><span> ;</span><br><span style="color: hsl(0, 100%, 40%);">-; Here are the entries you need to participate in the IAXTEL</span><br><span style="color: hsl(0, 100%, 40%);">-; call routing system. Most IAXTEL numbers begin with 1-700, but</span><br><span style="color: hsl(0, 100%, 40%);">-; there are exceptions. For more information, and to sign</span><br><span style="color: hsl(0, 100%, 40%);">-; up, please go to www.gnophone.com or www.iaxtel.com</span><br><span style="color: hsl(120, 100%, 40%);">+; Here is how to make a call to another Asterisk server using the IAX2 protocol</span><br><span> ;</span><br><span style="color: hsl(0, 100%, 40%);">-[iaxtel700]</span><br><span style="color: hsl(0, 100%, 40%);">-exten => _91700XXXXXXX,1,Dial(IAX2/${GLOBAL(IAXINFO)}@iaxtel.com/${EXTEN:1}@iaxtel)</span><br><span style="color: hsl(120, 100%, 40%);">+[iax2-trunk]</span><br><span style="color: hsl(120, 100%, 40%);">+exten => _555XXXX,1,Dial(IAX2/username:secret@example.com/${EXTEN}@some-dialplan-context)</span><br><span> </span><br><span> ;</span><br><span> ; The SWITCH statement permits a server to share the dialplan with</span><br><span>@@ -321,14 +321,15 @@</span><br><span> ;</span><br><span> ; International long distance through trunk</span><br><span> ;</span><br><span style="color: hsl(0, 100%, 40%);">-exten => _9011.,1,Macro(dundi-e164,${EXTEN:4})</span><br><span style="color: hsl(120, 100%, 40%);">+exten => _9011.,1,Gosub(dundi-e164,s,1(${EXTEN:4}))</span><br><span style="color: hsl(120, 100%, 40%);">+; same => n,Hangup()</span><br><span> exten => _9011.,n,Dial(${GLOBAL(TRUNK)}/${FILTER(0-9,${EXTEN:${GLOBAL(TRUNKMSD)}})})</span><br><span> </span><br><span> [trunkld]</span><br><span> ;</span><br><span> ; Long distance context accessed through trunk</span><br><span> ;</span><br><span style="color: hsl(0, 100%, 40%);">-exten => _91NXXNXXXXXX,1,Macro(dundi-e164,${EXTEN:1})</span><br><span style="color: hsl(120, 100%, 40%);">+exten => _91NXXNXXXXXX,1,Gosub(dundi-e164,s,1(${EXTEN:1}))</span><br><span> exten => _91NXXNXXXXXX,n,Dial(${GLOBAL(TRUNK)}/${EXTEN:${GLOBAL(TRUNKMSD)}})</span><br><span> </span><br><span> [trunklocal]</span><br><span>@@ -421,36 +422,46 @@</span><br><span> ; from the [outbound-freenum] context</span><br><span> ;</span><br><span> exten => _X!,1,Verbose(2,Performing ISN lookup for ${EXTEN})</span><br><span style="color: hsl(0, 100%, 40%);">-same => n,Set(SUFFIX=${CUT(EXTEN,*,2-)}) ; make sure the suffix is all digits as well</span><br><span style="color: hsl(0, 100%, 40%);">-same => n,GotoIf($["${FILTER(0-9,${SUFFIX})}" != "${SUFFIX}"]?fn-CONGESTION,1)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Set(SUFFIX=${CUT(EXTEN,*,2-)}) ; make sure the suffix is all digits as well</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,GotoIf($["${FILTER(0-9,${SUFFIX})}" != "${SUFFIX}"]?fn-CONGESTION,1)</span><br><span> ; filter out bad characters per the README-SERIOUSLY.best-practices.txt document</span><br><span style="color: hsl(0, 100%, 40%);">-same => n,Set(TIMEOUT(absolute)=10800)</span><br><span style="color: hsl(0, 100%, 40%);">-same => n,Set(isnresult=${ENUMLOOKUP(${EXTEN},sip,,1,freenum.org)}) ; perform our lookup with freenum.org</span><br><span style="color: hsl(0, 100%, 40%);">-same => n,GotoIf($["${isnresult}" != ""]?from)</span><br><span style="color: hsl(0, 100%, 40%);">-same => n,Set(DIALSTATUS=CONGESTION)</span><br><span style="color: hsl(0, 100%, 40%);">-same => n,Goto(fn-CONGESTION,1)</span><br><span style="color: hsl(0, 100%, 40%);">-same => n(from),Set(__SIPFROMUSER=${CALLERID(num)})</span><br><span style="color: hsl(0, 100%, 40%);">-same => n,GotoIf($["${GLOBAL(FREENUMDOMAIN)}" = ""]?dial) ; check if we set the FREENUMDOMAIN global variable in [global]</span><br><span style="color: hsl(0, 100%, 40%);">-same => n,Set(__SIPFROMDOMAIN=${GLOBAL(FREENUMDOMAIN)}) ; if we did set it, then we'll use it for our outbound dialing domain</span><br><span style="color: hsl(0, 100%, 40%);">-same => n(dial),Dial(SIP/${isnresult},40)</span><br><span style="color: hsl(0, 100%, 40%);">-same => n,Goto(fn-${DIALSTATUS},1)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Set(TIMEOUT(absolute)=10800)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Set(isnresult=${ENUMLOOKUP(${EXTEN},sip,,1,freenum.org)}) ; perform our lookup with freenum.org</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,GotoIf($["${isnresult}" != ""]?from)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Set(DIALSTATUS=CONGESTION)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Goto(fn-CONGESTION,1)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n(from),Set(__SIPFROMUSER=${CALLERID(num)})</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,GotoIf($["${GLOBAL(FREENUMDOMAIN)}" = ""]?dial) ; check if we set the FREENUMDOMAIN global variable in [global]</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Set(__SIPFROMDOMAIN=${GLOBAL(FREENUMDOMAIN)}) ; if we did set it, then we'll use it for our outbound dialing domain</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n(dial),Dial(SIP/${isnresult},40)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Goto(fn-${DIALSTATUS},1)</span><br><span> </span><br><span> exten => fn-BUSY,1,Busy()</span><br><span> </span><br><span> exten => _f[n]-.,1,NoOp(ISN: ${DIALSTATUS})</span><br><span> same => n,Congestion()</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-[macro-trunkdial]</span><br><span style="color: hsl(120, 100%, 40%);">+[trunkdial]</span><br><span> ;</span><br><span style="color: hsl(0, 100%, 40%);">-; Standard trunk dial macro (hangs up on a dialstatus that should</span><br><span style="color: hsl(120, 100%, 40%);">+; Standard trunk dial subroutine (hangs up on a dialstatus that should</span><br><span> ; terminate call)</span><br><span> ; ${ARG1} - What to dial</span><br><span> ;</span><br><span style="color: hsl(0, 100%, 40%);">-exten => s,1,Dial(${ARG1})</span><br><span style="color: hsl(120, 100%, 40%);">+exten => s,1,StackPop()</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Dial(${ARG1})</span><br><span> exten => s,n,Goto(s-${DIALSTATUS},1)</span><br><span> exten => s-NOANSWER,1,Hangup()</span><br><span style="color: hsl(0, 100%, 40%);">-exten => s-BUSY,1,Hangup()</span><br><span style="color: hsl(0, 100%, 40%);">-exten => _s-.,1,NoOp</span><br><span style="color: hsl(120, 100%, 40%);">+exten => s-BUSY,1,PlayTones(busy)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Wait(60)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Hangup()</span><br><span style="color: hsl(120, 100%, 40%);">+exten => s-CHANUNAVAIL,1,PlayTones(congestion)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Wait(60)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Hangup()</span><br><span style="color: hsl(120, 100%, 40%);">+exten => s-CONGESTION,1,PlayTones(congestion)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Wait(60)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Hangup()</span><br><span style="color: hsl(120, 100%, 40%);">+exten => _s-.,1,NoOp(${DIALSTATUS})</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Hangup()</span><br><span> </span><br><span> [stdexten]</span><br><span> ;</span><br><span>@@ -471,18 +482,18 @@</span><br><span> ; previous value (before being declared as LOCAL()) upon Return.</span><br><span> ;</span><br><span> exten => _X.,50000(stdexten),NoOp(Start stdexten)</span><br><span style="color: hsl(0, 100%, 40%);">-exten => _X.,n,Set(LOCAL(ext)=${EXTEN})</span><br><span style="color: hsl(0, 100%, 40%);">-exten => _X.,n,Set(LOCAL(dev)=${ARG1})</span><br><span style="color: hsl(0, 100%, 40%);">-exten => _X.,n,Set(LOCAL(cntx)=${ARG2})</span><br><span style="color: hsl(0, 100%, 40%);">-exten => _X.,n,Set(LOCAL(mbx)=${ext}${IF($[!${ISNULL(${cntx})}]?@${cntx})})</span><br><span style="color: hsl(0, 100%, 40%);">-exten => _X.,n,Dial(${dev},20) ; Ring the interface, 20 seconds maximum</span><br><span style="color: hsl(0, 100%, 40%);">-exten => _X.,n,Goto(stdexten-${DIALSTATUS},1) ; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Set(LOCAL(ext)=${EXTEN})</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Set(LOCAL(dev)=${ARG1})</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Set(LOCAL(cntx)=${ARG2})</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Set(LOCAL(mbx)=${ext}${IF($[!${ISNULL(${cntx})}]?@${cntx})})</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Dial(${dev},20) ; Ring the interface, 20 seconds maximum</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Goto(stdexten-${DIALSTATUS},1) ; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER)</span><br><span> </span><br><span> exten => stdexten-NOANSWER,1,VoiceMail(${mbx},u) ; If unavailable, send to voicemail w/ unavail announce</span><br><span style="color: hsl(0, 100%, 40%);">-exten => stdexten-NOANSWER,n,Return() ; If they press #, return to start</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Return() ; If they press #, return to start</span><br><span> </span><br><span> exten => stdexten-BUSY,1,VoiceMail(${mbx},b) ; If busy, send to voicemail w/ busy announce</span><br><span style="color: hsl(0, 100%, 40%);">-exten => stdexten-BUSY,n,Return() ; If they press #, return to start</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Return() ; If they press #, return to start</span><br><span> </span><br><span> exten => _stde[x]te[n]-.,1,Goto(stdexten-NOANSWER,1) ; Treat anything else as no answer</span><br><span> </span><br><span>@@ -501,24 +512,24 @@</span><br><span> ; See above note in stdexten about priority handling on exit.</span><br><span> ;</span><br><span> exten => _X.,60000(stdPrivacyexten),NoOp(Start stdPrivacyexten)</span><br><span style="color: hsl(0, 100%, 40%);">-exten => _X.,n,Set(LOCAL(ext)=${ARG1})</span><br><span style="color: hsl(0, 100%, 40%);">-exten => _X.,n,Set(LOCAL(dev)=${ARG2})</span><br><span style="color: hsl(0, 100%, 40%);">-exten => _X.,n,Set(LOCAL(dontcntx)=${ARG3})</span><br><span style="color: hsl(0, 100%, 40%);">-exten => _X.,n,Set(LOCAL(tortcntx)=${ARG4})</span><br><span style="color: hsl(0, 100%, 40%);">-exten => _X.,n,Set(LOCAL(cntx)=${ARG5})</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Set(LOCAL(ext)=${ARG1})</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Set(LOCAL(dev)=${ARG2})</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Set(LOCAL(dontcntx)=${ARG3})</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Set(LOCAL(tortcntx)=${ARG4})</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Set(LOCAL(cntx)=${ARG5})</span><br><span> </span><br><span> exten => _X.,n,Set(LOCAL(mbx)="${ext}"$["${cntx}" ? "@${cntx}" :: ""])</span><br><span style="color: hsl(0, 100%, 40%);">-exten => _X.,n,Dial(${dev},20,p) ; Ring the interface, 20 seconds maximum, call screening</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Dial(${dev},20,p) ; Ring the interface, 20 seconds maximum, call screening</span><br><span> ; option (or use P for databased call _X.screening)</span><br><span style="color: hsl(0, 100%, 40%);">-exten => _X.,n,Goto(stdexten-${DIALSTATUS},1) ; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Goto(stdexten-${DIALSTATUS},1) ; Jump based on status (NOANSWER,BUSY,CHANUNAVAIL,CONGESTION,ANSWER)</span><br><span> </span><br><span> exten => stdexten-NOANSWER,1,VoiceMail(${mbx},u) ; If unavailable, send to voicemail w/ unavail announce</span><br><span style="color: hsl(0, 100%, 40%);">-exten => stdexten-NOANSWER,n,NoOp(Finish stdPrivacyexten NOANSWER)</span><br><span style="color: hsl(0, 100%, 40%);">-exten => stdexten-NOANSWER,n,Return() ; If they press #, return to start</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,NoOp(Finish stdPrivacyexten NOANSWER)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Return() ; If they press #, return to start</span><br><span> </span><br><span> exten => stdexten-BUSY,1,VoiceMail(${mbx},b) ; If busy, send to voicemail w/ busy announce</span><br><span style="color: hsl(0, 100%, 40%);">-exten => stdexten-BUSY,n,NoOp(Finish stdPrivacyexten BUSY)</span><br><span style="color: hsl(0, 100%, 40%);">-exten => stdexten-BUSY,n,Return() ; If they press #, return to start</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,NoOp(Finish stdPrivacyexten BUSY)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Return() ; If they press #, return to start</span><br><span> </span><br><span> exten => stdexten-DONTCALL,1,Goto(${dontcntx},s,1) ; Callee chose to send this call to a polite "Don't call again" script.</span><br><span> </span><br><span>@@ -527,24 +538,22 @@</span><br><span> exten => _stde[x]te[n]-.,1,Goto(stdexten-NOANSWER,1) ; Treat anything else as no answer</span><br><span> </span><br><span> exten => a,1,VoiceMailMain(${mbx}) ; If they press *, send the user into VoicemailMain</span><br><span style="color: hsl(0, 100%, 40%);">-exten => a,n,Return()</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Return()</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-[macro-page]</span><br><span style="color: hsl(120, 100%, 40%);">+[sub-page]</span><br><span> ;</span><br><span style="color: hsl(0, 100%, 40%);">-; Paging macro:</span><br><span style="color: hsl(120, 100%, 40%);">+; Paging subroutine:</span><br><span> ;</span><br><span> ; Check to see if SIP device is in use and DO NOT PAGE if they are</span><br><span> ;</span><br><span> ; ${ARG1} - Device to page</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span> exten => s,1,ChanIsAvail(${ARG1},s) ; s is for ANY call</span><br><span style="color: hsl(0, 100%, 40%);">-exten => s,n,GotoIf($[${AVAILSTATUS} = "1"]?autoanswer:fail)</span><br><span style="color: hsl(0, 100%, 40%);">-exten => s,n(autoanswer),Set(_ALERT_INFO="RA") ; This is for the PolyComs</span><br><span style="color: hsl(0, 100%, 40%);">-exten => s,n,SIPAddHeader(Call-Info: Answer-After=0) ; This is for the Grandstream, Snoms, and Others</span><br><span style="color: hsl(0, 100%, 40%);">-exten => s,n,NoOp() ; Add others here and Post on the Wiki!!!!</span><br><span style="color: hsl(0, 100%, 40%);">-exten => s,n,Dial(${ARG1})</span><br><span style="color: hsl(0, 100%, 40%);">-exten => s,n(fail),Hangup()</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,GotoIf($["${AVAILSTATUS}" = "1"]?autoanswer:fail)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n(autoanswer),Set(_ALERT_INFO="RA") ; This is for the PolyComs</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,SIPAddHeader(Call-Info: Answer-After=0) ; This is for the Grandstream, Snoms, and Others</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,NoOp() ; Add others here and Post on the Wiki!!!!</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Dial(${ARG1})</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n(fail),Hangup()</span><br><span> </span><br><span> [demo]</span><br><span> include => stdexten</span><br><span>@@ -552,18 +561,18 @@</span><br><span> ; We start with what to do when a call first comes in.</span><br><span> ;</span><br><span> exten => s,1,Wait(1) ; Wait a second, just for fun</span><br><span style="color: hsl(0, 100%, 40%);">-exten => s,n,Answer() ; Answer the line</span><br><span style="color: hsl(0, 100%, 40%);">-exten => s,n,Set(TIMEOUT(digit)=5) ; Set Digit Timeout to 5 seconds</span><br><span style="color: hsl(0, 100%, 40%);">-exten => s,n,Set(TIMEOUT(response)=10) ; Set Response Timeout to 10 seconds</span><br><span style="color: hsl(0, 100%, 40%);">-exten => s,n(restart),BackGround(demo-congrats) ; Play a congratulatory message</span><br><span style="color: hsl(0, 100%, 40%);">-exten => s,n(instruct),BackGround(demo-instruct) ; Play some instructions</span><br><span style="color: hsl(0, 100%, 40%);">-exten => s,n,WaitExten() ; Wait for an extension to be dialed.</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Answer() ; Answer the line</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Set(TIMEOUT(digit)=5) ; Set Digit Timeout to 5 seconds</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Set(TIMEOUT(response)=10) ; Set Response Timeout to 10 seconds</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n(restart),BackGround(demo-congrats) ; Play a congratulatory message</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n(instruct),BackGround(demo-instruct) ; Play some instructions</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,WaitExten() ; Wait for an extension to be dialed.</span><br><span> </span><br><span> exten => 2,1,BackGround(demo-moreinfo) ; Give some more information.</span><br><span> exten => 2,n,Goto(s,instruct)</span><br><span> </span><br><span> exten => 3,1,Set(CHANNEL(language)=fr) ; Set language to french</span><br><span style="color: hsl(0, 100%, 40%);">-exten => 3,n,Goto(s,restart) ; Start with the congratulations</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Goto(s,restart) ; Start with the congratulations</span><br><span> </span><br><span> exten => 1000,1,Goto(default,s,1)</span><br><span> ;</span><br><span>@@ -572,19 +581,19 @@</span><br><span> ;</span><br><span> exten => 1234,1,Playback(transfer,skip) ; "Please hold while..."</span><br><span> ; (but skip if channel is not up)</span><br><span style="color: hsl(0, 100%, 40%);">-exten => 1234,n,Gosub(${EXTEN},stdexten(${GLOBAL(CONSOLE)}))</span><br><span style="color: hsl(0, 100%, 40%);">-exten => 1234,n,Goto(default,s,1) ; exited Voicemail</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Gosub(${EXTEN},stdexten(${GLOBAL(CONSOLE)}))</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Goto(default,s,1) ; exited Voicemail</span><br><span> </span><br><span> exten => 1235,1,VoiceMail(1234,u) ; Right to voicemail</span><br><span> </span><br><span> exten => 1236,1,Dial(Console/dsp) ; Ring forever</span><br><span style="color: hsl(0, 100%, 40%);">-exten => 1236,n,VoiceMail(1234,b) ; Unless busy</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,VoiceMail(1234,b) ; Unless busy</span><br><span> </span><br><span> ;</span><br><span> ; # for when they're done with the demo</span><br><span> ;</span><br><span> exten => #,1,Playback(demo-thanks) ; "Thanks for trying the demo"</span><br><span style="color: hsl(0, 100%, 40%);">-exten => #,n,Hangup() ; Hang them up.</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Hangup() ; Hang them up.</span><br><span> </span><br><span> ;</span><br><span> ; A timeout and "invalid extension rule"</span><br><span>@@ -597,64 +606,65 @@</span><br><span> ; Asterisk demo.</span><br><span> ;</span><br><span> exten => 500,1,Playback(demo-abouttotry) ; Let them know what's going on</span><br><span style="color: hsl(0, 100%, 40%);">-exten => 500,n,Dial(IAX2/guest@pbx.digium.com/s@default) ; Call the Asterisk demo</span><br><span style="color: hsl(0, 100%, 40%);">-exten => 500,n,Playback(demo-nogo) ; Couldn't connect to the demo site</span><br><span style="color: hsl(0, 100%, 40%);">-exten => 500,n,Goto(s,6) ; Return to the start over message.</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Dial(IAX2/guest@pbx.digium.com/s@default) ; Call the Asterisk demo</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Playback(demo-nogo) ; Couldn't connect to the demo site</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Goto(s,6) ; Return to the start over message.</span><br><span> </span><br><span> ;</span><br><span> ; Create an extension, 600, for evaluating echo latency.</span><br><span> ;</span><br><span> exten => 600,1,Playback(demo-echotest) ; Let them know what's going on</span><br><span style="color: hsl(0, 100%, 40%);">-exten => 600,n,Echo() ; Do the echo test</span><br><span style="color: hsl(0, 100%, 40%);">-exten => 600,n,Playback(demo-echodone) ; Let them know it's over</span><br><span style="color: hsl(0, 100%, 40%);">-exten => 600,n,Goto(s,6) ; Start over</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Echo() ; Do the echo test</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Playback(demo-echodone) ; Let them know it's over</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Goto(s,6) ; Start over</span><br><span> </span><br><span> ;</span><br><span style="color: hsl(0, 100%, 40%);">-; You can use the Macro Page to intercom a individual user</span><br><span style="color: hsl(0, 100%, 40%);">-exten => 76245,1,Macro(page,SIP/Grandstream1)</span><br><span style="color: hsl(120, 100%, 40%);">+; You can use the page subroutine to intercom a individual user</span><br><span style="color: hsl(120, 100%, 40%);">+exten => 76245,1,Gosub(page,s,1(SIP/Grandstream1))</span><br><span> ; or if your peernames are the same as extensions</span><br><span style="color: hsl(0, 100%, 40%);">-exten => _7XXX,1,Macro(page,SIP/${EXTEN})</span><br><span style="color: hsl(120, 100%, 40%);">+exten => _7XXX,1,Gosub(page,s,1(SIP/${EXTEN}))</span><br><span> ;</span><br><span> ;</span><br><span> ; System Wide Page at extension 7999</span><br><span> ;</span><br><span> exten => 7999,1,Set(TIMEOUT(absolute)=60)</span><br><span style="color: hsl(0, 100%, 40%);">-exten => 7999,2,Page(Local/Grandstream1@page&Local/Xlite1@page&Local/1234@page/n,d)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Page(Local/Grandstream1@page&Local/Xlite1@page&Local/1234@page/n,d)</span><br><span> </span><br><span> ; Give voicemail at extension 8500</span><br><span> ;</span><br><span> exten => 8500,1,VoiceMailMain()</span><br><span style="color: hsl(0, 100%, 40%);">-exten => 8500,n,Goto(s,6)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Goto(s,6)</span><br><span> ;</span><br><span> ; Here's what a phone entry would look like (IXJ for example)</span><br><span> ;</span><br><span> ;exten => 1265,1,Dial(Phone/phone0,15)</span><br><span style="color: hsl(0, 100%, 40%);">-;exten => 1265,n,Goto(s,5)</span><br><span style="color: hsl(120, 100%, 40%);">+; same => n,Goto(s,5)</span><br><span> </span><br><span> ;</span><br><span style="color: hsl(0, 100%, 40%);">-; The page context calls up the page macro that sets variables needed for auto-answer</span><br><span style="color: hsl(120, 100%, 40%);">+; The page context calls up the sub-page subroutine that sets variables needed for auto-answer</span><br><span> ; It is in is own context to make calling it from the Page() application as simple as</span><br><span> ; Local/{peername}@page</span><br><span> ;</span><br><span> [page]</span><br><span style="color: hsl(0, 100%, 40%);">-exten => _X.,1,Macro(page,SIP/${EXTEN})</span><br><span style="color: hsl(120, 100%, 40%);">+exten => _X.,1,Gosub(sub-page,s,1(SIP/${EXTEN}))</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Hangup()</span><br><span> </span><br><span> ;[mainmenu]</span><br><span> ;</span><br><span> ; Example "main menu" context with submenu</span><br><span> ;</span><br><span> ;exten => s,1,Answer</span><br><span style="color: hsl(0, 100%, 40%);">-;exten => s,n,Background(thanks) ; "Thanks for calling press 1 for sales, 2 for support, ..."</span><br><span style="color: hsl(0, 100%, 40%);">-;exten => s,n,WaitExten</span><br><span style="color: hsl(120, 100%, 40%);">+; same => n,Background(thanks) ; "Thanks for calling press 1 for sales, 2 for support, ..."</span><br><span style="color: hsl(120, 100%, 40%);">+; same => n,WaitExten</span><br><span> ;exten => 1,1,Goto(submenu,s,1)</span><br><span> ;exten => 2,1,Hangup</span><br><span> ;include => default</span><br><span> ;</span><br><span> ;[submenu]</span><br><span> ;exten => s,1,Ringing ; Make them comfortable with 2 seconds of ringback</span><br><span style="color: hsl(0, 100%, 40%);">-;exten => s,n,Wait,2</span><br><span style="color: hsl(0, 100%, 40%);">-;exten => s,n,Background(submenuopts) ; "Thanks for calling the sales department. Press 1 for steve, 2 for..."</span><br><span style="color: hsl(0, 100%, 40%);">-;exten => s,n,WaitExten</span><br><span style="color: hsl(120, 100%, 40%);">+; same => n,Wait,2</span><br><span style="color: hsl(120, 100%, 40%);">+; same => n,Background(submenuopts) ; "Thanks for calling the sales department. Press 1 for steve, 2 for..."</span><br><span style="color: hsl(120, 100%, 40%);">+; same => n,WaitExten</span><br><span> ;exten => 1,1,Goto(default,steve,1)</span><br><span> ;exten => 2,1,Goto(default,mark,2)</span><br><span> </span><br><span>@@ -704,7 +714,7 @@</span><br><span> ;exten => mark,1,Goto(6275,1) ; alias mark to 6275</span><br><span> ;exten => 6536,1,Gosub(${EXTEN},stdexten(${WIL}))</span><br><span> ; Ditto for wil</span><br><span style="color: hsl(0, 100%, 40%);">-;exten => 6536,n,Goto(default,s,1) ; exited Voicemail</span><br><span style="color: hsl(120, 100%, 40%);">+; same => n,Goto(default,s,1) ; exited Voicemail</span><br><span> ;exten => wil,1,Goto(6236,1)</span><br><span> </span><br><span> ;If you want to subscribe to the status of a parking space, this is</span><br><span>@@ -727,7 +737,7 @@</span><br><span> ; voicemailmain</span><br><span> ;</span><br><span> ;exten => 8500,1,VoicemailMain</span><br><span style="color: hsl(0, 100%, 40%);">-;exten => 8500,n,Hangup</span><br><span style="color: hsl(120, 100%, 40%);">+; same => n,Hangup</span><br><span> ;</span><br><span> ; Or a conference room (you'll need to edit meetme.conf to enable this room)</span><br><span> ;</span><br><span>@@ -743,17 +753,18 @@</span><br><span> ; this is the context that your incoming IAX/SIP trunk dumps you in...</span><br><span> ;[acme-incoming]</span><br><span> ;exten => s,1,Wait(1)</span><br><span style="color: hsl(0, 100%, 40%);">-;exten => s,n,Answer()</span><br><span style="color: hsl(0, 100%, 40%);">-;exten => s,n(menu),Playback(acme/vm-brief-menu)</span><br><span style="color: hsl(0, 100%, 40%);">-;exten => s,n(exten),Background(vm-enter-num-to-call)</span><br><span style="color: hsl(0, 100%, 40%);">-;exten => s,n,WaitExten(5)</span><br><span style="color: hsl(0, 100%, 40%);">-;exten => s,n(goodbye),Playback(vm-goodbye)</span><br><span style="color: hsl(0, 100%, 40%);">-;exten => s,n(end),Hangup()</span><br><span style="color: hsl(120, 100%, 40%);">+; same => n,Answer() ; "same" allows you to continue an extension more</span><br><span style="color: hsl(120, 100%, 40%);">+; concisely without having to repeat the extension or pattern</span><br><span style="color: hsl(120, 100%, 40%);">+; same => n(menu),Playback(acme/vm-brief-menu)</span><br><span style="color: hsl(120, 100%, 40%);">+; same => n(exten),Background(vm-enter-num-to-call)</span><br><span style="color: hsl(120, 100%, 40%);">+; same => n,WaitExten(5)</span><br><span style="color: hsl(120, 100%, 40%);">+; same => n(goodbye),Playback(vm-goodbye)</span><br><span style="color: hsl(120, 100%, 40%);">+; same => n(end),Hangup()</span><br><span> ;</span><br><span> ;include => acme-extens</span><br><span> ;</span><br><span> ;exten => i,1,Playback(vm-invalid)</span><br><span style="color: hsl(0, 100%, 40%);">-;exten => i,n,Goto(s,exten) ; optionally, transfer to operator</span><br><span style="color: hsl(120, 100%, 40%);">+; same => n,Goto(s,exten) ; optionally, transfer to operator</span><br><span> ;</span><br><span> ;exten => t,1,Goto(s,goodbye)</span><br><span> ;</span><br><span>@@ -761,10 +772,10 @@</span><br><span> ;</span><br><span> ;[acme-internal]</span><br><span> ;exten => s,1,Answer()</span><br><span style="color: hsl(0, 100%, 40%);">-;exten => s,n(exten),Background(vm-enter-num-to-call)</span><br><span style="color: hsl(0, 100%, 40%);">-;exten => s,n,WaitExten(5)</span><br><span style="color: hsl(0, 100%, 40%);">-;exten => s,n(goodbye),Playback(vm-goodbye)</span><br><span style="color: hsl(0, 100%, 40%);">-;exten => s,n(end),Hangup()</span><br><span style="color: hsl(120, 100%, 40%);">+; same => n(exten),Background(vm-enter-num-to-call)</span><br><span style="color: hsl(120, 100%, 40%);">+; same => n,WaitExten(5)</span><br><span style="color: hsl(120, 100%, 40%);">+; same => n(goodbye),Playback(vm-goodbye)</span><br><span style="color: hsl(120, 100%, 40%);">+; same => n(end),Hangup()</span><br><span> ;</span><br><span> ;include => trunkint</span><br><span> ;include => trunkld</span><br><span>@@ -780,10 +791,10 @@</span><br><span> ;[acme-extens]</span><br><span> ;include => stdexten</span><br><span> ;exten => 111,1,Gosub(111,stdexten(SIP/pete_1,acme))</span><br><span style="color: hsl(0, 100%, 40%);">-;exten => 111,n,Goto(s,exten)</span><br><span style="color: hsl(120, 100%, 40%);">+; same => n,Goto(s,exten)</span><br><span> ;</span><br><span> ;exten => 112,1,Gosub(112,stdexten(SIP/nancy_1,acme))</span><br><span style="color: hsl(0, 100%, 40%);">-;exten => 112,n,Goto(s,end)</span><br><span style="color: hsl(120, 100%, 40%);">+; same => n,Goto(s,end)</span><br><span> ;</span><br><span> ; end of acme example</span><br><span> </span><br><span>@@ -823,20 +834,20 @@</span><br><span> </span><br><span> [time]</span><br><span> exten => _X.,30000(time),NoOp(Time: ${EXTEN} ${timezone})</span><br><span style="color: hsl(0, 100%, 40%);">-exten => _X.,n,Wait(0.25)</span><br><span style="color: hsl(0, 100%, 40%);">-exten => _X.,n,Answer()</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Wait(0.25)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Answer()</span><br><span> ; the amount of delay is set for English; you may need to adjust this time</span><br><span> ; for other languages if there's no pause before the synchronizing beep.</span><br><span style="color: hsl(0, 100%, 40%);">-exten => _X.,n,Set(FUTURETIME=$[${EPOCH} + 12])</span><br><span style="color: hsl(0, 100%, 40%);">-exten => _X.,n,SayUnixTime(${FUTURETIME},Zulu,HNS)</span><br><span style="color: hsl(0, 100%, 40%);">-exten => _X.,n,SayPhonetic(z)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Set(FUTURETIME=$[${EPOCH} + 12])</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,SayUnixTime(${FUTURETIME},Zulu,HNS)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,SayPhonetic(z)</span><br><span> ; use the timezone associated with the extension (sip only), or system-wide</span><br><span> ; default if one hasn't been set.</span><br><span style="color: hsl(0, 100%, 40%);">-exten => _X.,n,SayUnixTime(${FUTURETIME},${timezone},HNS)</span><br><span style="color: hsl(0, 100%, 40%);">-exten => _X.,n,Playback(spy-local)</span><br><span style="color: hsl(0, 100%, 40%);">-exten => _X.,n,WaitUntil(${FUTURETIME})</span><br><span style="color: hsl(0, 100%, 40%);">-exten => _X.,n,Playback(beep)</span><br><span style="color: hsl(0, 100%, 40%);">-exten => _X.,n,Return()</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,SayUnixTime(${FUTURETIME},${timezone},HNS)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Playback(spy-local)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,WaitUntil(${FUTURETIME})</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Playback(beep)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Return()</span><br><span> </span><br><span> ;</span><br><span> ; ANI context: use in the same way as "time" above</span><br><span>@@ -844,13 +855,13 @@</span><br><span> </span><br><span> [ani]</span><br><span> exten => _X.,40000(ani),NoOp(ANI: ${EXTEN})</span><br><span style="color: hsl(0, 100%, 40%);">-exten => _X.,n,Wait(0.25)</span><br><span style="color: hsl(0, 100%, 40%);">-exten => _X.,n,Answer()</span><br><span style="color: hsl(0, 100%, 40%);">-exten => _X.,n,Playback(vm-from)</span><br><span style="color: hsl(0, 100%, 40%);">-exten => _X.,n,SayDigits(${CALLERID(ani)})</span><br><span style="color: hsl(0, 100%, 40%);">-exten => _X.,n,Wait(1.25)</span><br><span style="color: hsl(0, 100%, 40%);">-exten => _X.,n,SayDigits(${CALLERID(ani)}) ; playback again in case of missed digit</span><br><span style="color: hsl(0, 100%, 40%);">-exten => _X.,n,Return()</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Wait(0.25)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Answer()</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Playback(vm-from)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,SayDigits(${CALLERID(ani)})</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Wait(1.25)</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,SayDigits(${CALLERID(ani)}) ; playback again in case of missed digit</span><br><span style="color: hsl(120, 100%, 40%);">+ same => n,Return()</span><br><span> </span><br><span> ; For more information on applications, just type "core show applications" at your</span><br><span> ; friendly Asterisk CLI prompt.</span><br><span>diff --git a/configs/samples/iax.conf.sample b/configs/samples/iax.conf.sample</span><br><span>index cbce423..1d1c136 100644</span><br><span>--- a/configs/samples/iax.conf.sample</span><br><span>+++ b/configs/samples/iax.conf.sample</span><br><span>@@ -206,7 +206,8 @@</span><br><span> ; across the net. "md5" uses a challenge/response md5 sum arrangement, but</span><br><span> ; still requires both ends have plain text access to the secret. "rsa" allows</span><br><span> ; unidirectional secret knowledge through public/private keys. There is no</span><br><span style="color: hsl(0, 100%, 40%);">-; default unless set here in the [general] section.</span><br><span style="color: hsl(120, 100%, 40%);">+; default unless set here in the [general] section. Only md5 and rsa support</span><br><span style="color: hsl(120, 100%, 40%);">+; media encryption.</span><br><span> ;</span><br><span> ;auth=md5</span><br><span> </span><br><span>@@ -215,10 +216,10 @@</span><br><span> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</span><br><span> </span><br><span> ;</span><br><span style="color: hsl(0, 100%, 40%);">-; Enable IAX2 encryption. The default is no.</span><br><span style="color: hsl(120, 100%, 40%);">+; Enable IAX2 encryption. The default is no. This option does not force</span><br><span style="color: hsl(120, 100%, 40%);">+; encryption for calls, it merely allows it to be used for calls.</span><br><span> ;</span><br><span style="color: hsl(0, 100%, 40%);">-;encryption=yes</span><br><span style="color: hsl(0, 100%, 40%);">-;</span><br><span style="color: hsl(120, 100%, 40%);">+encryption=yes</span><br><span> </span><br><span> ;</span><br><span> ; Force encryption insures no connection is established unless both sides</span><br><span>@@ -542,7 +543,8 @@</span><br><span> ; the ":" character. "outkey" is a single, private key to use to authenticate</span><br><span> ; to the other side. Public keys are named /var/lib/asterisk/keys/<name>.pub</span><br><span> ; while private keys are named /var/lib/asterisk/keys/<name>.key. Private</span><br><span style="color: hsl(0, 100%, 40%);">-; keys should always be 3DES encrypted.</span><br><span style="color: hsl(120, 100%, 40%);">+; keys should always be 3DES encrypted. If encryption is used (applicable to</span><br><span style="color: hsl(120, 100%, 40%);">+; md5 and rsa only), a secret must be provided.</span><br><span> ;</span><br><span> ;</span><br><span> ; NOTE: All hostnames and IP addresses in this file are for example purposes</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/17660">change 17660</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/17660"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 19 </div>
<div style="display:none"> Gerrit-Change-Id: I04fba9671aa1ee9ba1bd5027061f80bbe38e7b46 </div>
<div style="display:none"> Gerrit-Change-Number: 17660 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: N A <mail@interlinked.x10host.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>