No Audio available on SIP

I am getting below error while using voicemail

app.c:1242 __ast_play_and_record: No audio available on SIP/

I am using codec as ulaw and alaw

This is my sip configuration :

type=friend
dtmfmode=rfc2833
qualify=yes
insecure=port,invite
nat=force_rport,comedia
username=*****
secret=*****
host=XX.XX.XX.XXX
port=5060
context=inbound
disallow=all
allow=alaw
allow=ulaw

Extension as below :

exten => 7001,1,Dial(SIP/7001,5)
exten => 7001,n,Voicemail(${EXTEN},u)
exten => 7001,n,Hangup()

Can you please anyone help me resolve this issue…

What is the output of “sip set debug on” and “rtp set debug on” for a problematic call? As well - is the Asterisk server behind NAT?

Thanks for the support…

Now issue has been fixed, its the behind NAT server so i have added “directmedia=no” in configuration file, after that its working well…

Thanks…