Re: [asterisk-users] DAHDI FXO calls and the 's' extension. No, Jackie-O doesn't work here--it's just an example. Sheesh!

2010-07-03 Thread Steve Edwards
 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 asterisk-us...@notanet.net

 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   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] DAHDI FXO calls and the 's' extension. No, Jackie-O doesn't work here--it's just an example. Sheesh!

2010-07-02 Thread Karl Fife
 Original Message - 
From: Barry Miller asterisk-us...@notanet.net
To: Asterisk Users Mailing List - Non-Commercial Discussion 
asterisk-users@lists.digium.com
Sent: Thursday, July 01, 2010 11:53 PM
Subject: Re: [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

Yes, chan_dahdi.conf.  I called out dahdi_channels instead because I observe 
somewhat of a convention these days to enumerate channels in dahdi_channels 
and #include that in chan_dahdi.


 setvar = EXT=1234
 channel = 1
 []
 and EXT will be passed into your dialplan.


Following your suggestion I would still need to add the following line to 
[context]
exten = s  ,1,GotoIf($[${EXT}=1234]1234,1) ;

So one could argue that it's actually simpler to just call the name of the 
channel itself in [context]
exten = s  ,1,GotoIf($[${CHANNEL}=DAHDI/1-1]1234,1) ;

Do you (or anyone) know if there's a way to set EXTEN directly? It would 
appear that you can't simply specify setvar=EXTEN=1234. No surprise the call 
still goes to the 's' extension.

I would think like there has got to be.  This seems like a fairly obvious 
thing to want to do.

Thanks!
-Karl



-- 
_
-- 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


[asterisk-users] DAHDI FXO calls and the 's' extension. No, Jackie-O doesn't work here--it's just an example. Sheesh!

2010-07-01 Thread Karl Fife
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=2...@privileged-out
or
context=privileged-out
targetexten=2345

in dahdi-channels.conf ?

Please advise.

Thanks!
-Karl

p.s.
Bigfoot DOES work here. 


-- 
_
-- 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] DAHDI FXO calls and the 's' extension. No, Jackie-O doesn't work here--it's just an example. Sheesh!

2010-07-01 Thread Barry Miller
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

-- 
_
-- 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