[Freeswitch-users] Event Socket Outbound - Playback Sequence

Luiz Fernando Softov fernando at softov.com.br
Fri Aug 26 08:34:46 MSD 2016


Hi all,

I'm using FS with Event Socket Outbound.

Eg: The user calls to XXX and the calls goes to socket.

    <extension name="VoiprExt">
      <condition>
      <action
​​
application="socket" data="127.0.0.1:3012 async full"/>
        <action application="hangup"/>
      </condition>
    </extension>

I receive a call, and play some files (sometimes http:// or shout://).
Using command action playback.

sendmsg <uuid>
call-command: execute
execute-app-name: playback
execute-app-arg:
​
​
/sounds/system/chr_
​1​
.mp3


The problem is, I'm sending commands to playback files 1, 2, 3
And the system are playing 3, 2, 1

I already tried to use event-lock.
​S
ometimes​,
​
if user press any DTMF
​,​
 I need to stop playback
I
​f I use​
event-lock
​: true. I
 can't do anything until the files are done.
The same, using command break (break only show up when files are done).

Is there another way, or a correct way to playback multiple sequential
files, in order
​, using
​
application="socket"?
This is a BUG?

​
​I don't if I made myself clear here.
​
In resume, I can't wait until the current file is done, to send another
command to play the next file, since I have one list (options), with
several list of files to play (files)​. And, using asynchronous events
(kqueue), the list(s) can change in the middle of process.

​It's like
* Option 1:
** file: ​wellcome.mp3
** file: ​file_
​abc​
1
.mp3
​​
* Option
​2​
:
​** file: protocol.mp3​
​​
** file: ​
​digit
_
​8​
.mp3
​
​
** file: ​
​digit_
​7​
.mp3
​
​
** file: ​
​digit_
​1​
.mp3
​

​
** file: ​
​digit_
​2​
.mp3
​

​
** file: ​
​digit_
​3​
.mp3
​

​
​
* Option
​3
:
​** file: ​
​sales
.mp3​​
​

​And, after this, the files to be played are

wellcome.mp3
file_
​abc​
1
.mp3
protocol.mp3​
digit
_
​8​
.mp3​
digit_
​7​
.mp3​
digit_
​1​
.mp3​

digit_
​2​
.mp3​

digit_
​3​
.mp3​

sales
.mp3​​​

But, the files are not played in sequence.​

​
​


[DEBUG] switch_channel.c:3770 (sofia/profile_1/6001 at 192.168.142.12)
Callstate Change RINGING -> ACTIVE
[DEBUG] sofia.c:6858 Channel sofia/profile_1/6001 at 192.168.142.12 entering
state [completed][200]
[DEBUG] switch_ivr.c:623 sofia/profile_1/6001 at 192.168.142.12 Command
Execute playback(/sounds/ivr/ivr_intro.mp3)
EXECUTE sofia/profile_1/6001 at 192.168.142.12
playback(/sounds/ivr/ivr_intro.mp3)
[DEBUG] switch_ivr_play_say.c:1467 Codec Activated L16 at 8000hz 1 channels
20ms
[DEBUG] sofia.c:6858 Channel sofia/profile_1/6001 at 192.168.142.12 entering
state [ready][200]
[DEBUG] switch_rtp.c:6706 Correct audio ip/port confirmed.
[DEBUG] switch_rtp.c:1845 rtcp_stats_init: audio ssrc[1125545576]
base_seq[28137]
[DEBUG] switch_ivr_play_say.c:1910 done playing file
/sounds/ivr/ivr_intro.mp3
[DEBUG] switch_ivr.c:623 sofia/profile_1/6001 at 192.168.142.12 Command
Execute playback(/sounds/ivr/ivr_menu.mp3)
EXECUTE sofia/profile_1/6001 at 192.168.142.12
playback(/sounds/ivr/ivr_menu.mp3)
[DEBUG] switch_ivr_play_say.c:1467 Codec Activated L16 at 8000hz 1 channels
20ms
[DEBUG] switch_ivr.c:623 sofia/profile_1/6001 at 192.168.142.12 Command
Execute playback(/sounds/system/transfer_request.mp3)
EXECUTE sofia/profile_1/6001 at 192.168.142.12
playback(/sounds/system/transfer_request.mp3)
[DEBUG] switch_ivr_play_say.c:1467 Codec Activated L16 at 8000hz 1 channels
20ms
[DEBUG] switch_ivr.c:623 sofia/profile_1/6001 at 192.168.142.12 Command
Execute playback(/sounds/system/chr_1.mp3)
EXECUTE sofia/profile_1/6001 at 192.168.142.12
playback(/sounds/system/chr_1.mp3)
[DEBUG] switch_ivr_play_say.c:1467 Codec Activated L16 at 8000hz 1 channels
20ms
[DEBUG] switch_ivr.c:623 sofia/profile_1/6001 at 192.168.142.12 Command
Execute playback(/sounds/system/chr_2.mp3)
EXECUTE sofia/profile_1/6001 at 192.168.142.12
playback(/sounds/system/chr_2.mp3)
[DEBUG] switch_ivr_play_say.c:1467 Codec Activated L16 at 8000hz 1 channels
20ms
[DEBUG] switch_ivr.c:623 sofia/profile_1/6001 at 192.168.142.12 Command
Execute playback(/sounds/system/chr_3.mp3)
EXECUTE sofia/profile_1/6001 at 192.168.142.12
playback(/sounds/system/chr_3.mp3)
[DEBUG] switch_ivr_play_say.c:1467 Codec Activated L16 at 8000hz 1 channels
20ms
[DEBUG] switch_ivr_play_say.c:1910 done playing file
​​
/sounds/system/chr_3.mp3
[DEBUG] switch_ivr_play_say.c:1910 done playing file
/sounds/system/chr_2.mp3
[DEBUG] switch_ivr_play_say.c:1910 done playing file
/sounds/system/chr_1.mp3
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20160826/6342f4c4/attachment.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list