Hello-world.ulaw No Sound on a fresh installation

Below is the series of commands I have used to do a fresh installation of asterisk. It is installed on a remote server.

mkdir Downloads/asterisk
cd Downloads/asterisk
ASTERISK_VERSION=16.12.0
curl -vsL http://downloads.asterisk.org/pub/telephony/asterisk/releases/asterisk-${ASTERISK_VERSION}.tar.gz |  tar --strip-components 1 -xz

 ./contrib/scripts/install_prereq install
sudo apt install build-essential libedit-dev uuid-dev libxml2-dev sqlite libsqlite3-dev
./configure --with-resample --with-jansson-bundled --with-pjproject-bundled --with-externals-cache=/tmp 

# disable BUILD_NATIVE to avoid platform issues
menuselect/menuselect --disable BUILD_NATIVE menuselect.makeopts
  
# enable good things
menuselect/menuselect --enable BETTER_BACKTRACES menuselect.makeopts
menuselect/menuselect --enable codec_opus menuselect.makeopts
  
# download more sounds 
for i in CORE-SOUNDS-EN MOH-OPSOUND EXTRA-SOUNDS-EN; do
    for j in ULAW ALAW G722 GSM SLN16; do
        menuselect/menuselect --enable $i-$j menuselect.makeopts
    done
done

make distclean
make -j 2 all
sudo make install

sudo make samples
make config
make install-logrotate

Then I have both of my extenstions.conf and pjsip.conf as in the https://wiki.asterisk.org/wiki/display/AST/Hello+World guide

[from-internal]
exten = 100,1,Answer()
same = n,Wait(1)
same = n,Playback(hello-world)
same = n,Hangup()
[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0

[6001]
type=endpoint
context=from-internal
disallow=all
allow=ulaw
auth=6001
aors=6001

[6001]
type=auth
auth_type=userpass
password=unsecurepassword
username=6001

[6001]
type=aor
max_contacts=1

The asterisk is started with asterisk -cvvvvv

Asterisk Ready.
*CLI>     -- Removed contact 'sip:6001@172.16.5.250:38130;transport=UDP;rinstance=708cb424c1638d74' from AOR '6001' due to expiration
  == Contact 6001/sip:6001@172.16.5.250:38130;transport=UDP;rinstance=708cb424c1638d74 has been deleted
  == Endpoint 6001 is now Unreachable
    -- Added contact 'sip:6001@172.20.5.9:46591;transport=UDP;rinstance=9acd134d2cf56fcf' to AOR '6001' with expiration of 60 seconds
  == Endpoint 6001 is now Reachable
    -- Removed contact 'sip:6001@172.20.5.9:46591;transport=UDP;rinstance=9acd134d2cf56fcf' from AOR '6001' due to request
  == Contact 6001/sip:6001@172.20.5.9:46591;transport=UDP;rinstance=9acd134d2cf56fcf has been deleted
  == Endpoint 6001 is now Unreachable
    -- Added contact 'sip:6001@172.16.5.250:46087;transport=UDP;rinstance=ffda14a8c7285f6e' to AOR '6001' with expiration of 60 seconds
  == Endpoint 6001 is now Reachable

On my local machine, upon closing and opening Zoiper5 softphone, the above logs appear.

Dialing the 100 extension,

  == Setting global variable 'SIPDOMAIN' to 'xx.xx.xx.xx'
    -- Executing [100@from-internal:1] Answer("PJSIP/6001-00000000", "") in new stack
       > 0x7fb4f0021d20 -- Strict RTP learning after remote address set to: xx.xx.xx.xx:8000
       > 0x7fb4f0021d20 -- Strict RTP qualifying stream type: audio
       > 0x7fb4f0021d20 -- Strict RTP switching source address to xx.xx.xx.250:21673
    -- Executing [100@from-internal:2] Wait("PJSIP/6001-00000000", "1") in new stack
    -- Executing [100@from-internal:3] Playback("PJSIP/6001-00000000", "hello-world") in new stack
    -- <PJSIP/6001-00000000> Playing 'hello-world.ulaw' (language 'en')
    -- Executing [100@from-internal:4] Hangup("PJSIP/6001-00000000", "") in new stack
  == Spawn extension (from-internal, 100, 4) exited non-zero on 'PJSIP/6001-00000000'

It looks as if asterisk is responding with hello-world sound file, but I cannot hear anything from my local machine.

What else am I missing?

$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.5 LTS"

$ sudo netstat -plunt | grep asterisk
udp        0      0 0.0.0.0:5060            0.0.0.0:*                           28599/asterisk      
udp        0      0 0.0.0.0:35278           0.0.0.0:*                           28599/asterisk      
udp6       0      0 :::46974                :::*                                28599/asterisk      

$ sudo ufw status
Status: inactive

Executing “rtp set debug on” will show you media packets as they are sent, and to where. If that appears correct then your problem is outside of Asterisk - be it a firewall or your client itself.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.