[Freeswitch-users] esl socket inbound + playback
Marcin S
ms4esl at gmail.com
Tue Oct 8 17:06:10 MSD 2013
Some more info, output from strace:
create_uid/filter/myevents/event - all OK
[pid 32639] recv(6, "Content-Type: auth/request\n\n", 65535, 0) = 28
[pid 32639] send(6, "auth ClueCon\n\n", 14, 0) = 14
[pid 32639] recv(6, "Content-Type: command/reply\nReply-Text: +OK
accepted\n\n", 65535, 0) = 54
[pid 32639] send(6, "api create_uuid", 15, 0) = 15
[pid 32639] send(6, "\n\n", 2, 0) = 2
[pid 32639] recv(6, "Content-Type: api/response\nContent-Length: 36\n\n",
65535, 0) = 47
[pid 32639] recv(6, "67b9c26c-3018-11e3-87c1-311d1641c437", 65535, 0) = 36
[pid 32639] send(6, "filter unique-id
67b9c26c-3018-11e3-87c1-311d1641c437\n\n", 55, 0) = 55
[pid 32639] recv(6, "Content-Type: command/reply\nReply-Text: +OK filter
added. [unique-id]=[67b9c26c-3018-11e3-87c1-311d1641c437]\n\n", 65535, 0) =
110
[pid 32639] send(6, "myevents 67b9c26c-3018-11e3-87c1-311d1641c437", 45, 0)
= 45
[pid 32639] send(6, "\n\n", 2, 0) = 2
[pid 32639] recv(6, "Content-Type: command/reply\nReply-Text: +OK Events
Enabled\n\n", 65535, 0) = 60
[pid 32639] send(6, "event plain ALL\n\n", 17, 0) = 17
[pid 32639] recv(6, "Content-Type: command/reply\nReply-Text: +OK event
listener enabled plain\n\n", 65535, 0) = 74
linger fails:
[pid 32639] send(6, "linger", 6, 0) = 6
[pid 32639] send(6, "\n\n", 2, 0) = 2
[pid 32639] recv(6, "Content-Type: command/reply\nReply-Text: -ERR not
controlling a session\n\n", 65535, 0) = 72
originate - OK
[pid 32635] send(6, "api originate
{origination_uuid=67b9c26c-3018-11e3-87c1-311d1641c437}sofia/gateway/aster/473
&park", 98, 0) = 98
[pid 32635] send(6, "\n\n", 2, 0) = 2
[pid 32635] recv(6, "Content-Type: api/response\nContent-Length: 41\n\n",
65535, 0) = 47
[pid 32635] recv(6, "+OK 67b9c26c-3018-11e3-87c1-311d1641c437\n", 65535, 0)
= 41
After CHANNEL_ANSWER there is a call to "playback"
[pid 32635] send(6, "sendmsg\ncall-command: execute\nexecute-app-name:
playback\nexecute-app-arg:
/usrCC/CC/scenariusze/ScenTest-test/play/POLSKI/EWA//menu.wav\n\n", 137, 0)
= 137
[pid 32635] recv(6, "Content-Type: command/reply\nReply-Text: -ERR invalid
session id []\n\n", 65535, 0) = 68
[pid 32639] recv(6, "Content-Length: 1925\nContent-Type:
text/event-plain\n\n", 65535, 0) = 53
[pid 32639] recv(6, "Event-Name: CHANNEL_CALLSTATE\nCore-UUID:
00fda624-2a7d-11e3-b4b2-311d1641c437\nFreeSWITCH-Hostname:
fs-devel.altar\nFreeSWITCH-Switchname: fs-devel.altar\nFreeSWITCH-IPv4:
192.168.2.44\nFreeSWITCH-IPv6: %3A%3A1\nEvent-Date-Local:
2013-10-08%2014%3A52%3A53\nEvent-Date-GMT:
Tue,%2008%20Oct%202013%2012%3A52%3A53%20GMT\nEvent-Date-Timestamp:
1381236773305888\nEvent-Calling-File:
switch_channel.c\nEvent-Calling-Function:
switch_channel_perform_set_callstate\nEvent-Calling-Line-Number:
242\nEvent-Sequence: 274033\nOriginal-Channel-Call-State:
ACTIVE\nChannel-Call-State-Number: 6\nChannel-State:
CS_EXECUTE\nChannel-Call-State: HANGUP\nChannel-State-Number:
10\nChannel-Name: sofia/external/473\nUnique-ID:
67b9c26c-3018-11e3-87c1-311d1641c437\nCall-Direction:
outbound\nPresence-Call-Direction: outbound\nChannel-HIT-Dialplan:
true\nChannel-Call-UUID:
67b9c26c-3018-11e3-87c1-311d1641c437\nAnswer-State:
hangup\nChannel-Read-Codec-Name: PCMA\nChannel-Read-Codec-Rate:
8000\nChannel-Read-Codec-Bit-Rate: 64000\nChannel-Write-Codec-Name:
PCMA\nChannel-Write-Codec-Rate: 8000\nChannel-Write-Codec-Bit-Rate:
64000\nCaller-Direction: outbound\nCaller-Caller-ID-Name:
Outbound%20Call\nCaller-Caller-ID-Number: 473\nCaller-Network-Addr:
192.168.2.97\nCaller-Destination-Number: 473\nCaller-Unique-ID:
67b9c26c-3018-11e3-87c1-311d1641c437\nCaller-Source:
src/switch_ivr_originate.c\nCaller-Context: default\nCaller-Channel-Name:
sofia/external/473\nCaller-Profile-Index: 1\nCaller-Profile-Created-Time:
1381236712904967\nCaller-Channel-Created-Time:
1381236712904967\nCaller-Channel-Answered-Time:
1381236723045094\nCaller-Channel-Progress-Time:
1381236712904967\nCaller-Channel-Progress-Media-Time:
0\nCaller-Channel-Hangup-Time: 0\nCaller-Channel-Transfer-Time:
0\nCaller-Channel-Resurrect-Time: 0\nCaller-Channel-Bridged-Time:
0\nCaller-Channel-Last-Hold: 0\nCaller-Channel-Hold-Accum:
0\nCaller-Screen-Bit: true\nCaller-Privacy-Hide-Name:
false\nCaller-Privacy-Hide-Number: false\n\n", 65535, 0) = 1925
How can I control the session in the same way as with socket outbound?
2013/10/8 Marcin S <ms4esl at gmail.com>
> Hello,
>
> I wrote simple C application, wich opens connection to esl - freeswitch
> and makes call (originate ... &park). So far so good. I get
> ESL_EVENT_CHANNEL_ORIGINATE, ESL_EVENT_CHANNEL_ANSWER and
> ESL_EVENT_CHANNEL_PARK. Then I wan't to play wav file - but playback
> command returns "-ERR invalid session id []". What is wrong?
>
> Specifying "originate ... &playback" is out of question.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20131008/e1282a25/attachment.html
Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-users
mailing list