Thank you Very MUCH!!!! I really appreciate your explanation, i wasn't getting it!<br><br><div><span class="gmail_quote">On 9/5/06, <b class="gmail_sendername">Tony Mountifield</b> <<a href="mailto:tony@softins.clara.co.uk">
tony@softins.clara.co.uk</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">In article <<a href="mailto:116fd70d0609050232s6a4515cav2da761ce776b1231@mail.gmail.com">
116fd70d0609050232s6a4515cav2da761ce776b1231@mail.gmail.com</a>>,<br>Marco Mouta <<a href="mailto:marco.mouta@gmail.com">marco.mouta@gmail.com</a>> wrote:<br>><br>> I've solved the problem, but still not understanding very well why do i need
<br>> it:<br>><br>> I've inserted inside [ext-did-custom]<br>> exten=>h,1,hangup<br>><br>> Why do i need this? this is not usually used to run something after an<br>> hangupcall?<br>> thks!<br><br>
Your problem is this line:<br><br>exten => _.,1,Goto(s,1) ; catch-all matching for calls that have DID info (if a DID route hasn't matched them)<br><br>The pattern _. will match absolutely anything, and so when the line hangs up,
<br>and Asterisk looks for the 'h' extension, it finds _. which matches, and does<br>the goto back to 's'!!!<br><br>You should never use _. as a pattern. If you want to match any NUMBER, you can<br>do _X. to match two or more digits, and if you also want to match a single
<br>digit you add a second line with _X as the extension.<br><br>Using X ensures that the pattern won't match any of the special non-numeric<br>extensions like h, i, t and so on.<br><br>Hope this helps.<br><br>Cheers<br>Tony
<br><br>> On 9/5/06, Marco Mouta <<a href="mailto:marco.mouta@gmail.com">marco.mouta@gmail.com</a>> wrote:<br>> ><br>> > Hi all,<br>> ><br>> > I think i'm missing something very very basic! I want my calls with DID
<br>> > 48XX (From pstn E1 TE110P) to be answered then playback a file and hangup.<br>> ><br>> > Part of my extensions.conf where from-pstn is the context for all calls<br>> > from pstn line is:<br>
> ><br>> > [from-pstn]<br>> > include => from-pstn-custom ; create this context in<br>> > extensions_custom.conf to include customizations<br>> > include => ext-did-custom
<br>> > include => from-pstn-timecheck ; this has to be included<br>> > otherwise it overrides ext-did<br>> > exten => fax,1,Goto(ext-fax,in_fax,1)<br>> ><br>> ><br>> > [ext-did-custom]
<br>> > exten => _48XX,1,Answer<br>> > exten => _48XX,n,SetVar(FROM_DID=${EXTEN})<br>> > exten => _48XX,n,Playback(vm-goodbye)<br>> > exten => _48XX,n,Hangup<br>> ><br>> > [from-pstn-timecheck]
<br>> > exten => _.,1,Goto(s,1) ; catch-all matching for calls that have<br>> > DID info (if a DID route hasn't matched them)<br>> > exten => s,1,GotoIf($[${IN_OVERRIDE} =<br>> > forcereghours]?from-pstn-reghours,s,1:)
<br>> > exten => s,2,GotoIf($[${IN_OVERRIDE} =<br>> > forceafthours]?from-pstn-afthours,s,1:)<br>> > exten => s,3,GotoIfTime(${REGTIME}|${REGDAYS}|*|*?from-pstn-reghours,s,1:)<br>> > exten => s,4,Goto(from-pstn-afthours,s,1)
<br>> ><br>> ><br>> > Problem, look my Asterisk CLI :<br>> ><br>> > -- Accepting call from '2132' to '4888' on channel 0/1, span 1<br>> > -- Executing Answer("Zap/1-1", "") in new stack
<br>> > -- Executing SetVar("Zap/1-1", "FROM_DID=4888") in new stack<br>> > -- Executing Playback("Zap/1-1", "vm-goodbye") in new stack<br>> > -- Playing 'vm-goodbye' (language 'pt')
<br>> > -- Executing Hangup("Zap/1-1", "") in new stack<br>> > == Spawn extension (from-pstn, 4888, 4) exited non-zero on 'Zap/1-1'<br>> > -- Executing Goto("Zap/1-1", "s|1") in new stack
<br>> > -- Goto (from-pstn,s,1)<br>> > -- Executing GotoIf("Zap/1-1", "1?from-pstn-reghours|s|1:") in new<br>> > stack<br>> > -- Goto (from-pstn-reghours,s,1)<br>> > -- Executing GotoIf("Zap/1-1", "0?from-pstn-reghours-nofax|s|1:2") in
<br>> > new stack<br>> > -- Goto (from-pstn-reghours,s,2)<br>> > -- Executing Answer("Zap/1-1", "") in new stack<br>> > -- Executing PlayTones("Zap/1-1", "ring") in new stack
<br>> > -- Executing NVFaxDetect("Zap/1-1", "8") in new stack<br>> > -- Channel 0/1, span 1 got hangup request<br>> ><br>> > After the hangup the call seems to keep executing Dialplan.... why?? Does
<br>> > this is related with autofallback option in globals???<br>> ><br>> > Why Hangup didn't exit dialplan?<br>> ><br>> > Hope some one can help me.<br>> ><br>> > --<br>> > Com os melhores cumprimentos,
<br>> ><br>> > Marco Mouta<br>> ><br>><br>><br>><br>> --<br>> Com os melhores cumprimentos,<br>><br>> Marco Mouta<br>><br>> -=-=-=-=-=-<br>> [Alternative: text/html]<br>> -=-=-=-=-=-
<br>> -=-=-=-=-=-<br>><br>> _______________________________________________<br>> --Bandwidth and Colocation provided by <a href="http://Easynews.com">Easynews.com</a> --<br>><br>> asterisk-users mailing list
<br>> To UNSUBSCRIBE or update options visit:<br>> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>><br>> -=-=-=-=-=-<br><br>
<br>--<br>Tony Mountifield<br>Work: <a href="mailto:tony@softins.co.uk">tony@softins.co.uk</a> - <a href="http://www.softins.co.uk">http://www.softins.co.uk</a><br>Play: <a href="mailto:tony@mountifield.org">tony@mountifield.org
</a> - <a href="http://tony.mountifield.org">http://tony.mountifield.org</a><br>_______________________________________________<br>--Bandwidth and Colocation provided by <a href="http://Easynews.com">Easynews.com</a> --<br>
<br>asterisk-users mailing list<br>To UNSUBSCRIBE or update options visit:<br> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote>
</div><br><br clear="all"><br>-- <br>Com os melhores cumprimentos,<br><br>Marco Mouta