[Asterisk-Dev] dial script, send variable problem??
Atuc
atuc at gmx.de
Mon Mar 14 15:08:49 MST 2005
hallo,
i trying to dial with a python script via the manager interface, it works
ok but i would like to send a soud file name as a variable to the dialplan,
so that i can call a number and send it a different soundfile i choose in
my pyton script.
the problem is, that the * dials correct and sends a sound but only if its
hardcodet, the variable my script sends will not bee seen in the dialplan?
how is it possibe to send a variable via a callscript to an extention?
thanks,
alexander
-------------
...... python code ...
sound="feature-not-avail-line"
s.send('Action: Originate\r\n')
s.send('Channel: IAX2/guest at snmdir.ath.cx/501\r\n')
s.send('Context: outboundmsg\r\n')
s.send('Extention: s\r\n')
s.send('Priority: 1\r\n\r\n')
s.send('RetryTime: 300\r\n')
s.send('WaitTime: 45\r\n')
#s.send(('Variable: snd=%s\r\n') % (sound))
s.send(('SetVar: snd=%s\r\n') % (sound))
// extentions.conf
; callgen test
[outboundmsg]
exten => s,1,DigitTimeout,5
exten => s,2,ResponseTimeout,10
exten => s,3,Answer
exten =>
s,4,Wait(1)
exten => s,5,NoOp(${snd})
exten => s,6,Playback(${snd})
;exten => s,6,Playback(feature-not-avail-line)
exten => s,7,Hangup
More information about the asterisk-dev
mailing list