I am trying to record sound and then playback them but I can not hear anything.
Yeah in cli its showing playing audio file but there is no sound.
root@test-VirtualBox:/etc/asterisk# asterisk -rvvvvvvvv
Asterisk 16.15.1, Copyright (C) 1999 - 2018, Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 16.15.1 currently running on test-VirtualBox (pid = 9420)
test-VirtualBox*CLI> module load app_record.so
Loaded app_record.so
== Registered application 'Record'
Loaded app_record.so => (Trivial Record Application)
== Setting global variable 'SIPDOMAIN' to '192.168.1.5'
-- Executing [1102@Long-Distance:1] Answer("PJSIP/1101-00000000", "") in new stack
> 0x7f8cb0035fe0 -- Strict RTP learning after remote address set to: 103.241.225.181:8356
> 0x7f8cb0035fe0 -- Strict RTP qualifying stream type: audio
> 0x7f8cb0035fe0 -- Strict RTP switching source address to 192.168.1.3:7078
-- Executing [1102@Long-Distance:2] Playback("PJSIP/1101-00000000", "hello-world") in new stack
-- <PJSIP/1101-00000000> Playing 'hello-world.slin' (language 'en')
-- Executing [1102@Long-Distance:3] Playback("PJSIP/1101-00000000", "beep") in new stack
-- <PJSIP/1101-00000000> Playing 'beep.slin' (language 'en')
-- Executing [1102@Long-Distance:4] NoOp("PJSIP/1101-00000000", "Answered,Playback,beep done") in new stack
-- Executing [1102@Long-Distance:5] Record("PJSIP/1101-00000000", "/home/test/Documents/data/record.wav,,10") in new stack
-- <PJSIP/1101-00000000> Playing 'beep.slin' (language 'en')
> 0x7f8cb0035fe0 -- Strict RTP learning complete - Locking on source address 192.168.1.3:7078
-- Executing [1102@Long-Distance:6] Playback("PJSIP/1101-00000000", "/home/test/Documents/data-record") in new stack
-- <PJSIP/1101-00000000> Playing '/home/test/Documents/data-record.slin' (language 'en')
-- Executing [1102@Long-Distance:7] NoOp("PJSIP/1101-00000000", "Record & Playback done") in new stack
-- Executing [1102@Long-Distance:8] Hangup("PJSIP/1101-00000000", "") in new stack
== Spawn extension (Long-Distance, 1102, 8) exited non-zero on 'PJSIP/1101-00000000'
-- Added contact 'sip:1102@192.168.1.2:63252;transport=UDP;rinstance=2ad9163d97593d9d' to AOR '1102' with expiration of 60 seconds
== Contact 1102/sip:1102@192.168.1.2:63252;transport=UDP;rinstance=2ad9163d97593d9d has been deleted
== Endpoint 1102 is now Unreachable
== Endpoint 1102 is now Reachable
== Contact 1102/sip:1102@192.168.1.2:63252;transport=UDP;rinstance=2ad9163d97593d9d has been deleted
== Endpoint 1102 is now Unreachable
-- Added contact 'sip:1102@192.168.1.2:63252;transport=UDP;rinstance=2ad9163d97593d9d' to AOR '1102' with expiration of 60 seconds
== Endpoint 1102 is now Reachable
test-VirtualBox*CLI>
My pjsip.conf context:
;================================ TRANSPORTS ==
; Our primary transport definition for UDP communication behind NAT.
[transport-udp-nat]
type = transport
protocol = udp
bind = 0.0.0.0
[endpoint-internal-d70](!)
type = endpoint
context = Long-Distance
allow = all
direct_media = no
trust_id_outbound = yes
device_state_busy_at = 1
dtmf_mode = rfc4733
use_avpf = yes
[auth-userpass](!)
type = auth
auth_type = userpass
[aor-single-reg](!)
type = aor
max_contacts = 1
[1101](endpoint-internal-d70)
auth = 1101
aors = 1101
callerid = Maria Berny <1101>
[1101](auth-userpass)
password = SW2fur7facrarac
username = 3605657CFB45
[1101](aor-single-reg)
mailboxes = 1101@example
[1102](endpoint-internal-d70)
auth = 1102
aors = 1102
callerid = Yash Mistry <1102>
[1102](auth-userpass)
password = yash1234
username = 1234
[1102](aor-single-reg)
mailboxes = 1102@example
[1103](endpoint-internal-d70)
auth = 1103
aors = 1103
callerid = Penelope Bronte <1103>
[1103](auth-userpass)
password = zutAnacHe8ewuWr
username = D5F646797302
[1103](aor-single-reg)
mailboxes = 103@example
What am I missing to add?
Maybe there is a codec which I am missing, slin codec but where I canât figure out.
If possible tell me which codec is best if I have to use that recorded file in speech recognition or in simple term which one gives me better quality audio.