Sounds not being played

Hi,
Our configuration is Asterisk 1.4.17 on FreeBSD. I have problems with sounds not being played after user picks up the phone but it seems dialplan will not break because it seems phone call is actually finished successfully. Dialplan should play two sounds after user picks up and then wait for pressing 1. The problem is that sometime it works sometime it is not and I am not able to get information when exactly id did not work. This is dialplan:

[globals]
VOIP_PATH_PUBLIC=/usr/home/asterisk/
VOIP_PATH_PRIVATE=/usr/home/asterisk/
VOIP_PATH_AGI=/usr/local/share/asterisk/agi-bin/

[broker2lead]
exten => s,1,Set(CDR(accountcode,l)=${Account})
exten => s,2,Set(CDR(userfield)=${CustomID})
exten => s,3,Set(TIMEOUT(response)=30)
exten => s,4,Set(TIMEOUT(absolute)=3300)
exten => s,5,Answer()
exten => s,6,Background(${SoundWelcome})
exten => s,7,Background(${SoundCommands})
exten => s,8,WaitExten(30)

exten => 1,1,ForkCDR(w)
exten => 1,n,Set(CALLFILENAME=${VOIP_PATH_PRIVATE}monitors/${CustomID})
exten => 1,n,MixMonitor(${CALLFILENAME}.wav|b)
exten => 1,n,Dial(${dialed_lead},30)
…etc

Call is originated with phpAGI:

$asm = new AGI_AsteriskManager();
if($asm->connect())
{
$call = $asm->send_request(‘Originate’,$fields);
$asm->disconnect();
}

$fields is an array:
Channel:IAX2/iaxvitel/7084522246
Context:broker2lead
Exten:s
MaxRetries:5
RetryTime:300
WaitTime:30
Priority:1
Variable:CallerID=3125556666|CustomID=xxx-3125556666-3125557777-121123366608907200| Account=3125556666|user=xxx|pass=yyyy|LeadSystemURL=http://www.system.com/| SoundWelcome=b_xxx|SoundCommands=b_press1|dialed_lead=IAX2/iaxvitel/3125557777| dialed_broker=IAX2/iaxvitel/3125556666
CallerID:3125556666

This verbose from asterisk:

  • Executing [s@broker2lead:1] Set(“IAX2/iaxvitel-1”, “CDR(accountcode|l)=3125556666”) in new stack
    – Executing [s@broker2lead:2] Set(“IAX2/iaxvitel-1”, “CDR(userfield)=xxx-3125556666-3125557777-121123366608907200”) in new stack
    – Executing [s@broker2lead:3] Set(“IAX2/iaxvitel-1”, “TIMEOUT(response)=30”) in new stack
    – Response timeout set to 30
    – Executing [s@broker2lead:4] Set(“IAX2/iaxvitel-1”, “TIMEOUT(absolute)=3300”) in new stack
    – Channel will hangup at 2008-05-20 15:09:38 UTC.
    – Executing [s@broker2lead:5] Answer(“IAX2/iaxvitel-1”, “”) in new stack
    – Executing [s@broker2lead:6] BackGround(“IAX2/iaxvitel-1”, “b_xxx”) in new stack
    – <IAX2/iaxvitel-1> Playing ‘b_xxx’ (language ‘en’)
    – Executing [s@broker2lead:7] BackGround(“IAX2/iaxvitel-1”, “b_press1”) in new stack
    – <IAX2/iaxvitel-1> Playing ‘b_press1’ (language ‘en’)

My problem is that it seems that however this line “Playing ‘b_xxx’ (language ‘en’)” seems fine sound is not really played, similar with press1 sound. dialplan will continue jus fine becase when user press 1 another phone is bridged successfully…

Thank for any hints!

Pavel