>> On Thu, Jul 01, 2010 at 10:19:08PM -0500, Karl Fife wrote: >>> Calls that come in on DAHDI FXO ports are routed to [context], >>> extension 's' >>> >>> INSTEAD, I would like to route specific ports to specific extensions, >>> For example: >>> >>> I want DAHDI/1-1 to go to 1234 >>> I want DAHDI/1-2 to go to 2345 >>> I want DAHDI/1-3 to go to 3456 ...etc >>> >>> What is the CLEANEST way to do this?
> From: "Barry Miller" <[email protected]> >> setvar = EXT=1234 >> channel => 1 >> [] >> and EXT will be passed into your dialplan. On Fri, 2 Jul 2010, Karl Fife wrote: > Following your suggestion I would still need to add the following line to > [context] > exten => s ,1,GotoIf($["${EXT}"="1234"]1234,1) ; How about: [example] exten = s,1, verbose(1,[${CONTEXT}:${EXTEN}]) exten = s,n, goto(${EXT},1) exten = 1234,1, verbose(1,[${CONTEXT}:${EXTEN}]) exten = 1234,n, dial(...) exten = 1234,n, hangup() exten = 2345,1, verbose(1,[${CONTEXT}:${EXTEN}]) exten = 2345,n, dial(...) exten = 2345,n, hangup() Or maybe: [globals] EXT-1234 = DAHDI/1-1 EXT-2345 = DAHDI/1-2 EXT-3456 = DAHDI/1-3 [example] exten = s,1, verbose(1,[${CONTEXT}:${EXTEN}]) exten = s,n, verbose(1,Dialing ${EXT-${EXT}}) exten = s,n, dial(${EXT-${EXT}}) exten = s,n, hangup() Off the top of my head and untested, but I think this may work for you. -- Thanks in advance, ------------------------------------------------------------------------- Steve Edwards [email protected] 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
