[Asterisk-Users] How to transfer value to extensions.conf?

Vladyslav vladk at azhelp.net
Fri Nov 26 09:16:35 MST 2004


In the call file U could Setvar (4 a channel) and after that use it in
dialplan.
http://www.voip-info.org/tiki-index.php?page=Asterisk%20auto-dial%20out

On Fri, 2004-11-26 at 18:08, Steven Critchfield wrote:
> 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. 
-- 
Best regards
Vlad




More information about the asterisk-users mailing list