Voicemail works inside local area network but fails from trunk

For some reason my voicemail recordings are failing. The only error that seems to stand out for me ( I am a newbie ) has to do with RTP.

[Apr 6 21:06:11] NOTICE[2720] chan_sip.c: Disconnecting call ‘SIP/sipgate-00000005’ for lack of RTP activity in 31 seconds

I was able to receive voice-mails a while back. Now I have been missing voice-mails for a little over a week.

I have tried modifying the rtpkeepalive to 20. I am not sure what is going on here.
here is part of the log file that I think might be useful

[Apr 6 21:14:10] VERBOSE[3531] app_voicemail.c: – Recording the message
[Apr 6 21:14:10] VERBOSE[3531] app_voicemail.c: – Recording the message
[Apr 6 21:14:10] VERBOSE[3531] app.c: – x=0, open writing: /var/spool/asterisk/voicemail/default/102/tmp/KZ7RiP format: wav49, 0x9644900
[Apr 6 21:14:10] VERBOSE[3531] app.c: – x=0, open writing: /var/spool/asterisk/voicemail/default/102/tmp/KZ7RiP format: wav49, 0x9644900
[Apr 6 21:14:10] VERBOSE[3531] app.c: – x=1, open writing: /var/spool/asterisk/voicemail/default/102/tmp/KZ7RiP format: wav, 0x95c8828
[Apr 6 21:14:10] VERBOSE[3531] app.c: – x=1, open writing: /var/spool/asterisk/voicemail/default/102/tmp/KZ7RiP format: wav, 0x95c8828
[Apr 6 21:14:30] NOTICE[2720] chan_sip.c: Disconnecting call ‘SIP/sipgate-00000007’ for lack of RTP activity in 31 seconds
[Apr 6 21:14:30] NOTICE[2720] chan_sip.c: Disconnecting call ‘SIP/sipgate-00000007’ for lack of RTP activity in 31 seconds
[Apr 6 21:14:30] VERBOSE[3531] app.c: – User hung up
[Apr 6 21:14:30] VERBOSE[3531] app.c: – User hung up
[Apr 6 21:14:30] VERBOSE[3531] app_macro.c: == Spawn extension (macro-vm, s-BUSY, 3) exited non-zero on ‘SIP/sipgate-00000007’ in macro ‘vm’
[Apr 6 21:14:30] VERBOSE[3531] app_macro.c: == Spawn extension (macro-vm, s-BUSY, 3) exited non-zero on ‘SIP/sipgate-00000007’ in macro ‘vm’
[Apr 6 21:14:30] VERBOSE[3531] app_macro.c: == Spawn extension (macro-exten-vm, s, 15) exited non-zero on ‘SIP/sipgate-00000007’ in macro ‘exten-vm’
[Apr 6 21:14:30] VERBOSE[3531] app_macro.c: == Spawn extension (macro-exten-vm, s, 15) exited non-zero on ‘SIP/sipgate-00000007’ in macro ‘exten-vm’
[Apr 6 21:14:30] VERBOSE[3531] pbx.c: == Spawn extension (from-did-direct, 102, 2) exited non-zero on ‘SIP/sipgate-00000007’
[Apr 6 21:14:30] VERBOSE[3531] pbx.c: == Spawn extension (from-did-direct, 102, 2) exited non-zero on ‘SIP/sipgate-00000007’
[Apr 6 21:14:30] VERBOSE[3531] pbx.c: – Executing [h@from-did-direct:1] Macro(“SIP/sipgate-00000007”, “hangupcall,”) in new stack
[Apr 6 21:14:30] VERBOSE[3531] pbx.c: – Executing [h@from-did-direct:1] Macro(“SIP/sipgate-00000007”, “hangupcall,”) in new stack
[Apr 6 21:14:30] VERBOSE[3531] pbx.c: – Executing [s@macro-hangupcall:1] GotoIf(“SIP/sipgate-00000007”, “1?theend”) in new stack
[Apr 6 21:14:30] VERBOSE[3531] pbx.c: – Executing [s@macro-hangupcall:1] GotoIf(“SIP/sipgate-00000007”, “1?theend”) in new stack
[Apr 6 21:14:30] VERBOSE[3531] pbx.c: – Goto (macro-hangupcall,s,3)
[Apr 6 21:14:30] VERBOSE[3531] pbx.c: – Goto (macro-hangupcall,s,3)
[Apr 6 21:14:30] VERBOSE[3531] pbx.c: – Executing [s@macro-hangupcall:3] Hangup(“SIP/sipgate-00000007”, “”) in new stack
[Apr 6 21:14:30] VERBOSE[3531] pbx.c: – Executing [s@macro-hangupcall:3] Hangup(“SIP/sipgate-00000007”, “”) in new stack
[Apr 6 21:14:30] VERBOSE[3531] app_macro.c: == Spawn extension (macro-hangupcall, s, 3) exited non-zero on ‘SIP/sipgate-00000007’ in macro ‘hangupcall’
[Apr 6 21:14:30] VERBOSE[3531] app_macro.c: == Spawn extension (macro-hangupcall, s, 3) exited non-zero on ‘SIP/sipgate-00000007’ in macro ‘hangupcall’
[Apr 6 21:14:30] VERBOSE[3531] pbx.c: == Spawn extension (from-did-direct, h, 1) exited non-zero on ‘SIP/sipgate-00000007’
[Apr 6 21:14:30] VERBOSE[3531] pbx.c: == Spawn extension (from-did-direct, h, 1) exited non-zero on ‘SIP/sipgate-00000007’

