[Asterisk-Users] How to transfer value to extensions.conf?
Steven Critchfield
critch at basesys.com
Fri Nov 26 09:08:28 MST 2004
On Fri, 2004-11-26 at 16:56 +0100, Ning Zhou wrote:
> For example, I have a file under /var/spool/asterisk/outgoing, which include:
> channel: zap/g1/12345
> MaxRetries: 0
> RetryTime: 60
> WaitTime: 20
> Context: default
> Extension: 2222
> Priority: 1
>
> And in my "extensions.conf" file, I have
> [default]
> exten => 2222,1,Dial(Zap/g1/34567,20)
> exten => 2222,2,Hangup
>
> Then Asterisk will first dial the 'number 12345, then dial the number
> indicted in the exten =>2222 which is 34567, then setup a bridge
> between them. That is exactly what I want.
>
> My question is, if I like to transfer some variable to the
> extensions.conf, to replace the number 34567, since the number dialed
> every time is not a fixed phone number, what should I do?
extensions.conf file
[auto-out]
exten => _X.,1,Dial(Zap/g1/${EXTEN}
exten => _X.,2,hangup
Call file
channel: zap/g1/12345
MaxRetries: 0
RetryTime: 60
WaitTime: 20
Context auto-out
Extension: 123456789
Priority: 1
Spend some time learning patern matching.
--
Steven Critchfield <critch at basesys.com>
More information about the asterisk-users
mailing list