I am using the latest SNG7. I have follow me turned off on my extensions. Everything else is pretty much at their defaults.
If an external user (say cellphone) calls the system, the IVR picks up correctly. If I enter an extension, say 10, the line rings. After the ring time duration it correctly plays the user’s unavailable voicemail greeting. All good.
However, if I make an internal call, say extension 20 calling extension 10, the system rings the extension for the ring duration however after that duration I see the timer on my phone start counting (i.e. call answered) yet I have to listen to complete silence for 18 seconds before the unavailable voicemail greeting plays. Additionally, the system default voicemail plays and not the users recorded message like when an external user calls that extension.
What can I look for? PS: All endpoints are using chan_pjsip.
Thanks - that was helpful. Here is the relevant extract from my log:
[2018-04-12 09:55:16] VERBOSE[25066][C-0000000f] pbx_builtins.c: Goto (macro-vm,s-NOANSWER,1)
[2018-04-12 09:55:16] VERBOSE[25066][C-0000000f] pbx.c: Executing [[email protected]:1] Macro("PJSIP/21-00000023", "get-vmcontext,17") in new stack
[2018-04-12 09:55:16] VERBOSE[25066][C-0000000f] pbx.c: Executing [[email protected]:1] Set("PJSIP/21-00000023", "VMCONTEXT=default") in new stack
[2018-04-12 09:55:16] VERBOSE[25066][C-0000000f] pbx.c: Executing [[email protected]:2] GotoIf("PJSIP/21-00000023", "0?200:300")
in new stack
[2018-04-12 09:55:16] VERBOSE[25066][C-0000000f] pbx_builtins.c: Goto (macro-get-vmcontext,s,300)
[2018-04-12 09:55:16] VERBOSE[25066][C-0000000f] pbx.c: Executing [[email protected]:300] NoOp("PJSIP/21-00000023", "") in new stack
[2018-04-12 09:55:16] VERBOSE[25066][C-0000000f] pbx.c: Executing [[email protected]:2] VoiceMail("PJSIP/21-00000023", "[email protected],u") in new stack
[2018-04-12 09:55:16] VERBOSE[25066][C-0000000f] file.c: <PJSIP/21-00000023> Playing '/var/spool/asterisk/voicemail/default/17/unavail.slin' (language 'en')
[2018-04-12 09:55:34] VERBOSE[25066][C-0000000f] file.c: <PJSIP/21-00000023> Playing 'vm-intro.ulaw' (language 'en')
[2018-04-12 09:55:37] VERBOSE[25066][C-0000000f] app_macro.c: Spawn extension (macro-vm, s-NOANSWER, 2) exited non-zero on 'PJSIP/21-00000023' in macro 'vm'
[2018-04-12 09:55:37] VERBOSE[25066][C-0000000f] app_macro.c: Spawn extension (macro-exten-vm, s, 27) exited non-zero on 'PJSIP/21-00000023' in macro 'exten-vm'
[2018-04-12 09:55:37] VERBOSE[25066][C-0000000f] pbx.c: Spawn extension (ext-local, 17, 2) exited non-zero on 'PJSIP/21-00000023'
[2018-04-12 09:55:37] VERBOSE[25066][C-0000000f] pbx.c: Executing [[email protected]:1] Macro("PJSIP/21-00000023", "hangupcall,") in new stack
Note that at time 2018-04-12 09:55:16 the VM message is supposed to start playing. From this time until 2018-04-12 09:55:34 the phone showed the call was connected, but it was dead silent. At 2018-04-12 09:55:34 I heard the system default voicemail greeting.
So what happened between 2018-04-12 09:55:16 and 2018-04-12 09:55:34?
I am a bit lost here. When calling from an internal extension to another internal extension, I get the issue I explained above. When I call from the outside (say a cellphone), the custom recorded message plays immediately at transitioning to voicemail, and it correctly plays the greeting I recorded via my phone.
In both cases I see:
<PJSIP/ThinkTel-00000087> Playing '/var/spool/asterisk/voicemail/default/21/unavail.slin' (language 'en')
<PJSIP/ThinkTel-00000087> Playing 'vm-intro.ulaw' (language 'en')
But, when calling from an external device, my greeting actually plays and without delay. It plays when the first line above is shown in the debug console. Which is strange as I only get silence when calling from an internal device. Yet in both cases I have no .slin file in my voicemail directory:
So with no .slin file present, why does external calls work and internal ones not? Where in FreePBX must I check for codec mismatches? Under Settings - Asterisk SIP Settings I have ulaw, gsm and g273 enabled. Our phones are Polycom IP 335/550.
I think I just solved it. I deleted all *.WAV, *.ogg and *.gsm files from the voicemail folder leaving only the .wav files in place. It now works from both internal and external sources. Thanks for your help!