[Freeswitch-users] How to play some file into parked call via inbound ESL connection?

Brian West brian at freeswitch.com
Sun Oct 21 04:41:46 UTC 2018


No, it can stack them for you, no need to do it manually.

/b

On Sat, Oct 20, 2018 at 10:50 AM Tihomir Culjaga <tculjaga at gmail.com> wrote:

> its strange you want turn async into sync... but okay :=)
>
> From my opinion, would be better to subscribe PLAYBACK_START and
> PLAYBACK_STOP events (and other events to track call state) and in this
> case react on  PLAYBACK_STOP to process next command. This way you can
> handle simultaneous calls :=)
> As for commands, its better to use bgapi instead of api so you avoid being
> blocking during command execution ( e.g. originate ).
>
>
>
> regards,
> Tihomir.
>
>
>
>
> On Thu, 18 Oct 2018 at 12:28, Brian West <brian at freeswitch.com> wrote:
>
>> You don’t have to use that method,
>>
>> sendmsg: <uuid>
>> call-command: execute
>> exec-app-name: playback
>> exec-app-args: file.wav
>> event-lock:true
>>
>>
>>
>>
>> On Wed, Oct 17, 2018 at 7:02 AM Eugene Prokopiev <enp at itx.ru> wrote:
>>
>>> Hi,
>>>
>>> Is it possible to play some file into parked call via inbound ESL
>>> connection? I have dialplan like this:
>>>
>>>     <extension name="in">
>>>       <condition>
>>>         <action application="park"/>
>>>       </condition>
>>>     </extension>
>>>
>>> I tried:
>>>
>>> $ telnet localhost 8021
>>>
>>> auth ClueCon
>>>
>>> Content-Type: command/reply
>>> Reply-Text: +OK accepted
>>>
>>> event plain CHANNEL_PARK
>>>
>>> Content-Type: command/reply
>>> Reply-Text: +OK event listener enabled plain
>>>
>>> Content-Length: 5397
>>> Content-Type: text/event-plain
>>>
>>> Event-Name: CHANNEL_PARK
>>> ...
>>> Unique-ID: 783e9456-d1f2-11e8-a77f-95321f80797f
>>> ...
>>>
>>> api uuid_answer 783e9456-d1f2-11e8-a77f-95321f80797f
>>>
>>> Content-Type: api/response
>>> Content-Length: 4
>>>
>>> +OK
>>>
>>> api uuid_displace 783e9456-d1f2-11e8-a77f-95321f80797f start
>>> /usr/share/freeswitch/sounds/ru/RU/elena/ivr/8000/ivr-welcome.wav
>>>
>>> Content-Type: api/response
>>> Content-Length: 12
>>>
>>> +OK Success
>>>
>>> api uuid_broadcast 783e9456-d1f2-11e8-a77f-95321f80797f
>>>
>>> playback::/usr/share/freeswitch/sounds/ru/RU/elena/ivr/8000/ivr-welcome.wav
>>>
>>> Content-Type: api/response
>>> Content-Length: 17
>>>
>>> +OK Message sent
>>>
>>> api uuid_kill 783e9456-d1f2-11e8-a77f-95321f80797f
>>>
>>> Content-Type: api/response
>>> Content-Length: 4
>>>
>>> So, both api uuid_displace and api uuid_broadcast returns immediately
>>> with +OK. Is it possible to play and wait until the end of file? Or
>>> this is possible via sendmsg instead of api and suscribing on
>>> PLAYBACK_STOP event?
>>>
>>> --
>>> WBR,
>>> Eugene Prokopiev
>>>
>>> _________________________________________________________________________
>>> Professional FreeSWITCH Services
>>> sales at freeswitch.com
>>> https://freeswitch.com
>>>
>>> Official FreeSWITCH Sites
>>> https://freeswitch.com/oss
>>> https://freeswitch.org/confluence
>>> https://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
>>> https://freeswitch.com
>>
>> --
>>
>> Brian West | Co-founder and Developer
>>
>> Need Commercial support? email sales at freeswitch.com
>>
>> FreeSWITCH Solutions | 17345 Civic Drive #2531 Brookfield, WI 53045
>> <https://maps.google.com/?q=17345+Civic+Drive+%232531+Brookfield,+WI+53045&entry=gmail&source=g>
>>
>> Email: brian at freeswitch.com
>>
>> Mobile: 918-424-9378
>>
>> Website: https://www.FreeSWITCH.com <https://www.freeswitch.com/>
>>
>> [image: https://www.facebook.com/signalwireinc?src=email]
>> <https://www.facebook.com/freeswitch> [image:
>> https://twitter.com/freeswitch] <https://twitter.com/freeswitch>
>> _________________________________________________________________________
>> Professional FreeSWITCH Services
>> sales at freeswitch.com
>> https://freeswitch.com
>>
>> Official FreeSWITCH Sites
>> https://freeswitch.com/oss
>> https://freeswitch.org/confluence
>> https://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
>> https://freeswitch.com
>
> _________________________________________________________________________
> Professional FreeSWITCH Services
> sales at freeswitch.com
> https://freeswitch.com
>
> Official FreeSWITCH Sites
> https://freeswitch.com/oss
> https://freeswitch.org/confluence
> https://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
> https://freeswitch.com

-- 

Brian West | Co-founder and Developer

Need Commercial support? email sales at freeswitch.com

FreeSWITCH Solutions | 17345 Civic Drive #2531 Brookfield, WI 53045
<https://maps.google.com/?q=17345+Civic+Drive+%232531+Brookfield,+WI+53045&entry=gmail&source=g>

Email: brian at freeswitch.com

Mobile: 918-424-9378

Website: https://www.FreeSWITCH.com <https://www.freeswitch.com/>

[image: https://www.facebook.com/signalwireinc?src=email]
<https://www.facebook.com/freeswitch> [image:
https://twitter.com/freeswitch] <https://twitter.com/freeswitch>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20181020/832bbfc6/attachment.html>


More information about the FreeSWITCH-users mailing list