The way you have the GotoIf is making it so that no matter what the busy condition of the line, it will execute the next line in the dial plan. What you'd need is an "if" or "then" which goes to a tagged line in the dial plan. How it reads now is: "If [busy] then line2, else execute next line". Also you are saying "extension 4 is not busy", but extension 4 is a dialplan extension - while physical extensions "FD_L1" and "FD_L2" appear to be the devices which are not busy, you need to be clear and keep it straight in your head and text to get the best help... According to your log, nobody picked up after the 25 second timeout on FD_L1, so the dial status would have been NOANSWER, which would result in your gotoif test having a FALSE. Since you didn't specify what the gotoif should do if the busy test failed, it just executes the next line which is to call the second line (FD_L2), which it does. Then it looks like you have an error with the second line which causes the call to terminate, at which case it terminates the channel and never gets to voicemail. So it looks like two problems, 1) your FD_L2 physical extension is buggy, and 2) you need to label the voicemail entry point and jump to it if the FD_L1 was any other state but BUSY. "... exten => 4,1,Dial(${FD_L1},25,trw) exten => 4,n,GotoIf($["${DIALSTATUS}"="BUSY"]?line2:vmail) exten => 4,n(line2),Dial(${FD_L2},20,trw); <--- fix me!! exten => 4,n(vmail),Voicemail(4) exten => 4,n,Hangup() ..." -Tim On Sun, May 7, 2017 at 9:21 PM, <thelma at sys-concept.com> wrote:> Call is not forwarded to voicemail in below dial plan, why? > > exten => 4,1,Dial(${FD_L1},25,trw) > exten => 4,n,GotoIf($["${DIALSTATUS}"="BUSY"]?line2) > exten => 4,n(line2),Dial(${FD_L2},20,trw) > exten => 4,n,Voicemail(4) > exten => 4,n,Hangup() > > -- Called SIP/4 > -- SIP/4-00000288 is ringing > -- Nobody picked up in 25000 ms > -- Executing [4 at extensions:2] GotoIf("IAX2/home_server-6364", > "0?line2") in new stack > -- Executing [4 at extensions:3] Dial("IAX2/home_server-6364", > "SIP/54,20,trw") in new stack > == Using SIP RTP CoS mark 5 > -- Called SIP/54 > -- SIP/54-00000289 is ringing > == Spawn extension (extensions, 4, 3) exited non-zero on > 'IAX2/home_server-6364' > -- Hungup 'IAX2/home_server-6364' > > Extension 4 is not BUSY (just nobody pickup the call) so why isn't call > going to "Voicemail" it shouldn't ring FD_L2 (SIP/54) > Why isn't it going to "Voicemail"? > > -- > Thelma > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > Check out the new Asterisk community forum at: https://community.asterisk. > org/ > > New to Asterisk? Start here: > https://wiki.asterisk.org/wiki/display/AST/Getting+Started > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20170507/817fc3cd/attachment.html>
thelma at sys-concept.com
2017-May-08 15:21 UTC
[asterisk-users] Call does not go voicemail
Thank you for the input Tim. Yes, that worked. exten => 4,n,GotoIf($["${DIALSTATUS}"="BUSY"]?line2:vmail) exten => 4,n(vmail),Voicemail(4) Though, I'm not sure why are you saying line 2 is FD_L2 needs to be fixed. Do I need to removde "t", the call can not be transferred? Even when I put: exten => 4,n,GotoIf($["${DIALSTATUS}"="BUSY"]?line2) exten => 4,n(line2),Dial(${FD_L2},20,trw) exten => 4,n(line2),Voicemail(4) The call (line2) would dial "FD_L2" but would not jump to next line "Voicemail" -- Thelma On 05/08/2017 12:19 AM, Tim S wrote:> The way you have the GotoIf is making it so that no matter what the busy > condition of the line, it will execute the next line in the dial plan. > What you'd need is an "if" or "then" which goes to a tagged line in the > dial plan. How it reads now is: "If [busy] then line2, else execute > next line". Also you are saying "extension 4 is not busy", but > extension 4 is a dialplan extension - while physical extensions "FD_L1" > and "FD_L2" appear to be the devices which are not busy, you need to be > clear and keep it straight in your head and text to get the best help... > > According to your log, nobody picked up after the 25 second timeout on > FD_L1, so the dial status would have been NOANSWER, which would result > in your gotoif test having a FALSE. Since you didn't specify what the > gotoif should do if the busy test failed, it just executes the next line > which is to call the second line (FD_L2), which it does. Then it looks > like you have an error with the second line which causes the call to > terminate, at which case it terminates the channel and never gets to > voicemail. > > > So it looks like two problems, 1) your FD_L2 physical extension is > buggy, and 2) you need to label the voicemail entry point and jump to it > if the FD_L1 was any other state but BUSY. > > > "... > exten => 4,1,Dial(${FD_L1},25,trw) > exten => 4,n,GotoIf($["${DIALSTATUS}"="BUSY"]?line2:vmail) > exten => 4,n(line2),Dial(${FD_L2},20,trw); <--- fix me!! > exten => 4,n(vmail),Voicemail(4) > exten => 4,n,Hangup() > ..." > > > -Tim > > > On Sun, May 7, 2017 at 9:21 PM, <thelma at sys-concept.com > <mailto:thelma at sys-concept.com>> wrote: > > Call is not forwarded to voicemail in below dial plan, why? > > exten => 4,1,Dial(${FD_L1},25,trw) > exten => 4,n,GotoIf($["${DIALSTATUS}"="BUSY"]?line2) > exten => 4,n(line2),Dial(${FD_L2},20,trw) > exten => 4,n,Voicemail(4) > exten => 4,n,Hangup() > > -- Called SIP/4 > -- SIP/4-00000288 is ringing > -- Nobody picked up in 25000 ms > -- Executing [4 at extensions:2] GotoIf("IAX2/home_server-6364", > "0?line2") in new stack > -- Executing [4 at extensions:3] Dial("IAX2/home_server-6364", > "SIP/54,20,trw") in new stack > == Using SIP RTP CoS mark 5 > -- Called SIP/54 > -- SIP/54-00000289 is ringing > == Spawn extension (extensions, 4, 3) exited non-zero on > 'IAX2/home_server-6364' > -- Hungup 'IAX2/home_server-6364' > > Extension 4 is not BUSY (just nobody pickup the call) so why isn't > call going to "Voicemail" it shouldn't ring FD_L2 (SIP/54) > Why isn't it going to "Voicemail"? > > -- > Thelma >