Re: [asterisk-users] Calling rules
On Jan 19, 2011, at 5:06 AM, Vitor Carlos Flausino wrote: >> In other words, which of the following is your situation: >> >> 1.) User dials 0X, asterisk sends 0X to the telco. >> 2.) User dials 0X, asterisk parses "0", strips it, and sends X >> to the telco. >> >> That might narrow it down. > > Option 2. "0" is to get an "external line" and XXX is passed to telco. > > -vcf It seems to me that you are passing the "0" to the telco when the user dials all digits at once. When they dial the "0" first, the call gets sent to one extension (probably extension "0" or "_0") and just connects them to the outside line, sending nothing to the telco. When they dial "0X", asterisk matches another extension (probably "_0." or another that begins with "_0"), one that connects them to the outside line and sends everything out to the telco, including the "0". Just a guess, but it sounds right to me. If so, you need to modify the dial command to strip the "0" before sending it. Tom -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Calling rules
> Correcting the line to: > > exten => > _0.,1,Macro(trunkdial-failover-0.3,${trunk_1}/${,${EXTEN:1})},,trunk_1,) > > problem persists... > > any other suggestions? > > > Best regards, > What does your trunkdial-failover-0.3 look like? > > Here goes... [macro-trunkdial-failover-0.3] exten = s,1,GotoIf($[${LEN(${FMCIDNUM})} > 6]?1-fmsetcid,1) exten = s,2,GotoIf($[${LEN(${GLOBAL_OUTBOUNDCIDNAME})} > 1]?1-setgbobname,1) exten = s,3,Set(CALLERID(num)=${IF($[${LEN(${CID_${CALLERID(num)}})} > 2]?${CID_${CALLERID(num)}}:)}) exten = s,n,GotoIf($[${LEN(${CALLERID(num)})} > 6]?1-dial,1) exten = s,n,Set(CALLERID(all)=${IF($[${LEN(${CID_${ARG3}})} > 6]?${CID_${ARG3}}:${GLOBAL_OUTBOUNDCID})}) exten = s,n,Goto(1-dial,1) exten = 1-setgbobname,1,Set(CALLERID(name)=${GLOBAL_OUTBOUNDCIDNAME}) exten = 1-setgbobname,n,Goto(s,3) exten = 1-fmsetcid,1,Set(CALLERID(num)=${FMCIDNUM}) exten = 1-fmsetcid,n,Set(CALLERID(name)=${FMCIDNAME}) exten = 1-fmsetcid,n,Goto(1-dial,1) exten = 1-dial,1,Dial(${ARG1}) exten = 1-dial,n,Gotoif(${LEN(${ARG2})} > 0 ?1-${DIALSTATUS},1:1-out,1) exten = 1-CHANUNAVAIL,1,Dial(${ARG2}) exten = 1-CHANUNAVAIL,n,Hangup() exten = 1-CONGESTION,1,Dial(${ARG2}) exten = 1-CONGESTION,n,Hangup() exten = 1-out,1,Hangup() -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Calling rules
- Original Message - > From: "Tom Rymes" > To: "Asterisk Users Mailing List - Non-Commercial Discussion" > > Sent: Tuesday, January 18, 2011 9:43:53 PM > Subject: Re: [asterisk-users] Calling rules > On 01/18/2011 3:20 PM, Vitor Carlos Flausino wrote: > >== Spawn extension (DLPN_DialPlan1, 0924343424, 1) exited > >non-zero on 'SIP/6005-0002' > > Vitor, > > Can you please clarify whether the "0" should be received by Asterisk > and processed internally, or whether it should be passed to the DAHDI > channel by asterisk? > > In other words, which of the following is your situation: > > 1.) User dials 0X, asterisk sends 0X to the telco. > 2.) User dials 0X, asterisk parses "0", strips it, and sends X > to the telco. > > That might narrow it down. Option 2. "0" is to get an "external line" and XXX is passed to telco. -vcf -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Calling rules
- Original Message - > From: "Danny Nicholas" > To: "Asterisk Users Mailing List - Non-Commercial Discussion" > > Sent: Tuesday, January 18, 2011 9:57:54 PM > Subject: Re: [asterisk-users] Calling rules > -Original Message- > From: asterisk-users-boun...@lists.digium.com > [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Vitor > Carlos > Flausino > Sent: Tuesday, January 18, 2011 1:45 PM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: Re: [asterisk-users] Calling rules > > Correcting the line to: > > exten => > _0.,1,Macro(trunkdial-failover-0.3,${trunk_1}/${,${EXTEN:1})},,trunk_1,) > > problem persists... > > any other suggestions? > > > Best regards, > What does your trunkdial-failover-0.3 look like? > How do I check that (which file,??)? The configurations were made via asterisk-gui. Best regards, -vcf -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Calling rules
On Tue, 18 Jan 2011, Vitor Carlos Flausino wrote: Log when dialing "0924343424" [snip] A normal internal call to "2000" is: [snip] These two calls do not demonstrate your issue: 1-If user dial "012345" there is an error and the call isn't made and the error is "handle_request_invite: Call from 'XXX' to extension '012345' rejected because extension not found in context 'DLPN_DialPlanX'. 2-If user dials "0" waits for the signal, and then dials "12345" then it works fine. -- Thanks in advance, - Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000 -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Calling rules
-Original Message- From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Vitor Carlos Flausino Sent: Tuesday, January 18, 2011 1:45 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Calling rules Correcting the line to: exten => _0.,1,Macro(trunkdial-failover-0.3,${trunk_1}/${,${EXTEN:1})},,trunk_1,) problem persists... any other suggestions? Best regards, What does your trunkdial-failover-0.3 look like? -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Calling rules
On 01/18/2011 3:20 PM, Vitor Carlos Flausino wrote: == Spawn extension (DLPN_DialPlan1, 0924343424, 1) exited non-zero on 'SIP/6005-0002' Vitor, Can you please clarify whether the "0" should be received by Asterisk and processed internally, or whether it should be passed to the DAHDI channel by asterisk? In other words, which of the following is your situation: 1.) User dials 0X, asterisk sends 0X to the telco. 2.) User dials 0X, asterisk parses "0", strips it, and sends X to the telco. That might narrow it down. Tom -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Calling rules
- Original Message - > From: "Steve Edwards" > To: "Asterisk Users Mailing List - Non-Commercial Discussion" > > Sent: Tuesday, January 18, 2011 8:54:11 PM > Subject: Re: [asterisk-users] Calling rules > >> On Tue, 18 Jan 2011, Vitor Carlos Flausino wrote: > > >>> 1-If user dial "012345" there is an error and the call isn't made > >>> and > >>> the error is "handle_request_invite: Call from 'XXX' to extension > >>> '012345' rejected because extension not found in context > >>> 'DLPN_DialPlanX'. 2-If user dials "0" waits for the signal, and > >>> then > >>> dials "12345" then it works fine. > > On Tue, 18 Jan 2011, Vitor Carlos Flausino wrote: > > > Correcting the line to: > > > > exten => > > _0.,1,Macro(trunkdial-failover-0.3,${trunk_1}/${,${EXTEN:1})},,trunk_1,) > > > > problem persists... > > How about some console output for a 'good' call and a 'failed' call. > Also, > a 'show dialplan|dialplan show' for the executed context may yield > some > clues. > > -- Here goes... asterisk*CLI> dialplan show CallingRule_Outbound_Ch1 [ Context 'CallingRule_Outbound_Ch1' created by 'pbx_config' ] '_0.' => 1. Macro(trunkdial-failover-0.3,${trunk_1}/${,${EXTEN:1})},,trunk_1,) [pbx_config] -= 1 extension (1 priority) in 1 context. =- Log when dialing "0924343424" == Using SIP RTP CoS mark 5 -- Executing [0924343424@DLPN_DialPlan1:1] Macro("SIP/6005-0002", "trunkdial-failover-0.3,DAHDI/1/,,trunk_1,") in new stack -- Executing [s@macro-trunkdial-failover-0.3:1] GotoIf("SIP/6005-0002", "0?1-fmsetcid,1") in new stack -- Executing [s@macro-trunkdial-failover-0.3:2] GotoIf("SIP/6005-0002", "1?1-setgbobname,1") in new stack -- Goto (macro-trunkdial-failover-0.3,1-setgbobname,1) -- Executing [1-setgbobname@macro-trunkdial-failover-0.3:1] Set("SIP/6005-0002", "CALLERID(name)=Glintt") in new stack -- Executing [1-setgbobname@macro-trunkdial-failover-0.3:2] Goto("SIP/6005-0002", "s,3") in new stack -- Goto (macro-trunkdial-failover-0.3,s,3) -- Executing [s@macro-trunkdial-failover-0.3:3] Set("SIP/6005-0002", "CALLERID(num)=222355598") in new stack -- Executing [s@macro-trunkdial-failover-0.3:4] GotoIf("SIP/6005-0002", "1?1-dial,1") in new stack -- Goto (macro-trunkdial-failover-0.3,1-dial,1) -- Executing [1-dial@macro-trunkdial-failover-0.3:1] Dial("SIP/6005-0002", "DAHDI/1/") in new stack -- Called 1/ -- DAHDI/1-1 answered SIP/6005-0002 -- Hungup 'DAHDI/1-1' == Spawn extension (macro-trunkdial-failover-0.3, 1-dial, 1) exited non-zero on 'SIP/6005-0002' in macro 'trunkdial-failover-0.3' == Spawn extension (DLPN_DialPlan1, 0924343424, 1) exited non-zero on 'SIP/6005-0002' A normal internal call to "2000" is: == Using SIP RTP CoS mark 5 -- Executing [2000@DLPN_DialPlan1:1] Directory("SIP/6005-000a", "default,default,f") in new stack == Parsing '/etc/asterisk/voicemail.conf': == Found == Parsing '/etc/asterisk/users.conf': == Found -- Playing 'dir-welcome.ulaw' (language 'en') -- Playing 'dir-pls-enter.ulaw' (language 'en') == Spawn extension (DLPN_DialPlan1, 2000, 1) exited non-zero on 'SIP/6005-000a' Hope helps... Best regards and thanks in advance... -vcf -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Calling rules
On Tue, 18 Jan 2011, Vitor Carlos Flausino wrote: 1-If user dial "012345" there is an error and the call isn't made and the error is "handle_request_invite: Call from 'XXX' to extension '012345' rejected because extension not found in context 'DLPN_DialPlanX'. 2-If user dials "0" waits for the signal, and then dials "12345" then it works fine. On Tue, 18 Jan 2011, Vitor Carlos Flausino wrote: Correcting the line to: exten => _0.,1,Macro(trunkdial-failover-0.3,${trunk_1}/${,${EXTEN:1})},,trunk_1,) problem persists... How about some console output for a 'good' call and a 'failed' call. Also, a 'show dialplan|dialplan show' for the executed context may yield some clues. -- Thanks in advance, - Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000 -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Calling rules
- Original Message - > From: "Steve Edwards" > To: "Asterisk Users Mailing List - Non-Commercial Discussion" > > Sent: Tuesday, January 18, 2011 8:06:47 PM > Subject: Re: [asterisk-users] Calling rules > Un-top-posting and discarding cruft... > > On Tue, 18 Jan 2011, Vitor Carlos Flausino wrote: > > > Users, have to dial "0" to get an external line, and afterwords the > > number they want to dial (exe 12345). The thing is: > > > > 1-If user dial "012345" there is an error and the call isn't made > > and > > the error is "handle_request_invite: Call from 'XXX' to extension > > '012345' rejected because extension not found in context > > 'DLPN_DialPlanX'. 2-If user dials "0" waits for the signal, and then > > dials "12345" then it works fine. > > > > Should the result be the same? Shouldn't asterisk automatically > > "dial" > > 0, wait and then dial the external number? > > > From: "Danny Nicholas" > > > My best guess is that it is a "dialplan inconsistency". The > > "standard" for > > "outside line" dialing is something like this: > > - exten => 0.,1,Dial(DAHDI/1,${EXTEN:1}) > > Where the dialplan "chomps" the first digit off of the dialed > > string. > > On Tue, 18 Jan 2011, Vitor Carlos Flausino wrote: > > > exten = > > _0,1,Macro(trunkdial-failover-0.3,${trunk_1}/${,${EXTEN:1})},,trunk_1,) > > > > Notice the difference between your "0." and my "_0". > > > > Is "mine" correct? > > Both are 'wrong.' > > I'm guessing Danny just typed that in off the top of his head -- he > forgot > the leading underscore in the pattern. > > Please read up on pattern matching. In particular, what '_' and '.' > mean. > > http://www.voip-info.org/tiki-index.php?page=Asterisk%20config%20extensions.conf > http://www.voip-info.org/wiki/view/Asterisk+Dialplan+Patterns > http://www.voip-info.org/wiki/view/Asterisk+Extension+Matching > > Should get you started. > Correcting the line to: exten => _0.,1,Macro(trunkdial-failover-0.3,${trunk_1}/${,${EXTEN:1})},,trunk_1,) problem persists... any other suggestions? Best regards, -vcf -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Calling rules
Un-top-posting and discarding cruft... On Tue, 18 Jan 2011, Vitor Carlos Flausino wrote: Users, have to dial "0" to get an external line, and afterwords the number they want to dial (exe 12345). The thing is: 1-If user dial "012345" there is an error and the call isn't made and the error is "handle_request_invite: Call from 'XXX' to extension '012345' rejected because extension not found in context 'DLPN_DialPlanX'. 2-If user dials "0" waits for the signal, and then dials "12345" then it works fine. Should the result be the same? Shouldn't asterisk automatically "dial" 0, wait and then dial the external number? From: "Danny Nicholas" My best guess is that it is a "dialplan inconsistency". The "standard" for "outside line" dialing is something like this: - exten => 0.,1,Dial(DAHDI/1,${EXTEN:1}) Where the dialplan "chomps" the first digit off of the dialed string. On Tue, 18 Jan 2011, Vitor Carlos Flausino wrote: exten = _0,1,Macro(trunkdial-failover-0.3,${trunk_1}/${,${EXTEN:1})},,trunk_1,) Notice the difference between your "0." and my "_0". Is "mine" correct? Both are 'wrong.' I'm guessing Danny just typed that in off the top of his head -- he forgot the leading underscore in the pattern. Please read up on pattern matching. In particular, what '_' and '.' mean. http://www.voip-info.org/tiki-index.php?page=Asterisk%20config%20extensions.conf http://www.voip-info.org/wiki/view/Asterisk+Dialplan+Patterns http://www.voip-info.org/wiki/view/Asterisk+Extension+Matching Should get you started. -- Thanks in advance, - Steve Edwards sedwa...@sedwards.com Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000 -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Calling rules
My dial plan was generated by asterisk GUI, and the line is: exten = _0,1,Macro(trunkdial-failover-0.3,${trunk_1}/${,${EXTEN:1})},,trunk_1,) where trunk_1 "is DAHDI/1" Notice the difference between your "0." and my "_0". Is "mine" correct? Best regards, -vcf - Original Message - From: "Danny Nicholas" To: "Asterisk Users Mailing List - Non-Commercial Discussion" Sent: Tuesday, January 18, 2011 7:21:15 PM Subject: Re: [asterisk-users] Calling rules -Original Message- From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Vitor Carlos Flausino Sent: Tuesday, January 18, 2011 12:10 PM To: asterisk-users@lists.digium.com Subject: [asterisk-users] Calling rules Hello. I don't know if this is a problem, but I was expecting a different behavior. Users, have to dial "0" to get an external line, and afterwords the number they want to dial (exe 12345). The thing is: 1-If user dial "012345" there is an error and the call isn't made and the error is "handle_request_invite: Call from 'XXX' to extension '012345' rejected because extension not found in context 'DLPN_DialPlanX'. 2-If user dials "0" waits for the signal, and then dials "12345" then it works fine. Should the result be the same? Shouldn't asterisk automatically "dial" 0, wait and then dial the external number? Best regards, Vitor Flausino My best guess is that it is a "dialplan inconsistency". The "standard" for "outside line" dialing is something like this: - exten => 0.,1,Dial(DAHDI/1,${EXTEN:1}) Where the dialplan "chomps" the first digit off of the dialed string. -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Calling rules
-Original Message- From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Vitor Carlos Flausino Sent: Tuesday, January 18, 2011 12:10 PM To: asterisk-users@lists.digium.com Subject: [asterisk-users] Calling rules Hello. I don't know if this is a problem, but I was expecting a different behavior. Users, have to dial "0" to get an external line, and afterwords the number they want to dial (exe 12345). The thing is: 1-If user dial "012345" there is an error and the call isn't made and the error is "handle_request_invite: Call from 'XXX' to extension '012345' rejected because extension not found in context 'DLPN_DialPlanX'. 2-If user dials "0" waits for the signal, and then dials "12345" then it works fine. Should the result be the same? Shouldn't asterisk automatically "dial" 0, wait and then dial the external number? Best regards, Vitor Flausino My best guess is that it is a "dialplan inconsistency". The "standard" for "outside line" dialing is something like this: - exten => 0.,1,Dial(DAHDI/1,${EXTEN:1}) Where the dialplan "chomps" the first digit off of the dialed string. -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users