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

Eugene Prokopiev enp at itx.ru
Wed Oct 17 11:36:16 UTC 2018


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



More information about the FreeSWITCH-users mailing list