[Freeswitch-users] Event Socket Outbound - Playback Sequence

Luiz Fernando Softov fernando at softov.com.br
Fri Sep 2 03:48:18 MSD 2016


Now I'm having another problem.

Let's say
​I​
 have
​some
audio files to playback

file_1.mp3 ->
​​
hello, you have pendencies
file_2.mp3 -> to inform payment
file_3.mp3 -> please press
file_4.mp3 -> one

​Then, i do execute playback, without LOCK (because I need to garb DTMF and
send BREAK to stop playback)
​

playback="file_1.mp3!file_2.mp3!file_3.mp3!file_4.mp3"

FS must say
-> hello, you have pendencies, to inform payment, please press, one

But FS is saying
-> hello, you have
​ ​
.....
​ ​
payment, please ... one

The scenario is

2001 --> [FS A] -- gateway --> [FS B] --> playfiles

If the scenario is

2001 --> [FS A] --> playfiles

The files are played correct

​
​
This
​ is​
 happen
​ing​
 with the same codec in all legs
​

I already enable and disable transcoding,
​without success


There is the log of FS A

https://pastebin.freeswitch.org/view/b783fc14

A
​nd log of ​
FS B
​

https://pastebin.freeswitch.org/view/95aa3580

2016-09-01 19:43 GMT-04:00 Luiz Fernando Softov <fernando at softov.com.br>:

> Now I'm having another problem.
>
> Let's say
> ​I​
>  have
> ​some
> audio files to playback
>
> file_1.mp3 ->
> ​​
> hello, you have pendencies
> file_2.mp3 -> to inform payment
> file_3.mp3 -> please press
> file_4.mp3 -> one
>
> ​Then, i do execute playback, without LOCK (because I need to garb DTMF
> and send BREAK to stop playback)
>>
> playback="file_1.mp3!file_2.mp3!file_3.mp3!file_4.mp3"
>
> FS must say
> -> hello, you have pendencies, to inform payment, please press, one
>
> But FS is saying
> -> hello, you have
> ​ ​
> .....
> ​ ​
> payment, please ... one
>
> The scenario is
>
> 2001 --> [FS A] -- gateway --> [FS B] --> playfiles
>
> If the scenario is
>
> 2001 --> [FS A] --> playfiles
>
> The files are played correct
>
>>> This
> ​ is​
> happen
> ​ing​
> with the same codec in all legs
>>
> I already enable and disable transcoding,
> ​without success
>
>
> There is the log of FS A
>
> https://pastebin.freeswitch.org/view/b783fc14
>
> A
> ​nd log of ​
> FS B
>>
> https://pastebin.freeswitch.org/view/95aa3580
>
>
>
>
>
> 2016-08-27 17:41 GMT-04:00 Luiz Fernando Softov <fernando at softov.com.br>:
>
>> Thanks, this do the job...
>>
>> 2016-08-26 8:01 GMT-04:00 Dave Horton <daveh at beachdognet.com>:
>>
>>> Can't you play all the files in a single command using a playback
>>> delimiter?
>>>
>>> Sent from my iPhone
>>>
>>> On Aug 26, 2016, at 12:34 AM, Luiz Fernando Softov <
>>> fernando at softov.com.br> wrote:
>>>
>>> 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
>>>
>>> ____________________________________________________________
>>> _____________
>>> Professional FreeSWITCH Consulting Services:
>>> consulting at freeswitch.org
>>> http://www.freeswitchsolutions.com
>>>
>>> Official FreeSWITCH Sites
>>> http://www.freeswitch.org
>>> http://confluence.freeswitch.org
>>> http://www.cluecon.com
>>>
>>> FreeSWITCH-users mailing list
>>> FreeSWITCH-users at lists.freeswitch.org
>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>>> http://www.freeswitch.org
>>>
>>>
>>> ____________________________________________________________
>>> _____________
>>> Professional FreeSWITCH Consulting Services:
>>> consulting at freeswitch.org
>>> http://www.freeswitchsolutions.com
>>>
>>> Official FreeSWITCH Sites
>>> http://www.freeswitch.org
>>> http://confluence.freeswitch.org
>>> http://www.cluecon.com
>>>
>>> FreeSWITCH-users mailing list
>>> FreeSWITCH-users at lists.freeswitch.org
>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>>> http://www.freeswitch.org
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20160901/f9a49f3c/attachment-0001.html 


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