Hi I was asked by our development departement to setup asterisk in a manner that if someone calls an extension in the department that was was only configured, but a handset was never attached to it to fall back to a default extension. For example: Someone calls extension 2408, but there's no phone attached to 2408 it should fall back and ring at 2400.. How do I setup asterisk to find out if there's a phone attached to an internal number if not ring another extension? TIA Paolo
Paolo You can use exten -> i This will catch any invalid extensions that are sent into a context. You could than route the flow as you see fit. Thanks Bryant ---------------------------------------- From: "Paolo Supino" <paolo.supino at gmail.com> Sent: Wednesday, March 21, 2012 8:24 AM To: asterisk-users at lists.digium.com Subject: [asterisk-users] fallback to default extension Hi I was asked by our development departement to setup asterisk in a manner that if someone calls an extension in the department that was was only configured, but a handset was never attached to it to fall back to a default extension. For example: Someone calls extension 2408, but there's no phone attached to 2408 it should fall back and ring at 2400.. How do I setup asterisk to find out if there's a phone attached to an internal number if not ring another extension? TIA Paolo -- _____________________________________________________________________ -- 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20120321/d901a53d/attachment.htm>
On Wed, Mar 21, 2012 at 8:27 AM, Paolo Supino <paolo.supino at gmail.com> wrote:> Hi > > ?I was asked by our development departement to setup asterisk in a > manner that if someone calls an extension in the department that was > was only configured, but a handset was never attached to it to fall > back to a default extension. For example: Someone calls extension > 2408, but there's no phone attached to 2408 it should fall back and > ring at 2400.. > > How do I setup asterisk to find out if there's a phone attached to an > internal number if not ring another extension? > > TIA > PaoloJust add a dial(SIP/2400) at a later priority or any of the other many ways. Assuming 2400 is you operator then set the var and drop to the operator. Verify your options to you dial syntax and any std-exten setups. Priority numbers https://wiki.asterisk.org/wiki/display/AST/Contexts%2C+Extensions%2C+and+Priorities -- ~ Andrew "lathama" Latham lathama at gmail.com http://lathama.net ~
---------------------------------------- From: "Paolo Supino" <paolo.supino at gmail.com> Sent: Wednesday, March 21, 2012 3:40 PM To: "Asterisk Users Mailing List - Non-Commercial Discussion" <asterisk-users at lists.digium.com> Subject: Re: [asterisk-users] fallback to default extension Hi I've pretty much have it setup properly with the following: exten => _24XX,1,Dial(SIP/${EXTEN},30) exten => _24XX,n,GotoIf($${DIALSTATUS}"="CHANUNAVAIL?noconn:conn) exten => _24XX,n(noconn),GotoIf($["${EXTEN}"="2400"?conn:force) exten => _24XX,n(force),Dial(SIP/2400) exten => _24XX,n(conn),hangup() The only problem is that if 2400 rejects the call asterisk tries to call extension 2400 again... What am I doing wrong and how do I fix it? TIA Paolo On Wed, Mar 21, 2012 at 1:44 PM, Phil Frost <phil at macprofessionals.com> wrote:> On Mar 21, 2012, at 08:36 , Andrew Latham wrote: >> On Wed, Mar 21, 2012 at 8:27 AM, Paolo Supino <paolo.supino at gmail.com>wrote:>>> Hi >>> >>> I was asked by our development departement to setup asterisk in a >>> manner that if someone calls an extension in the department that was >>> was only configured, but a handset was never attached to it to fall >>> back to a default extension. For example: Someone calls extension >>> 2408, but there's no phone attached to 2408 it should fall back and >>> ring at 2400.. >>> >>> How do I setup asterisk to find out if there's a phone attached to an >>> internal number if not ring another extension? >>> >> >> Just add a dial(SIP/2400) at a later priority or any of the other many >> ways. Assuming 2400 is you operator then set the var and drop to the >> operator. Verify your options to you dial syntax and any std-exten >> setups. > > > You might want to additionally inspect ${DIALSTATUS} to know more aboutwhy the first Dial() (to 2408, in your example) failed, and then use the ExecIf or GotoIf applications to take different actions.> > You might also try the function SIPPEER, again coupled with ExecIF orGotoIf.> > -- > _____________________________________________________________________ > -- 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20120321/24c96f8b/attachment.htm>
Minor Correction Hi I've pretty much have it setup properly with the following: exten => _24XX,1,Dial(SIP/${EXTEN},30) exten => _24XX,n,GotoIf($${DIALSTATUS}"="CHANUNAVAIL?noconn:conn) exten => _24XX,n(noconn),GotoIf($["${EXTEN}"="2400"]?conn:force) exten => _24XX,n(force),Dial(SIP/2400) exten => _24XX,n(conn),hangup() The only problem is that if 2400 rejects the call asterisk tries to call extension 2400 again... What am I doing wrong and how do I fix it? TIA Paolo On Wed, Mar 21, 2012 at 1:44 PM, Phil Frost <phil at macprofessionals.com> wrote:> On Mar 21, 2012, at 08:36 , Andrew Latham wrote: >> On Wed, Mar 21, 2012 at 8:27 AM, Paolo Supino <paolo.supino at gmail.com>wrote:>>> Hi >>> >>> I was asked by our development departement to setup asterisk in a >>> manner that if someone calls an extension in the department that was >>> was only configured, but a handset was never attached to it to fall >>> back to a default extension. For example: Someone calls extension >>> 2408, but there's no phone attached to 2408 it should fall back and >>> ring at 2400.. >>> >>> How do I setup asterisk to find out if there's a phone attached to an >>> internal number if not ring another extension? >>> >> >> Just add a dial(SIP/2400) at a later priority or any of the other many >> ways. Assuming 2400 is you operator then set the var and drop to the >> operator. Verify your options to you dial syntax and any std-exten >> setups. > > > You might want to additionally inspect ${DIALSTATUS} to know more aboutwhy the first Dial() (to 2408, in your example) failed, and then use the ExecIf or GotoIf applications to take different actions.> > You might also try the function SIPPEER, again coupled with ExecIF orGotoIf.> > -- > _____________________________________________________________________ > -- 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20120321/f5588f0b/attachment.htm>