This is concerning an Asterisk 1.4.18 server. We have approximately 70 DID numbers. Incoming calls are placed into the "incoming" context (by zapata.conf) and are routed based on the dialed number. I want to do some manipulation (CallerID name override) to all incoming calls before they are routed. I would prefer to avoid duplicating the necessary code in each DID extension stanza, even if it's just a call to a macro. 1. Can I set up a catch-all extension in "incoming", do my processing, and then have the calls "fall through" to the existing extension stanzas? 2. Or, should I use a separate "pre-incoming" context to do the manipulation and then jump to the real "incoming" context containing the specific extension stanzas? 3. Or, is there another method that would be more elegant? Thanks. -- Kevin DeGraaf
#1 is your best bet. Use Goto(). On Dec 19, 2008, at 14:03, Kevin DeGraaf <kevin at kdegraaf.net> wrote:> This is concerning an Asterisk 1.4.18 server. > > We have approximately 70 DID numbers. Incoming calls are placed into > the "incoming" context (by zapata.conf) and are routed based on the > dialed number. > > I want to do some manipulation (CallerID name override) to all > incoming > calls before they are routed. I would prefer to avoid duplicating the > necessary code in each DID extension stanza, even if it's just a > call to > a macro. > > 1. Can I set up a catch-all extension in "incoming", do my processing, > and then have the calls "fall through" to the existing extension > stanzas? > > 2. Or, should I use a separate "pre-incoming" context to do the > manipulation and then jump to the real "incoming" context containing > the > specific extension stanzas? > > 3. Or, is there another method that would be more elegant? > > Thanks. > > -- > Kevin DeGraaf > > _______________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users
Kevin DeGraaf wrote:> a macro. > > 1. Can I set up a catch-all extension in "incoming", do my processing, > and then have the calls "fall through" to the existing extension stanzas? > >I use number 1 with a Gosub(get_name,s,1) It jumps to a mysql lookup against the number and sets the name and continues on. Doug -- Ben Franklin quote: "Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety."
Quoth Kevin DeGraaf <kevin at kdegraaf.net>> >I want to do some manipulation (CallerID name override) to all incoming >calls before they are routed. I would prefer to avoid duplicating the >necessary code in each DID extension stanza, even if it's just a call to >a macro.I do it like so: [isdn_in] exten => _X.,1,Set(CALLERID(name)=Banana) ;.... exten => _X.,n,Goto(real_isdn_in,${EXTEN},1) ; [real_isdn_in] ; ; DDI planning ; exten => _871800,1,Goto(groups,200,1) exten => _871802,1,Macro(stdexten|112|Sip/112) exten => _871803,1,Macro(stdexten|113|Sip/113) exten => _871804,1,Macro(stdexten|114|Sip/114) ;... HtH -- Regards, Russell -------------------------------------------------------------------- | Russell Brown | MAIL: russell at lls.com PHONE: 01780 471800 | | Lady Lodge Systems | WWW Work: http://www.lls.com | | Peterborough, England | WWW Play: http://www.ruffle.me.uk | --------------------------------------------------------------------