IVR not record audio

I am configuring a simple IVR but I can’t record audio for options, see my config

SIP.CONF

[general]
udpbindaddr = 0.0.0.0
bindport = 5060
language = pt_BR
disallow = all

opcoes-basicas
host = dynamic
type = friend
context = ramais

codecs
disallow = all
allow = alaw
allow = ilbc
allow = gsm

somente-alaw
disallow = all
allow = alaw

9001
secret = senha01
callerid = Secretaria <9001>

9002
secret = senha02
callerid = Diretoria <9002>

EXTENSION.CONF

[ramais]
; Ramais SIP
exten=>9001,1,Dial(SIP/9001)
exten=>9002,1,Dial(SIP/9002)

; Ramais IAX
exten=>9003,1,Dial(IAX2/9003)
exten=>9004,1,Dial(IAX2,9004)

; Extensoes para gravacao de arquivos de som

exten=>2001,1,Answer(500)
same=>n,Record(boasvindas.gsm)
same=>n,Playback(boasvindas)
same=>n,Hangup()

exten=>2002,1,Answer
same=>n,Record(saldo.ulaw)
same=>n,Playback(saldo)
same=>n,Hangup

exten=>2003,1,Answer
same=>n,Record(atendimento.alaw)
same=>n,Playback(atendimento)
same=>n,Hangup

exten=>2004,1,Answer
same=>n,Record(telefonista.gsm)
same=>n,Playback(telefonista)
same=>n,Hangup

exten=>9000,1,Goto(uraprincipal,s,1)

[uraprincipal]
exten=>s,1,Answer
exten=>s,2,BackGround(boasvindas)

exten=>1,1,PlayBack(saldo)
exten=>1,2,Goto(s,1)

exten=>3,1,PlayBack(atendimento)
exten=>3,2,Goto(s,1)

exten=>11,1,PlayBack(telefonista)
exten=>11,2,Goto(s,1)

Could you please post the call logs for those calls?

Tks for support satish4asterisk

I called to ramal 2001 to try record audio, the “beep” dont play, I said some words and pressed the key # to finish the call and record the audio but nothing happened. After this I called to ramal 9000 to listen the audio IVR. During this process I opened asterisk and file log “/var/log/asterisk/messages”
Record audio is not a big problem, is there another way (application or website) to create audios for use on IVR?
Follow the logs

Based on your logs

  1. Retransmition time out which is a clearly indication of NAT issue
  2. Also file you re trying to play doesnt exist or it is in a format Asterisk cant play
  3. Follow the link on the logs and you will find some hints to fix your issue
  4. You dont have any of the required setting to deal with Nat on your sip.conf file

Dear ambiorixg12
My asterisk server is installed on Google Cloud, I modified my sip.conf including some options but still not working

[general]
udpbindaddr=0.0.0.0
bindport=5060
language=pt_BR
disallow=all
externalip=x.x.x.x (my external IP)
localnet=10.128.0.2/255.255.255.255
nat=force_rport

opcoes-basicas
host=dynamic
type=friend
context=ramais

codecs
disallow=all
allow=alaw
allow=ilbc
allow=gsm

somente-alaw
disallow=all
allow=alaw

9001
secret=senha01
callerid=Secretaria <9001>
qualify=yes
externalip=x.x.x.x (my external ip)
localnet=10.128.0.2/255.255.255.255
nat=force_rport

9002
secret=senha02
callerid=Diretoria <9001>

I’m using my phone now, so I can’t type, but external IP setting it is not correctly set check sample configuration file also add comedia to your Nat setting

In externalip I omitted information. I change nat setting to comedia but not work
I am using Zoiper softphone, I disabled " Random Port" on “Local RTP Port” configuration connectivity and I could hear playback just one time, only one time!!! In next attempt I can’t hear again.

Define an stun server on zoiper

I did it but not work

sip configuration
rtp debug
sip debug
basic network schema