please help …and thank you.

fixed with NAT endpoint settings

also forwarded RTP ports 10000-20000 to my freepbx machine.

after switching back to my old wrt-54g router, verifying that my dyndns updated and making a call into the machine…it still takes me to voicemail but fails to record any of the message. INTERESTING…CHECK THIS OUT

[Apr 7 08:41:33] VERBOSE[4614] file.c: – <SIP/sipgate-00000009> Playing ‘digits/1.ulaw’ (language ‘en’)
[Apr 7 08:41:33] VERBOSE[4614] file.c: – <SIP/sipgate-00000009> Playing ‘digits/1.ulaw’ (language ‘en’)
[Apr 7 08:41:34] VERBOSE[4614] file.c: – <SIP/sipgate-00000009> Playing ‘digits/0.ulaw’ (language ‘en’)
[Apr 7 08:41:34] VERBOSE[4614] file.c: – <SIP/sipgate-00000009> Playing ‘digits/0.ulaw’ (language ‘en’)
[Apr 7 08:41:35] VERBOSE[4614] file.c: – <SIP/sipgate-00000009> Playing ‘digits/2.ulaw’ (language ‘en’)
[Apr 7 08:41:35] VERBOSE[4614] file.c: – <SIP/sipgate-00000009> Playing ‘digits/2.ulaw’ (language ‘en’)
[Apr 7 08:41:35] VERBOSE[4614] file.c: – <SIP/sipgate-00000009> Playing ‘vm-isonphone.ulaw’ (language ‘en’)
[Apr 7 08:41:35] VERBOSE[4614] file.c: – <SIP/sipgate-00000009> Playing ‘vm-isonphone.ulaw’ (language ‘en’)
[Apr 7 08:41:36] VERBOSE[4614] file.c: – <SIP/sipgate-00000009> Playing ‘vm-intro.ulaw’ (language ‘en’)
[Apr 7 08:41:36] VERBOSE[4614] file.c: – <SIP/sipgate-00000009> Playing ‘vm-intro.ulaw’ (language ‘en’)
[Apr 7 08:41:42] VERBOSE[4614] file.c: – <SIP/sipgate-00000009> Playing ‘beep.ulaw’ (language ‘en’)
[Apr 7 08:41:42] VERBOSE[4614] file.c: – <SIP/sipgate-00000009> Playing ‘beep.ulaw’ (language ‘en’)
[Apr 7 08:41:42] WARNING[2720] chan_sip.c: Maximum retries exceeded on transmission [email protected] for seqno 103 (Critical Response) – See doc/sip-retransmit.txt.
[Apr 7 08:41:42] WARNING[2720] chan_sip.c: Maximum retries exceeded on transmission [email protected] for seqno 103 (Critical Response) – See doc/sip-retransmit.txt.
[Apr 7 08:41:42] WARNING[2720] chan_sip.c: Hanging up call [email protected] - no reply to our critical packet (see doc/sip-retransmit.txt).
[Apr 7 08:41:42] WARNING[2720] chan_sip.c: Hanging up call [email protected] - no reply to our critical packet (see doc/sip-retransmit.txt).
[Apr 7 08:41:42] VERBOSE[4614] app_voicemail.c: – Recording the message
[Apr 7 08:41:42] VERBOSE[4614] app_voicemail.c: – Recording the message
[Apr 7 08:41:42] VERBOSE[4614] app.c: – x=0, open writing: /var/spool/asterisk/voicemail/default/102/tmp/az8n8r format: wav49, 0x9698f08
[Apr 7 08:41:42] VERBOSE[4614] app.c: – x=0, open writing: /var/spool/asterisk/voicemail/default/102/tmp/az8n8r format: wav49, 0x9698f08
[Apr 7 08:41:42] VERBOSE[4614] app.c: – x=1, open writing: /var/spool/asterisk/voicemail/default/102/tmp/az8n8r format: wav, 0x96a7b68
[Apr 7 08:41:42] VERBOSE[4614] app.c: – x=1, open writing: /var/spool/asterisk/voicemail/default/102/tmp/az8n8r format: wav, 0x96a7b68
[Apr 7 08:41:42] VERBOSE[4614] app.c: – User hung up
[Apr 7 08:41:42] VERBOSE[4614] app.c: – User hung up

THIS IS WITH THE LINKSYS ROUTER

I can makes calls both ways fine (out and into the freepbx) and talk for long periods of time.
I have switched from an older linksys wrt-54g/dd-wrt router to a d-link dir-615/latest firmware with application level gateway support for sip. The d-link has superior throughput so I stuck with that. When I switch the old router back reset cable modem and wait for dyndns to go through I still have the same problem. I can make calls but voice-mail fails from external inward bound calls only.

I will reconfirm my observations. However, I was able to receive voice-mails a week ago. It seems strange.

You have some sort of NAT trouble, that is why the RTP stream is loosing connection.

Did you change routers/firewall or in some other way update network topology?