[Asterisk-Users] Make asterisk launch script after completing call.

Alex Polite m4 at polite.se
Mon Dec 20 05:45:38 MST 2004


On sön, dec 19, 2004 at 02:46:00 +0100, Alex Polite wrote:
> 
> OK. I now have call recording working for both incoming and outgoing
> calls.
> 
> Now I want to make those wavs into mp3. I could launch a script from
> cron that checks for new wavs and converts them. But that wouldn't be
> so elegant.
> 
> Launching it from * on hangup would be nicer. How is it done?

Like so:

[sip-in]
exten => 1000,1,SetVar(CALLFILENAME=incoming_${CALLERIDNUM}_${TIMESTAMP})
exten => 1000,2,Monitor(wav,${CALLFILENAME})
exten => 1000,3,Dial(SIP/alex,20)
;exten => 1000,4,Voicemail(u1000)
exten => h,1,Macro(wav2mp3)

[macro-wav2mp3]
exten => s,1,System(nice -n 19 asterisk2mp3.py /var/spool/asterisk/monitor ${CALLFILENAME})





Found it after googling for hours. I have to say that the
documentation for Asterix feels a bit sketchy.

alex

-- 
Alex Polite
http://polite.se



More information about the asterisk-users mailing list