BetterVoice / freeswitch-container

This project can be used to deploy a FreeSWITCH server inside a Docker container. The container currently uses the latest stable release version 1.6.x. An effort was made to build many modules so the container can be generic enough to serve many purposes.
https://www.bettervoice.com
238 stars 128 forks source link

No audio during the calls from SoftPhone A -> to -> SoftPhone B #12

Open tharangakothalawala opened 6 years ago

tharangakothalawala commented 6 years ago

I am running a container out of this image with the following port config.

Host Machine IP : 192.168.235.100 Docker Container IP : 172.22.0.2

version: '2.3'
services:
    freeswitch:
        build:
            context: .
            network: host
        image: bettervoice/freeswitch-container:1.6.16
        privileged: true
        restart: always
        ports:
            - "5060:5060/tcp"
            - "5060:5060/udp"
            - "5066:5066/tcp"
            - "5070:5070/udp"
            - "5080:5080/tcp"
            - "5080:5080/udp"
            - "8021:8021/tcp"
            - "7443:7443/tcp"
            - "16384-16394:16384-16394/udp"
        volumes:
            - ./conf:/usr/local/freeswitch/conf

networks:
  default:

And I have connected two(2) SoftPhones into the container and I can place calls from one to another. However there is no audio at all.

I have changed the vars.xml for to put my host machine IP, switch.conf.xml for rtp port ranges, sip_profiles/{internal,external}.xml for ext-{rtp,sip}-ip to use $${external_rtp_ip}. Basically the same changes that you see in the question here : https://github.com/BetterVoice/freeswitch-container/issues/9

freeswitch@localhost> sofia status profile external
=================================================================================================
Name                external
Domain Name         N/A
Auto-NAT            false
DBName              sofia_reg_external
Pres Hosts
Dialplan            XML
Context             public
Challenge Realm     auto_to
RTP-IP              172.22.0.2
Ext-RTP-IP          192.168.235.100
SIP-IP              172.22.0.2
Ext-SIP-IP          192.168.235.100
URL                 sip:mod_sofia@192.168.235.100:5080
BIND-URL            sip:mod_sofia@192.168.235.100:5080;maddr=172.22.0.2;transport=udp,tcp
HOLD-MUSIC          local_stream://moh
OUTBOUND-PROXY      N/A
CODECS IN           OPUS,G722,PCMU,PCMA,VP8
CODECS OUT          OPUS,G722,PCMU,PCMA,VP8
TEL-EVENT           101
DTMF-MODE           rfc2833
CNG                 13
SESSION-TO          0
MAX-DIALOG          0
NOMEDIA             false
LATE-NEG            true
PROXY-MEDIA         false
ZRTP-PASSTHRU       true
AGGRESSIVENAT       false
CALLS-IN            0
FAILED-CALLS-IN     0
CALLS-OUT           0
FAILED-CALLS-OUT    0
REGISTRATIONS       0

You can see that my two(2) softphones are registered into the internal profile as it says REGISTRATIONS 2

freeswitch@localhost> sofia status profile internal
=================================================================================================
Name                internal
Domain Name         N/A
Auto-NAT            false
DBName              sofia_reg_internal
Pres Hosts          172.22.0.2,192.168.235.100
Dialplan            XML
Context             public
Challenge Realm     auto_from
RTP-IP              172.22.0.2
Ext-RTP-IP          192.168.235.100
SIP-IP              172.22.0.2
Ext-SIP-IP          192.168.235.100
URL                 sip:mod_sofia@192.168.235.100:5060
BIND-URL            sip:mod_sofia@192.168.235.100:5060;maddr=172.22.0.2;transport=udp,tcp
WS-BIND-URL         sip:mod_sofia@172.22.0.2:5066;transport=ws
WSS-BIND-URL        sips:mod_sofia@172.22.0.2:7443;transport=wss
HOLD-MUSIC          local_stream://moh
OUTBOUND-PROXY      N/A
CODECS IN           OPUS,G722,PCMU,PCMA,VP8
CODECS OUT          OPUS,G722,PCMU,PCMA,VP8
TEL-EVENT           101
DTMF-MODE           rfc2833
CNG                 13
SESSION-TO          0
MAX-DIALOG          0
NOMEDIA             false
LATE-NEG            true
PROXY-MEDIA         false
ZRTP-PASSTHRU       true
AGGRESSIVENAT       false
CALLS-IN            2
FAILED-CALLS-IN     0
CALLS-OUT           1
FAILED-CALLS-OUT    0
REGISTRATIONS       2

I would really appreciate some help here.

wimh commented 6 years ago

Are your softphones on the same lan or are they behind a firewall?

Here are some things you can try to diagnose what is working and what not;

You might also use tools like wireshark to check which rtp address and port is really used.

tharangakothalawala commented 6 years ago

Thanks for the quick response @wimh

Yes the softphones are on the same LAN / subnet.

When I called 9195 I was not able to hear any audio. Also during this echo test, I couldn't see any RTP stream in wireshark.