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

Steve Edwards asterisk.org at sedwards.com
Sat Jul 3 01:52:14 CDT 2010


>> 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-users at 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       sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000



More information about the asterisk-users mailing list