拨打并启动asr

bgapi originate {origination_uuid=12345678}user/1000 ‘start_asr:xx yy zz, park’ inline

放音

uuid_broadcast 12345678 /home/w.wav
对应事件如下:

  1. <event>
  2. <headers>
  3. <Event-Name>PLAYBACK_START</Event-Name>
  4. <Core-UUID>c42aad28-0e79-4b57-be48-7232b35db8a2</Core-UUID>
  5. <Unique-ID>12345678</Unique-ID>
  6. <variable_current_application_data>/home/w.wav</variable_current_application_data>
  7. <variable_current_application>playback</variable_current_application>
  8. <Playback-File-Path>/home/w.wav</Playback-File-Path>
  9. </headers>
  10. </event>

放音暂停

使用uuid_fileman来控制声音文件的播放和暂停
uuid_fileman 12345678 pause

放音打断

使用uuid_break来实现打断的效果
uuid_break 12345678 all

对应的事件如下:

  1. <event>
  2. <headers>
  3. <Event-Name>PLAYBACK_STOP</Event-Name>
  4. <Core-UUID>c42aad28-0e79-4b57-be48-7232b35db8a2</Core-UUID>
  5. <Unique-ID>12345678</Unique-ID>
  6. <variable_current_application_data>/home/w.wav</variable_current_application_data>
  7. <variable_current_application>playback</variable_current_application>
  8. <variable_playback_last_offset_pos>170560</variable_playback_last_offset_pos>
  9. <variable_playback_seconds>22</variable_playback_seconds>
  10. <variable_playback_ms>22528</variable_playback_ms>
  11. <variable_playback_samples>180224</variable_playback_samples>
  12. <Playback-File-Path>/home/w.wav</Playback-File-Path>
  13. <Playback-Status>break</Playback-Status>
  14. </headers>
  15. </event>

播放结束

对应事件

  1. <event>
  2. <headers>
  3. <Event-Name>PLAYBACK_STOP</Event-Name>
  4. <Core-UUID>c42aad28-0e79-4b57-be48-7232b35db8a2</Core-UUID>
  5. <Unique-ID>12345678</Unique-ID>
  6. <variable_current_application_data>/home/w.wav</variable_current_application_data>
  7. <variable_current_application>playback</variable_current_application>
  8. <variable_playback_last_offset_pos>371040</variable_playback_last_offset_pos>
  9. <variable_playback_seconds>46</variable_playback_seconds>
  10. <variable_playback_ms>46380</variable_playback_ms>
  11. <variable_playback_samples>371040</variable_playback_samples>
  12. <Playback-File-Path>/home/w.wav</Playback-File-Path>
  13. <Playback-Status>done</Playback-Status>
  14. </headers>
  15. </event>