<div dir="ltr">So, good, we're on the same page so far I think.<div><br></div><div>As I last stated, the original code suggestion would be what you want to do for the serial phone ring-down (hunt), now you just need to figure out why your Line_2 phone is answering and then hanging up immediately (or why Asterisk thinks it is).</div><div><br></div><div>I'd recommend sniffing the network traffic with Wire Shark and turning on some of the debug options in Asterisk to hunt down if it's the phone or an Asterisk quirk that is tripping up the system. We'll need more debug and error text to go any further with the Line_2 problem, unless someone much better than me can chime in with an idea... I presume you've already done the simple stuff like make sure your network is solid and that the phone firmware is up to date and stable.</div><div><br></div><div>I'll also take a moment as an aside to suggest that you move away from numerical device and user names for SIP and move to text based names which have local meaning. The numerical names are easy to be hacked, as bad-guys scripts easily walk the possibilities sequentially. I find it also helps to use extension names in the dial plan that have meaning so that I can keep track of them. When a user calls an extension, the number they enter can feature a "Goto" with a text entry in the dial plan. This makes it harder for those at a phone to go places in your phone system they shouldn't.</div><div><br></div><div>-Tim</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 8, 2017 at 4:51 PM, <span dir="ltr"><<a href="mailto:thelma@sys-concept.com" target="_blank">thelma@sys-concept.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 05/08/2017 04:37 PM, Tim S wrote:<br>
> The "error" I was talking about was in your log:<br>
><br>
> "...== Spawn extension (extensions, 4, 3) exited non-zero on<br>
> 'IAX2/home_server-6364'..."<br>
><br>
> The call terminated here in a error which prevented the dialplan from<br>
> continuing. Something there is broken, my recommendation is to check<br>
> you registrations first inside asterisk:<br>
><br>
>> sip show peers<br>
<br>
"sip show peers" is showing FD_L2 (SIP/54 is registered)<br>
Name/username Host Dyn Forcerport Comedia ACL Port Status Description<br>
12 (Unspecified) D No No 0 Unmonitored<br>
4/4 10.10.0.8 D No No 5060 Unmonitored<br>
54/54 10.10.0.15 D No No 5060 Unmonitored<br>
<br>
> Something wasn't "happy" about SIP/54 in your system when Asterisk tried<br>
> talking to it.<br>
><br>
> So you tried this:<br>
><br>
> "...<br>
> Even when I put:<br>
> exten => 4,n,GotoIf($["${DIALSTATUS}"="<wbr>BUSY"]?line2)<br>
> exten => 4,n(line2),Dial(${FD_L2},20,<wbr>trw)<br>
> exten => 4,n(line2),Voicemail(4)<br>
> ..."<br>
><br>
> What that will do is go to the first instance of "4,n(line2)", which is<br>
> the line that seems to be triggering the channel failure. If you have<br>
> the Asterisk console open, I'll bet you see it spew some errors when you<br>
> try that extension routine.<br>
><br>
> Asterisk dial plans are a serial processes, the first line that Asterisk<br>
> comes across that meets the matching for a given extension and label is<br>
> what it will run first. What you have is two lines that will match both<br>
> extension and label - that's not really good form.<br>
><br>
> My dial plan suggestion from last night would result in the functionality:<br>
><br>
> Ring extension 4/Line_1, timeout 25 seconds --> if not busy then<br>
> voicemail, else ring extension 4/Line_2, timeout 20 seconds --> voicemail.<br>
><br>
><br>
> Again, I think you have two problems, and the bigger one is causing the<br>
> annoying unexpected behavior in your dial plan<br>
><br>
> Try doing the extension 4 without the Line_1 and see what happens:<br>
><br>
> "...<br>
> exten => 4,1,Dial(${FD_L2},20,trw)<br>
> exten => 4,n(vmail),Voicemail(4)<br>
> exten => 4,n,Hangup()<br>
> ..."<br>
<br>
I have tired the above plan with small change 4,n,Voicemail(4) (as there is no gotoif statement)<br>
So:<br>
exten => 4,1,Dial(${FD_L2},20,trw)<br>
exten => 4,n,Voicemail(4)<br>
exten => 4,n,Hangup()<br>
<br>
Line 2 is ring OK, and if nobody pickup the phone it goes to "Voicemail(4)" so this part is working; there were no errors on the command line.<br>
<br>
[snip]<br>
<br>
But I've tired it again, this dialplan) as before and you are correct something is wrong but command line is not showing any errors:<br>
<br>
exten => 4,1,Dial(${FD_L1},25,trw)<br>
exten => 4,n,GotoIf($["${DIALSTATUS}"="<wbr>BUSY"]?line2:)<br>
exten => 4,n(line2),Dial(${FD_L2},20,<wbr>rw)<br>
exten => 4,n,Voicemail(4)<br>
exten => 4,n,Hangup()<br>
<br>
I've tried:<br>
exten => 4,n,GotoIf($["${DIALSTATUS}"="<wbr>BUSY"]?line2)<br>
exten => 4,n,GotoIf($["${DIALSTATUS}"="<wbr>BUSY"]?line2:)<br>
exten => 4,n,GotoIf($["${DIALSTATUS}"="<wbr>BUSY"]?:line2)<br>
<br>
And I get:<br>
<br>
-- Called SIP/4<br>
-- SIP/4-00000306 is ringing<br>
-- Nobody picked up in 25000 ms<br>
-- Executing [4@extensions:2] GotoIf("IAX2/home_server-435", "0?line2:") in new stack<br>
-- Executing [4@extensions:3] Dial("IAX2/home_server-435", "SIP/54,20,rw") in new stack<br>
== Using SIP RTP CoS mark 5<br>
-- Called SIP/54<br>
-- SIP/54-00000307 is ringing<br>
== Spawn extension (extensions, 4, 3) exited non-zero on 'IAX2/home_server-435'<br>
-- Hungup 'IAX2/home_server-435'<br>
<br>
So FD_L1 (exten: 4) is ringing for 25sec.; nobody pickup the phone and command line is showing it goes to: FD_L2 (SIP/54)<br>
-- SIP/54-00000307 is ringing<br>
<br>
but in reality FD_L2 (SIP/54) is not ringing at all, it should ring line_2 for 20sec and go to Voicemail but as soon as it prints line:<br>
-- SIP/54-00000307 is ringing<br>
<br>
it hangs up the phone.<br>
<br>
--<br>
Thelma<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
______________________________<wbr>______________________________<wbr>_________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
<br>
Check out the new Asterisk community forum at: <a href="https://community.asterisk.org/" rel="noreferrer" target="_blank">https://community.asterisk.<wbr>org/</a><br>
<br>
New to Asterisk? Start here:<br>
<a href="https://wiki.asterisk.org/wiki/display/AST/Getting+Started" rel="noreferrer" target="_blank">https://wiki.asterisk.org/<wbr>wiki/display/AST/Getting+<wbr>Started</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" rel="noreferrer" target="_blank">http://lists.digium.com/<wbr>mailman/listinfo/asterisk-<wbr>users</a><br>
</font></span></blockquote></div><br></div>