amigniter / mod_audio_stream

FreeSWITCH module to stream audio to websocket and receive response
MIT License
75 stars 36 forks source link

Help Needed with Configuring NestJS WebSocket Gateway to Receive Audio Stream from FreeSWITCH #15

Closed PaulCailly closed 6 months ago

PaulCailly commented 10 months ago

Hello,

I am working on integrating a Node.js server using NestJS with a FreeSWITCH server to handle real-time audio streams via WebSockets. I have set up a WebSocket gateway in NestJS and a dialplan in FreeSWITCH that executes a Lua script to start the audio stream. However, I am encountering an issue where the WebSocket connection is established (I can see the "WebSocket connection is open" log on my Node.js server), but I am not receiving any audio data.

Here is the relevant code snippet from my NestJS server:

import {
  SubscribeMessage,
  WebSocketGateway,
  WebSocketServer,
  WsResponse,
} from '@nestjs/websockets';
import { Server } from 'ws';

@WebSocketGateway(8080)
export class EventsGateway {
  @WebSocketServer()
  server: Server;

  handleConnection(client: any) {
    console.log('Websocket connection is open');
  }

  handleDisconnect(client: any) {
    console.log('Websocket connection is closed');
  }

  @SubscribeMessage('message')
  handleMessage(client: any, payload: any): WsResponse<string> {
    console.log(payload);
    return { event: 'message', data: 'payload received' };
  }
}

And here is the dialplan from FreeSWITCH:

<extension name="memoiz.11d" continue="false" uuid="8f70672f-4d69-4c3b-9c68-56333f2cb6d8">
    <condition field="${user_exists}" expression="false"/>
    <condition field="destination_number" expression="^\+?(\d{11})$">
        <action application="export" data="call_direction=outbound" inline="true"/>
        <action application="unset" data="call_timeout"/>
        <action application="set" data="hangup_after_bridge=true"/>
        <action application="set" data="effective_caller_id_name=${outbound_caller_id_name}"/>
        <action application="set" data="effective_caller_id_number=${outbound_caller_id_number}"/>
        <action application="set" data="inherit_codec=true"/>
        <action application="set" data="ignore_display_updates=true"/>
        <action application="set" data="callee_id_number=$1"/>
        <action application="set" data="continue_on_fail=1,2,3,6,18,21,27,28,31,34,38,41,42,44,58,88,111,403,501,602,607,809"/>
        <action application="set" data="rtp_disable_hold=true" />
        <action application="lua" data="start_audio_stream.lua ${uuid}"/>
        <action application="bridge" data="sofia/gateway/4d661f33-425f-43be-a5f3-0abf66ce7e19/+$1"/>

    </condition>
</extension>

The Lua script being executed (start_audio_stream.lua) is as follows:

-- start_audio_stream.lua
local uuid = argv[1] -- Get the UUID from the arguments passed to the script
local wss_url = "wss://memoiz-api-websocket.ngrok.app"
local mix_type = "mono" -- or "mixed" or "stereo"
local sampling_rate = "8k" -- or "16k"

-- Start the audio stream
api = freeswitch.API()
api:execute("uuid_audio_stream", string.format("%s start %s %s %s", uuid, wss_url, mix_type, sampling_rate))

I am looking for guidance on how to properly configure the WebSocket module in NestJS to handle the incoming audio stream from FreeSWITCH. Any insights or suggestions would be greatly appreciated.

Additionally, here is the log output from FreeSWITCH:

