Ning Zhou
2004-Nov-26 08:56 UTC
[Asterisk-Users] How to transfer value to extensions.conf?
Hi, all, I met a problem for several days, any suggestion is really appreciated!!! I'd like to do autodial using Asterisk. 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? Really hope you have give me some hints. BRs, ning zhou
Steven Critchfield
2004-Nov-26 09:08 UTC
[Asterisk-Users] How to transfer value to extensions.conf?
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@basesys.com>