Karl Fife
2010-Jul-02 03:19 UTC
[asterisk-users] DAHDI FXO calls and the 's' extension. No, Jackie-O doesn't work here--it's just an example. Sheesh!
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? Yes, I can create a private context for each DAHDI channel but that seems messy and verbose. [useless-context1] exten => s,1,goto(context,1234,1) [useless-context2] exten => s,1,goto(context,2345,1) [useless-context3] ...etc Slightly better, I can eliminate other contexts by hooking the channel variable, like this, but this also messier than it COULD be. [context] exten => s,1,GotoIf($["${CHANNEL}" = "DAHDI/1-1"]?1234) exten => s,n,GotoIf($["${CHANNEL}" = "DAHDI/2-1"]?2345) exten => s,n,GotoIf($["${CHANNEL}" = "DAHDI/3-1"]?3456)...etc exten => 1234,1,Dial(${BIGFOOT}) exten => 2345,1,Dial(${LOCHNESS-MONSTER}) exten => 3456,1,Dial(${JACKIE-ONASSIS})...etc Is there a way that I can simply specify the extension associated with a given dahdi channel in dahdi_channels.conf? It would seem logical, but I'm finding no love. If you also know for sure that there ISN'T a way to do what I'm asking, I'd like to know that too. Is there a way to state something like: context=2345 at privileged-out or context=privileged-out targetexten=2345 in dahdi-channels.conf ? Please advise. Thanks! -Karl p.s. Bigfoot DOES work here.
Barry Miller
2010-Jul-02 04:53 UTC
[asterisk-users] DAHDI FXO calls and the 's' extension. No, Jackie-O doesn't work here--it's just an example. Sheesh!
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? >[...]> > Is there a way that I can simply specify the extension associated with a > given dahdi channel in dahdi_channels.conf? It would seem logical, but I'm > finding no love. If you also know for sure that there ISN'T a way to do > what I'm asking, I'd like to know that too. >[...] Do you mean chan_dahdi.conf? There you can do something like setvar = EXT=1234 channel => 1 setvar = EXT=2345 channel => 2 and EXT will be passed into your dialplan. -- Barry