c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:09:11.247662 95.53% [DEBUG] switch_core_state_machine.c:745 (sofia/internal/101@pbx.memoiz.xyz) State DESTROY going to sleep
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:09:11.247662 95.53% [DEBUG] switch_core_state_machine.c:175 sofia/internal/101@pbx.memoiz.xyz Standard DESTROY
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:09:11.247662 95.53% [DEBUG] mod_sofia.c:380 sofia/internal/101@pbx.memoiz.xyz SOFIA DESTROY
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:09:11.247662 95.53% [DEBUG] switch_core_state_machine.c:745 (sofia/internal/101@pbx.memoiz.xyz) State DESTROY
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:09:11.247662 95.53% [DEBUG] switch_core_state_machine.c:735 (sofia/internal/101@pbx.memoiz.xyz) Running State Change CS_DESTROY (Cur 0 Tot 50)
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:09:11.247662 95.53% [NOTICE] switch_core_session.c:1766 Close Channel sofia/internal/101@pbx.memoiz.xyz [CS_DESTROY]
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:09:11.247662 95.53% [NOTICE] switch_core_session.c:1762 Session 49 (sofia/internal/101@pbx.memoiz.xyz) Ended
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:09:11.247662 95.53% [DEBUG] switch_core_session.c:1744 Session 49 (sofia/internal/101@pbx.memoiz.xyz) Locked, Waiting on external entities
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:09:11.247662 95.53% [DEBUG] switch_core_state_machine.c:607 (sofia/internal/101@pbx.memoiz.xyz) State Change CS_REPORTING -> CS_DESTROY
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:09:11.247662 95.53% [DEBUG] switch_core_state_machine.c:932 (sofia/internal/101@pbx.memoiz.xyz) State REPORTING going to sleep
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:09:11.247662 95.53% [DEBUG] switch_core_state_machine.c:168 sofia/internal/101@pbx.memoiz.xyz Standard REPORTING, cause: NORMAL_CLEARING
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:09:11.247662 95.53% [DEBUG] switch_core_state_machine.c:932 (sofia/internal/101@pbx.memoiz.xyz) State REPORTING
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:09:11.247662 95.53% [DEBUG] switch_core_state_machine.c:581 (sofia/internal/101@pbx.memoiz.xyz) Running State Change CS_REPORTING (Cur 1 Tot 50)
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:09:11.247662 95.53% [DEBUG] switch_core_state_machine.c:616 (sofia/internal/101@pbx.memoiz.xyz) State Change CS_HANGUP -> CS_REPORTING
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:09:11.247662 95.53% [DEBUG] switch_core_state_machine.c:846 (sofia/internal/101@pbx.memoiz.xyz) State HANGUP going to sleep
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:09:11.247662 95.53% [DEBUG] switch_core_state_machine.c:59 sofia/internal/101@pbx.memoiz.xyz Standard HANGUP, cause: NORMAL_CLEARING
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:09:11.247662 95.53% [DEBUG] mod_sofia.c:523 Sending BYE to sofia/internal/101@pbx.memoiz.xyz
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:09:11.247662 95.53% [DEBUG] mod_sofia.c:469 Channel sofia/internal/101@pbx.memoiz.xyz hanging up, cause: NORMAL_CLEARING
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:09:11.247662 95.53% [DEBUG] mod_sofia.c:463 sofia/internal/101@pbx.memoiz.xyz Overriding SIP cause 480 with 200 from the other leg
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:09:11.247662 95.53% [DEBUG] switch_core_state_machine.c:846 (sofia/internal/101@pbx.memoiz.xyz) State HANGUP
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:09:11.247662 95.53% [DEBUG] switch_core_state_machine.c:844 (sofia/internal/101@pbx.memoiz.xyz) Callstate Change ACTIVE -> HANGUP
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:09:11.247662 95.53% [DEBUG] switch_core_media_bug.c:1326 Removing BUG from sofia/internal/101@pbx.memoiz.xyz
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:09:11.247662 95.53% [INFO] audio_streamer_glue.cpp:628 (c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec) stream_session_cleanup: connection closed
2023-12-24 17:09:11.247662 95.53% [DEBUG] audio_streamer_glue.cpp:143 disconnecting...
2023-12-24 17:09:11.247662 95.53% [INFO] audio_streamer_glue.cpp:265 c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec destroy_tech_pvt
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:09:11.247662 95.53% [DEBUG] audio_streamer_glue.cpp:613 (c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec) stream_session_cleanup
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:09:11.247662 95.53% [INFO] mod_audio_stream.c:32 Got SWITCH_ABC_TYPE_CLOSE.
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:09:11.247662 95.53% [DEBUG] switch_core_media_bug.c:1326 Removing BUG from sofia/internal/101@pbx.memoiz.xyz
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:09:11.247662 95.53% [DEBUG] switch_ivr_async.c:1678 Channel is hung up
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:09:11.247662 95.53% [DEBUG] switch_ivr_async.c:1597 Stop recording file /var/lib/freeswitch/recordings/pbx.memoiz.xyz/archive/2023/Dec/24/c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec.wav
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:11.247662 95.53% [DEBUG] switch_core_state_machine.c:745 (sofia/external/+33621122955) State DESTROY going to sleep
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:11.247662 95.53% [DEBUG] switch_core_state_machine.c:175 sofia/external/+33621122955 Standard DESTROY
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:11.247662 95.53% [DEBUG] mod_sofia.c:380 sofia/external/+33621122955 SOFIA DESTROY
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:11.247662 95.53% [DEBUG] switch_core_state_machine.c:745 (sofia/external/+33621122955) State DESTROY
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:09:11.247662 95.53% [DEBUG] switch_core_state_machine.c:581 (sofia/internal/101@pbx.memoiz.xyz) Running State Change CS_HANGUP (Cur 1 Tot 50)
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:09:11.247662 95.53% [DEBUG] switch_core_state_machine.c:647 (sofia/internal/101@pbx.memoiz.xyz) State EXECUTE going to sleep
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:09:11.247662 95.53% [DEBUG] switch_core_session.c:2979 sofia/internal/101@pbx.memoiz.xyz skip receive message [APPLICATION_EXEC_COMPLETE] (channel is hungup already)
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:11.247662 95.53% [DEBUG] switch_core_state_machine.c:735 (sofia/external/+33621122955) Running State Change CS_DESTROY (Cur 1 Tot 50)
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:11.247662 95.53% [NOTICE] switch_core_session.c:1766 Close Channel sofia/external/+33621122955 [CS_DESTROY]
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:11.247662 95.53% [NOTICE] switch_core_session.c:1762 Session 50 (sofia/external/+33621122955) Ended
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:11.247662 95.53% [DEBUG] switch_core_session.c:1744 Session 50 (sofia/external/+33621122955) Locked, Waiting on external entities
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:11.247662 95.53% [DEBUG] switch_core_state_machine.c:607 (sofia/external/+33621122955) State Change CS_REPORTING -> CS_DESTROY
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:11.247662 95.53% [DEBUG] switch_core_state_machine.c:932 (sofia/external/+33621122955) State REPORTING going to sleep
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:11.247662 95.53% [DEBUG] switch_core_state_machine.c:168 sofia/external/+33621122955 Standard REPORTING, cause: NORMAL_CLEARING
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:11.247662 95.53% [DEBUG] switch_core_state_machine.c:932 (sofia/external/+33621122955) State REPORTING
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:09:11.247662 95.53% [NOTICE] switch_ivr_bridge.c:1942 Hangup sofia/internal/101@pbx.memoiz.xyz [CS_EXECUTE] [NORMAL_CLEARING]
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:11.247662 95.53% [DEBUG] switch_ivr_bridge.c:1890 sofia/external/+33621122955 skip receive message [UNBRIDGE] (channel is hungup already)
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:11.247662 95.53% [DEBUG] switch_core_state_machine.c:581 (sofia/external/+33621122955) Running State Change CS_REPORTING (Cur 2 Tot 50)
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:11.247662 95.53% [DEBUG] switch_core_state_machine.c:616 (sofia/external/+33621122955) State Change CS_HANGUP -> CS_REPORTING
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:11.247662 95.53% [DEBUG] switch_core_state_machine.c:846 (sofia/external/+33621122955) State HANGUP going to sleep
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:11.247662 95.53% [DEBUG] switch_core_state_machine.c:59 sofia/external/+33621122955 Standard HANGUP, cause: NORMAL_CLEARING
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:09:11.247662 95.53% [DEBUG] switch_ivr_bridge.c:911 BRIDGE THREAD DONE [sofia/internal/101@pbx.memoiz.xyz]
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:09:11.247662 95.53% [DEBUG] switch_ivr_bridge.c:819 sofia/external/+33621122955 ending bridge by request from write function
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:11.247662 95.53% [DEBUG] mod_sofia.c:469 Channel sofia/external/+33621122955 hanging up, cause: NORMAL_CLEARING
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:11.247662 95.53% [DEBUG] switch_core_state_machine.c:846 (sofia/external/+33621122955) State HANGUP
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:11.247662 95.53% [DEBUG] switch_core_state_machine.c:844 (sofia/external/+33621122955) Callstate Change ACTIVE -> HANGUP
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:11.247662 95.53% [DEBUG] switch_core_state_machine.c:581 (sofia/external/+33621122955) Running State Change CS_HANGUP (Cur 2 Tot 50)
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:11.247662 95.53% [DEBUG] switch_core_state_machine.c:650 (sofia/external/+33621122955) State EXCHANGE_MEDIA going to sleep
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:11.247662 95.53% [DEBUG] switch_ivr_bridge.c:911 BRIDGE THREAD DONE [sofia/external/+33621122955]
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:11.247662 95.53% [NOTICE] sofia.c:1065 Hangup sofia/external/+33621122955 [CS_EXCHANGE_MEDIA] [NORMAL_CLEARING]
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:09:07.207658 97.10% [DEBUG] sofia.c:7493 Channel sofia/internal/101@pbx.memoiz.xyz entering state [ready][200]
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:09:07.147655 97.10% [DEBUG] switch_rtp.c:7503 Correct audio ip/port confirmed.
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:07.147655 97.10% [DEBUG] switch_rtp.c:7503 Correct audio ip/port confirmed.
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:09:07.107661 97.10% [DEBUG] switch_ivr_async.c:1778 No silence detection configured; assuming start of speech
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:09:07.087671 97.10% [DEBUG] sofia.c:7493 Channel sofia/internal/101@pbx.memoiz.xyz entering state [completed][200]
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:09:07.087671 97.10% [DEBUG] switch_channel.c:3912 (sofia/internal/101@pbx.memoiz.xyz) Callstate Change EARLY -> ACTIVE
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:09:07.087671 97.10% [NOTICE] switch_ivr_bridge.c:730 Channel [sofia/internal/101@pbx.memoiz.xyz] has been answered
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec a=rtcp:29860 IN IP4 34.155.213.217
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec a=rtcp-mux
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec a=sendrecv
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec a=ptime:20
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec a=fmtp:101 0-15
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec a=rtpmap:101 telephone-event/8000
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec a=rtpmap:9 G722/8000
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec m=audio 29860 RTP/AVP 9 101
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec t=0 0
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec c=IN IP4 34.155.213.217
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec s=FreeSWITCH
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec o=FreeSWITCH 1703407878 1703407880 IN IP4 34.155.213.217
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec v=0
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:09:07.087671 97.10% [DEBUG] mod_sofia.c:914 Local SDP sofia/internal/101@pbx.memoiz.xyz:
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:09:07.087671 97.10% [DEBUG] switch_core_media.c:8641 Audio params are unchanged for sofia/internal/101@pbx.memoiz.xyz.
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:07.087671 97.10% [DEBUG] switch_channel.c:3912 (sofia/external/+33621122955) Callstate Change EARLY -> ACTIVE
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:07.087671 97.10% [NOTICE] sofia.c:8622 Channel [sofia/external/+33621122955] has been answered
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:07.087671 97.10% [DEBUG] sofia.c:7493 Channel sofia/external/+33621122955 entering state [ready][200]
1947dd22-d9ed-422c-87c3-34aa6acf4c56
1947dd22-d9ed-422c-87c3-34aa6acf4c56 a=maxptime:150
1947dd22-d9ed-422c-87c3-34aa6acf4c56 a=ptime:20
1947dd22-d9ed-422c-87c3-34aa6acf4c56 a=fmtp:101 0-16
1947dd22-d9ed-422c-87c3-34aa6acf4c56 a=rtpmap:101 telephone-event/8000
1947dd22-d9ed-422c-87c3-34aa6acf4c56 a=rtpmap:8 PCMA/8000
1947dd22-d9ed-422c-87c3-34aa6acf4c56 a=rtpmap:0 PCMU/8000
1947dd22-d9ed-422c-87c3-34aa6acf4c56 m=audio 15278 RTP/AVP 0 8 101
1947dd22-d9ed-422c-87c3-34aa6acf4c56 t=0 0
1947dd22-d9ed-422c-87c3-34aa6acf4c56 c=IN IP4 3.122.181.91
1947dd22-d9ed-422c-87c3-34aa6acf4c56 s=Twilio Media Gateway
1947dd22-d9ed-422c-87c3-34aa6acf4c56 o=root 1481876180 1481876180 IN IP4 172.21.22.94
1947dd22-d9ed-422c-87c3-34aa6acf4c56 v=0
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:07.067675 97.10% [DEBUG] sofia.c:7500 Duplicate SDP
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:07.067675 97.10% [DEBUG] sofia.c:7493 Channel sofia/external/+33621122955 entering state [completing][200]
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:02.327678 98.50% [DEBUG] switch_rtp.c:7503 Correct audio ip/port confirmed.
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:02.087649 98.50% [NOTICE] switch_core_media.c:15991 Activating write resampler
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:09:02.027680 98.50% [NOTICE] switch_core_media.c:15991 Activating write resampler
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:02.027680 98.50% [DEBUG] mod_sofia.c:672 SOFIA EXCHANGE_MEDIA
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:02.027680 98.50% [DEBUG] switch_core_state_machine.c:650 (sofia/external/+33621122955) State EXCHANGE_MEDIA
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:02.027680 98.50% [DEBUG] switch_core_state_machine.c:581 (sofia/external/+33621122955) Running State Change CS_EXCHANGE_MEDIA (Cur 2 Tot 50)
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:02.027680 98.50% [DEBUG] switch_ivr_bridge.c:1791 (sofia/external/+33621122955) State Change CS_CONSUME_MEDIA -> CS_EXCHANGE_MEDIA
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:09:02.027680 98.50% [DEBUG] switch_ivr_originate.c:3909 Originate Resulted in Success: [sofia/external/+33621122955] Peer UUID: 1947dd22-d9ed-422c-87c3-34aa6acf4c56
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:02.027680 98.50% [DEBUG] switch_core_media.c:9002 sofia/external/+33621122955 Set rtp dtmf delay to 40
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:02.027680 98.50% [DEBUG] switch_core_media.c:8979 sofia/external/+33621122955 Set 2833 dtmf receive payload to 101
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:02.027680 98.50% [DEBUG] switch_core_media.c:8972 sofia/external/+33621122955 Set 2833 dtmf send payload to 101
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:02.027680 98.50% [DEBUG] switch_rtp.c:4373 Starting timer [soft] 160 bytes per 20ms
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:02.027680 98.50% [DEBUG] switch_core_media.c:8659 AUDIO RTP [sofia/external/+33621122955] 10.200.0.3 port 31078 -> 3.122.181.91 port 15278 codec: 0 ms: 20
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:02.027680 98.50% [DEBUG] switch_core_media.c:5856 sofia/external/+33621122955 Set 2833 dtmf send payload to 101 recv payload to 101
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:02.027680 98.50% [DEBUG] switch_core_media.c:5798 Set telephone-event payload to 101@8000
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:02.027680 98.50% [DEBUG] switch_core_codec.c:111 sofia/external/+33621122955 Original read codec set to PCMU:0
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:02.027680 98.50% [DEBUG] switch_core_media.c:3734 Set Codec sofia/external/+33621122955 PCMU/8000 20 ms 160 samples 64000 bits 1 channels
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:02.027680 98.50% [DEBUG] switch_core_media.c:5438 Set telephone-event payload to 101@8000
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:02.027680 98.50% [DEBUG] switch_core_media.c:5588 Audio Codec Compare [PCMA:8:8000:20:64000:1] ++++ is saved as a match
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:02.027680 98.50% [DEBUG] switch_core_media.c:5526 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[PCMA:8:8000:20:64000:1]
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:02.027680 98.50% [DEBUG] switch_core_media.c:5526 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[PCMU:0:8000:20:64000:1]
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:02.027680 98.50% [DEBUG] switch_core_media.c:5526 Audio Codec Compare [PCMA:8:8000:20:64000:1]/[G722:9:8000:20:64000:1]
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:02.027680 98.50% [DEBUG] switch_core_media.c:5526 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[PCMA:8:8000:20:64000:1]
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:02.027680 98.50% [DEBUG] switch_core_media.c:5588 Audio Codec Compare [PCMU:0:8000:20:64000:1] ++++ is saved as a match
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:02.027680 98.50% [DEBUG] switch_core_media.c:5526 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[PCMU:0:8000:20:64000:1]
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:02.027680 98.50% [DEBUG] switch_core_media.c:5526 Audio Codec Compare [PCMU:0:8000:20:64000:1]/[G722:9:8000:20:64000:1]
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:02.027680 98.50% [DEBUG] switch_channel.c:3585 (sofia/external/+33621122955) Callstate Change DOWN -> EARLY
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:02.027680 98.50% [NOTICE] sofia.c:7506 Pre-Answer sofia/external/+33621122955!
1947dd22-d9ed-422c-87c3-34aa6acf4c56
1947dd22-d9ed-422c-87c3-34aa6acf4c56 a=maxptime:150
1947dd22-d9ed-422c-87c3-34aa6acf4c56 a=ptime:20
1947dd22-d9ed-422c-87c3-34aa6acf4c56 a=fmtp:101 0-16
1947dd22-d9ed-422c-87c3-34aa6acf4c56 a=rtpmap:101 telephone-event/8000
1947dd22-d9ed-422c-87c3-34aa6acf4c56 a=rtpmap:8 PCMA/8000
1947dd22-d9ed-422c-87c3-34aa6acf4c56 a=rtpmap:0 PCMU/8000
1947dd22-d9ed-422c-87c3-34aa6acf4c56 m=audio 15278 RTP/AVP 0 8 101
1947dd22-d9ed-422c-87c3-34aa6acf4c56 t=0 0
1947dd22-d9ed-422c-87c3-34aa6acf4c56 c=IN IP4 3.122.181.91
1947dd22-d9ed-422c-87c3-34aa6acf4c56 s=Twilio Media Gateway
1947dd22-d9ed-422c-87c3-34aa6acf4c56 o=root 1481876180 1481876180 IN IP4 172.21.22.94
1947dd22-d9ed-422c-87c3-34aa6acf4c56 v=0
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:02.027680 98.50% [DEBUG] sofia.c:7503 Remote SDP:
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:09:02.027680 98.50% [DEBUG] sofia.c:7493 Channel sofia/external/+33621122955 entering state [proceeding][183]
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:08:58.867676 98.80% [DEBUG] switch_rtp.c:1774 rtcp_stats_init: audio ssrc[4251773453] base_seq[62292]
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:08:58.827666 98.80% [DEBUG] switch_core_io.c:448 Setting BUG Codec G722:9
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:08:58.827666 98.80% [DEBUG] switch_rtp.c:7503 Correct audio ip/port confirmed.
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:08:58.607644 99.07% [DEBUG] switch_core_state_machine.c:659 (sofia/external/+33621122955) State CONSUME_MEDIA going to sleep
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:08:58.607644 99.07% [DEBUG] switch_core_state_machine.c:659 (sofia/external/+33621122955) State CONSUME_MEDIA
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:08:58.607644 99.07% [DEBUG] switch_core_state_machine.c:581 (sofia/external/+33621122955) Running State Change CS_CONSUME_MEDIA (Cur 2 Tot 50)
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:08:58.607644 99.07% [DEBUG] switch_core_state_machine.c:640 (sofia/external/+33621122955) State ROUTING going to sleep
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:08:58.607644 99.07% [DEBUG] switch_ivr_originate.c:67 (sofia/external/+33621122955) State Change CS_ROUTING -> CS_CONSUME_MEDIA
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:08:58.607644 99.07% [DEBUG] mod_sofia.c:158 sofia/external/+33621122955 SOFIA ROUTING
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:08:58.607644 99.07% [DEBUG] switch_core_state_machine.c:640 (sofia/external/+33621122955) State ROUTING
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:08:58.607644 99.07% [DEBUG] sofia.c:7493 Channel sofia/external/+33621122955 entering state [calling][0]
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:08:58.607644 99.07% [DEBUG] switch_core_state_machine.c:581 (sofia/external/+33621122955) Running State Change CS_ROUTING (Cur 2 Tot 50)
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:08:58.607644 99.07% [DEBUG] switch_core_state_machine.c:624 (sofia/external/+33621122955) State INIT going to sleep
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:08:58.607644 99.07% [DEBUG] switch_core_state_machine.c:48 (sofia/external/+33621122955) State Change CS_INIT -> CS_ROUTING
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:08:58.607644 99.07% [DEBUG] switch_core_state_machine.c:40 sofia/external/+33621122955 Standard INIT
1947dd22-d9ed-422c-87c3-34aa6acf4c56
1947dd22-d9ed-422c-87c3-34aa6acf4c56 a=sendrecv
1947dd22-d9ed-422c-87c3-34aa6acf4c56 a=ptime:20
1947dd22-d9ed-422c-87c3-34aa6acf4c56 a=silenceSupp:off - - - -
1947dd22-d9ed-422c-87c3-34aa6acf4c56 a=fmtp:101 0-15
1947dd22-d9ed-422c-87c3-34aa6acf4c56 a=rtpmap:101 telephone-event/8000
1947dd22-d9ed-422c-87c3-34aa6acf4c56 a=rtpmap:8 PCMA/8000
1947dd22-d9ed-422c-87c3-34aa6acf4c56 a=rtpmap:0 PCMU/8000
1947dd22-d9ed-422c-87c3-34aa6acf4c56 a=rtpmap:9 G722/8000
1947dd22-d9ed-422c-87c3-34aa6acf4c56 m=audio 31078 RTP/AVP 9 0 8 101
1947dd22-d9ed-422c-87c3-34aa6acf4c56 t=0 0
1947dd22-d9ed-422c-87c3-34aa6acf4c56 c=IN IP4 34.155.213.217
1947dd22-d9ed-422c-87c3-34aa6acf4c56 s=FreeSWITCH
1947dd22-d9ed-422c-87c3-34aa6acf4c56 o=FreeSWITCH 1703406660 1703406661 IN IP4 34.155.213.217
1947dd22-d9ed-422c-87c3-34aa6acf4c56 v=0
1947dd22-d9ed-422c-87c3-34aa6acf4c56 Local SDP:
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:08:58.607644 99.07% [DEBUG] sofia_glue.c:1662 sofia/external/+33621122955 sending invite version: 1.10.10 -release 64bit
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:08:58.607644 99.07% [INFO] sofia_glue.c:1659 sofia/external/+33621122955 sending invite call-id: (null)
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:08:58.607644 99.07% [DEBUG] mod_sofia.c:97 sofia/external/+33621122955 SOFIA INIT
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:08:58.607644 99.07% [DEBUG] switch_core_state_machine.c:624 (sofia/external/+33621122955) State INIT
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:08:58.607644 99.07% [DEBUG] switch_core_state_machine.c:581 (sofia/external/+33621122955) Running State Change CS_INIT (Cur 2 Tot 50)
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:08:58.607644 99.07% [DEBUG] mod_sofia.c:5110 (sofia/external/+33621122955) State Change CS_NEW -> CS_INIT
1947dd22-d9ed-422c-87c3-34aa6acf4c56 2023-12-24 17:08:58.607644 99.07% [NOTICE] switch_channel.c:1142 New Channel sofia/external/+33621122955 [1947dd22-d9ed-422c-87c3-34aa6acf4c56]
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:08:58.607644 99.07% [DEBUG] switch_ivr_originate.c:2297 Parsing global variables
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:08:58.607644 99.07% [DEBUG] switch_channel.c:1288 sofia/internal/101@pbx.memoiz.xyz EXPORTING[export_vars] [origination_callee_id_name]=[33621122955] to event
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:08:58.607644 99.07% [DEBUG] switch_channel.c:1288 sofia/internal/101@pbx.memoiz.xyz EXPORTING[export_vars] [call_direction]=[outbound] to event
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:08:58.607644 99.07% [DEBUG] switch_channel.c:1288 sofia/internal/101@pbx.memoiz.xyz EXPORTING[export_vars] [call_direction]=[outbound] to event
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:08:58.607644 99.07% [DEBUG] switch_channel.c:1288 sofia/internal/101@pbx.memoiz.xyz EXPORTING[export_vars] [domain_uuid]=[d420e5d2-4f33-4f12-9714-3a0f0318ae00] to event
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:08:58.607644 99.07% [DEBUG] switch_channel.c:1288 sofia/internal/101@pbx.memoiz.xyz EXPORTING[export_vars] [domain_name]=[pbx.memoiz.xyz] to event
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec EXECUTE [depth=0] sofia/internal/101@pbx.memoiz.xyz bridge(sofia/gateway/4d661f33-425f-43be-a5f3-0abf66ce7e19/+33621122955)
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:08:58.607644 99.07% [DEBUG] switch_cpp.cpp:1209 sofia/internal/101@pbx.memoiz.xyz destroy/unlink session from object
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:08:58.607644 99.07% [DEBUG] mod_audio_stream.c:88 exiting start_capture.
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:08:58.607644 99.07% [DEBUG] mod_audio_stream.c:85 setting bug private data.
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:08:58.607644 99.07% [DEBUG] switch_core_media_bug.c:976 Attaching BUG to sofia/internal/101@pbx.memoiz.xyz
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:08:58.607644 99.07% [DEBUG] mod_audio_stream.c:81 adding bug.
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:08:58.607644 99.07% [DEBUG] audio_streamer_glue.cpp:259 (c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec) stream_data_init
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:08:58.607644 99.07% [DEBUG] audio_streamer_glue.cpp:248 (c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec) resampling from 16000 to 8000
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:08:58.607644 99.07% [DEBUG] audio_streamer_glue.cpp:236 c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec: initializing buffer(320) to adjusted 512 bytes
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:08:58.607644 99.07% [DEBUG] mod_audio_stream.c:75 calling stream_session_init.
2023-12-24 17:08:58.607644 99.07% [DEBUG] mod_audio_stream.c:144 mod_audio_stream cmd: c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec start wss://memoiz-api-websocket.ngrok.app mono 8k
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec EXECUTE [depth=0] sofia/internal/101@pbx.memoiz.xyz lua(start_audio_stream.lua c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec)
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:08:58.607644 99.07% [DEBUG] mod_dptools.c:1671 SET sofia/internal/101@pbx.memoiz.xyz [rtp_disable_hold]=[true]
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec EXECUTE [depth=0] sofia/internal/101@pbx.memoiz.xyz set(rtp_disable_hold=true)
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:08:58.587645 99.07% [DEBUG] mod_dptools.c:1671 SET sofia/internal/101@pbx.memoiz.xyz [continue_on_fail]=[1,2,3,6,18,21,27,28,31,34,38,41,42,44,58,88,111,403,501,602,607,809]
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec EXECUTE [depth=0] sofia/internal/101@pbx.memoiz.xyz set(continue_on_fail=1,2,3,6,18,21,27,28,31,34,38,41,42,44,58,88,111,403,501,602,607,809)
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:08:58.587645 99.07% [DEBUG] mod_dptools.c:1671 SET sofia/internal/101@pbx.memoiz.xyz [callee_id_number]=[33621122955]
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec EXECUTE [depth=0] sofia/internal/101@pbx.memoiz.xyz set(callee_id_number=33621122955)
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:08:58.587645 99.07% [DEBUG] mod_dptools.c:1671 SET sofia/internal/101@pbx.memoiz.xyz [ignore_display_updates]=[true]
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec EXECUTE [depth=0] sofia/internal/101@pbx.memoiz.xyz set(ignore_display_updates=true)
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:08:58.587645 99.07% [DEBUG] mod_dptools.c:1671 SET sofia/internal/101@pbx.memoiz.xyz [inherit_codec]=[true]
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec EXECUTE [depth=0] sofia/internal/101@pbx.memoiz.xyz set(inherit_codec=true)
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:08:58.587645 99.07% [DEBUG] mod_dptools.c:1671 SET sofia/internal/101@pbx.memoiz.xyz [effective_caller_id_number]=[+19284332786]
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec EXECUTE [depth=0] sofia/internal/101@pbx.memoiz.xyz set(effective_caller_id_number=+19284332786)
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:08:58.587645 99.07% [DEBUG] mod_dptools.c:1671 SET sofia/internal/101@pbx.memoiz.xyz [effective_caller_id_name]=[Paul]
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec EXECUTE [depth=0] sofia/internal/101@pbx.memoiz.xyz set(effective_caller_id_name=Paul)
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:08:58.587645 99.07% [DEBUG] mod_dptools.c:1671 SET sofia/internal/101@pbx.memoiz.xyz [hangup_after_bridge]=[true]
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec EXECUTE [depth=0] sofia/internal/101@pbx.memoiz.xyz set(hangup_after_bridge=true)
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:08:58.587645 99.07% [DEBUG] mod_dptools.c:1816 UNSET [call_timeout]
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec EXECUTE [depth=0] sofia/internal/101@pbx.memoiz.xyz unset(call_timeout)
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec EXECUTE [depth=0] sofia/internal/101@pbx.memoiz.xyz hash(insert/pbx.memoiz.xyz-last_dial/101/33621122955)
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:08:58.587645 99.07% [DEBUG] switch_core_media_bug.c:976 Attaching BUG to sofia/internal/101@pbx.memoiz.xyz
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:08:58.587645 99.07% [DEBUG] switch_ivr_async.c:1504 Record session sample rate: 16000 -> 16000
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:08:58.587645 99.07% [DEBUG] sofia.c:7493 Channel sofia/internal/101@pbx.memoiz.xyz entering state [early][183]
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec EXECUTE [depth=0] sofia/internal/101@pbx.memoiz.xyz record_session(/var/lib/freeswitch/recordings/pbx.memoiz.xyz/archive/2023/Dec/24/c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec.wav)
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec a=rtcp:29860 IN IP4 34.155.213.217
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec a=rtcp-mux
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec a=sendrecv
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec a=ptime:20
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec a=fmtp:101 0-15
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec a=rtpmap:101 telephone-event/8000
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec a=rtpmap:9 G722/8000
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec m=audio 29860 RTP/AVP 9 101
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec t=0 0
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec c=IN IP4 34.155.213.217
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec s=FreeSWITCH
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec o=FreeSWITCH 1703407878 1703407879 IN IP4 34.155.213.217
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec v=0
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:08:58.587645 99.07% [DEBUG] mod_sofia.c:2607 Ring SDP:
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:08:58.587645 99.07% [DEBUG] switch_core_media.c:8641 Audio params are unchanged for sofia/internal/101@pbx.memoiz.xyz.
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:08:58.587645 99.07% [DEBUG] switch_channel.c:3585 (sofia/internal/101@pbx.memoiz.xyz) Callstate Change RINGING -> EARLY
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:08:58.587645 99.07% [NOTICE] sofia_media.c:90 Pre-Answer sofia/internal/101@pbx.memoiz.xyz!
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:08:58.587645 99.07% [DEBUG] switch_core_media.c:9002 sofia/internal/101@pbx.memoiz.xyz Set rtp dtmf delay to 40
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:08:58.587645 99.07% [DEBUG] switch_core_media.c:8979 sofia/internal/101@pbx.memoiz.xyz Set 2833 dtmf receive payload to 101
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:08:58.587645 99.07% [DEBUG] switch_core_media.c:8972 sofia/internal/101@pbx.memoiz.xyz Set 2833 dtmf send payload to 101
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:08:58.587645 99.07% [DEBUG] switch_rtp.c:4705 RTCP send rate is: 1000 and packet rate is: 20000 Remote Port: 56214
c4d21cf2-f074-4ec8-a8b0-686ce4a9b6ec 2023-12-24 17:08:58.587645 99.07% [DEBUG] switch_core_media.c:8880 Activating RTCP PORT 56214
8b0-686ce4a9b6ec 2023-12-24 17:08:58.587645 99.07% [DEBUG] switch_rtp.c:4373 Starting timer [soft] 160 bytes per 20ms

Thank you for your time and assistance.

amigniter commented 10 months ago

@PaulCailly Sorry for not responding sooner, I had minor health issues. If you'd want you can drop me an email so we can try solving the case. You can post the solution here for the others if its helpful. BR!

PaulCailly commented 9 months ago

I hope you're feeling better now. We've explored an alternative solution for the WebSocket and FreeSWITCH integration issue we discussed. However, I'm open to revisiting this with you at a later time to potentially refine our approach.

amigniter commented 9 months ago

Are you having the same issue with an alternative solution in your use case?

PaulCailly commented 9 months ago

We are now using Jambonz (same author as drachtio modules) as a cloud solution and it fits our needs for now.

amigniter commented 9 months ago

Nice, so it's working for you. Glad you worked it out. I don't think (with mod_audio_stream) that the issue is module related. You start the streaming in pre-processing stage, before bridging the channel. At that stage channel has no media so nothing to stream, attached media bug receives closing event (no media on the channel) and it is disconnecting.