[Asterisk-Users] Extension Logic Question Help!! Park andAnnounce

Kevin Asterisk at gtcus.com
Wed May 5 04:55:41 MST 2004


The extension logic for the parkandannounce works correctly.  When the
parkandannounce step is executed, the system doesn't proceeded to the
next step to delete the file.


-----Original Message-----
From: Mark Elkins [mailto:mje at posix.co.za] 
Sent: Wednesday, May 05, 2004 3:08 AM
To: asterisk-users at lists.digium.com
Subject: Re: [Asterisk-Users] Extension Logic Question Help!! Park
andAnnounce

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






More information about the asterisk-users mailing list