Hi everyone,
I’m toying around and a trying to setup the Hello World example on a Cloud server. I’m currently unable to hear the Hello World message although I believe Asterisk is playing it correctly. Let me give you a little bit more context.
How I installed Asterisk
Im using Asterisk 16.2.1~dfsg-1+deb10u1 that I installed from Debian 10’s repositories using the following command:
sudo apt install asterisk
Configuration files
/etc/asterisk/extensions.conf
[from-internal]
exten = 100,1,Answer()
same = n,Wait(1)
same = n,Playback(hello-world)
same = n,Hangup()
/etc/asterisk/sip.conf
[general]
context=default
[6001]
type=friend
context=from-internal
host=dynamic
secret=******
disallow=all
allow=ulaw
/etc/asterisk/pjsip.conf
[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=******
username=6001
[6001]
type=aor
max_contacts=1
My cloud server has a public IP address and I’m using Zoiper on Ubuntu to make the call. If it’s relevant, my workstation is on a home network using NAT.
Using Asterisk’s console, I’m able to to see that my calls somehow reaches the server by I cannot hear anything. I’ve confirmed that may audio works correctly using Zoiper’s audio check. Here are the logs printed by Asterisk when I make the call.
Connected to Asterisk 16.2.1~dfsg-1+deb10u1 currently running on ov-90142f (pid = 8219)
== Setting global variable 'SIPDOMAIN' to '185.181.160.39'
-- Executing [100@from-internal:1] Answer("PJSIP/6001-00000003", "") in new stack
> 0x7f5130011ef0 -- Strict RTP learning after remote address set to: 83.77.39.XXX:8000
-- Executing [100@from-internal:2] Wait("PJSIP/6001-00000003", "1") in new stack
-- Executing [100@from-internal:3] Playback("PJSIP/6001-00000003", "hello-world") in new stack
-- <PJSIP/6001-00000003> Playing 'hello-world.gsm' (language 'en')
-- Executing [100@from-internal:4] Hangup("PJSIP/6001-00000003", "") in new stack
== Spawn extension (from-internal, 100, 4) exited non-zero on 'PJSIP/6001-00000003'
It looks like it answering correctly and playing the sound but I can’t here anything as I said. Am I missing something ? Do I need to setup anything more ?
Any help would be much appreciated.
Good evening.