[Asterisk-Users] Extension Logic Question Help!! Park and Announce

Mark Elkins mje at posix.co.za
Wed May 5 00:08:17 MST 2004


On Wed, 2004-05-05 at 04:02, Kevin wrote:
> I have an extension context that performs an assisted ParkandAnnounce
> page. I create a temporary sound file to be played but I would like to
> delete it after being used in the page park application.  I cant figure
> out how to delete the file after it is used in the context
> ParkandAnnounce.
> 
> Can anyone offer a suggestion?

As this is the second time I've seen this - let me try.

I presume that the following is your current thoughts....

> exten => _7XXXX,1,Answer
> exten => _7XXXX,2,Wait(1)
> exten => _7XXXX,3,Playback(paging)
> exten =>
> _7XXXX,4,Playback(/var/spool/asterisk/voicemail/default/${EXTEN:1}/greet
> )
> exten => _7XXXX,5,Playback(presspound)
> exten => _7XXXX,6,Record(/tmp/pageperson%d:wav)

Change to: exten => _7xxxx,6,RECORD(/tmp/pageperson${EXTEN:1}:wav)
I have not seen anyone else use a printf '%d' construct anywhere else
- using the extension to be paged should be unique..

then - whereever you have 'RECORDED_FILE' - change it to ..
/tmp/pageperson${EXTEN:1} ??? I'd also kill the '^M'

> exten => _7XXXX,7,Wait(1)
> exten => _7XXXX,8,Playback(${RECORDED_FILE}})
> exten => _7XXXX,9,Wait(1)
> exten =>
> _7XXXX,10,ParkAndAnnounce(beep:beep:beep:/var/spool/asterisk/voicemail/d
> efault/${EXTEN:1}/greet:${RECORDED_FILE}:hldonext:PARKED|60|Console/dsp|
> extensions,${EXTEN:1},1) ^M
> exten => _7XXXX,11,System(rm ${RECORDED_FILE})

Might change to ....  System(/bin/rm /tmp/pageperson${EXTEN:1})
(full path name to 'rm')
> exten => _7XXXX,12,Hangup
> ^
> 
> 
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
-- 
  .  .     ___. .__      Posix Systems - Sth Africa
 /| /|       / /__       mje at posix.co.za  -  Mark J Elkins, Cisco CCIE
/ |/ |ARK \_/ /__ LKINS  Tel: +27 12 807 0590  Cell: +27 82 601 0496

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20040505/5294766d/attachment.pgp


More information about the asterisk-users mailing list