I am using Asterisk to setup the internal our company communication calls For this We want to monitor all the internal calls happen between our staff. For this We setup the server and enable ARI for it and also we created nodes application which can stream live audio stream and download at our server using that we will transcribe scripts also. Now issue is while we calling internally call is happen but in nodejs app audio is not coming.
sip.conf
[general]
context=internal
allowguest=no
allowoverlap=no
bindport=5060
bindaddr=0.0.0.0
srvlookup=no
disallow=all
allow=alaw
alwaysauthreject=no
canreinvite=no
nat=yes
session-timers=refuse
localnet=192.168.0.0/255.255.255.0
externip=0.0.0.0
t1min=100
rtptimeout=60
rtpholdtimeout=300
rtpkeepalive=60
directmedia=no
directrtpsetup=no
pedantic=no
relaxdtmf=yes
notifyhold=yes
notifyringing=yes
[7001]
type=friend
host=dynamic
secret=7001
context=internal
qualify=yes
qualifyfreq=30
nat=force_rport,comedia
canreinvite=no
dtmfmode=rfc2833
disallow=all
allow=alaw
directmedia=no
rtpkeepalive=60
media_use_received_transport=yes
rewrite_contact=yes
; Ensure authentication works properly
authuser=7001
username=7001
[7002]
type=friend
host=dynamic
secret=7002
context=internal
qualify=yes
qualifyfreq=30
nat=force_rport,comedia
canreinvite=no
dtmfmode=rfc2833
disallow=all
allow=alaw
directmedia=no
rtpkeepalive=60
media_use_received_transport=yes
rewrite_contact=yes
extension.conf
[internal]
; Extension 7001: Using ARI for continuous RTP streaming
; ARI creates external media channel and adds it to bridge for live streaming
exten => 7001,1,Answer()
exten => 7001,2,Stasis(rtp-recorder) ; Enter ARI: creates external media channel for RTP streaming
exten => 7001,3,Dial(SIP/7001,60) ; Dial the extension (ARI adds external media to bridge)
exten => 7001,4,Playback(vm-nobodyavail) ; Play message if no answer
exten => 7001,5,VoiceMail(7001@main) ; Go to voicemail
exten => 7001,6,Hangup()
; Extension 7002: Using ARI for continuous RTP streaming
exten => 7002,1,Answer()
exten => 7002,2,Stasis(rtp-recorder) ; Enter ARI: creates external media channel for RTP streaming
exten => 7002,3,Dial(SIP/7002,60) ; Dial the extension (ARI adds external media to bridge)
exten => 7002,4,Playback(vm-nobodyavail) ; Play message if no answer
exten => 7002,5,VoiceMail(7001@main) ; Go to voicemail
exten => 7002,6,Hangup()
exten => 8001,1,VoicemailMain(7001@main)
exten => 8001,2,Hangup()
exten => 8002,1,VoicemailMain(7002@main)
exten => 8002,2,Hangup()