Orphaned voicemail sessions


#1

We have an issue whereby calls that go to voice mail do not end and remain as “rogue” active calls. We have seen as many as 19 concurrent calls and seems to be happening more frequently of late (every 3-4 days).

Environment:
Asterisk 1.6.2.20
FreePBX 2.8.1.1

Here is our core show channels output the last time this happened:
(note that all channels listed have the same public IP)

asterisk*CLI> core show channels
Channel Location State Application(Data)
SIP/###.###.###.###-00 s-NOANSWER@macro-vm: Up VoiceMail(780@default,su)
SIP/###.###.###.###-00 s-NOANSWER@macro-vm: Up VoiceMail(780@default,su)
SIP/###.###.###.###-00 s-NOANSWER@macro-vm: Up VoiceMail(780@default,su)
SIP/###.###.###.###-00 s-NOANSWER@macro-vm: Up VoiceMail(780@default,su)
SIP/###.###.###.###-00 s-NOANSWER@macro-vm: Up VoiceMail(780@default,su)
SIP/###.###.###.###-00 s-NOANSWER@macro-vm: Up VoiceMail(780@default,su)
SIP/###.###.###.###-00 s-NOANSWER@macro-vm: Up VoiceMail(780@default,su)
SIP/###.###.###.###-00 s-NOANSWER@macro-vm: Up VoiceMail(780@default,su)
SIP/###.###.###.###-00 s-NOANSWER@macro-vm: Up VoiceMail(780@default,su)
SIP/###.###.###.###-00 s-NOANSWER@macro-vm: Up VoiceMail(780@default,su)
SIP/###.###.###.###-00 s-NOANSWER@macro-vm: Up VoiceMail(780@default,su)
11 active channels
11 active calls
102 calls processed

These calls do not end with an “amportal restart”. Killing the asterisk process (kill -9 pid) or rebooting the machine does clear them and everything is fine for a few days until this happens again.

Any thoughts or suggestions?


#2

please post output of “dialplan show 780@default”


#3

[code]asterisk*CLI> dialplan show 780@default
[ Included context ‘ext-local’ created by ‘pbx_config’ ]
‘780’ => hint: SIP/780&Custom:DND780 [pbx_config]
1. Macro(exten-vm,780,780) [pbx_config]
2. Goto(vmret,1) [pbx_config]

-= 1 extension (3 priorities) in 1 context. =-
asterisk*CLI>
[/code]


#4

now - “dialplan show vmret” - we are working our way through the maze.


#5

[code]asterisk*CLI> dialplan show vmret@default
[ Included context ‘ext-local’ created by ‘pbx_config’ ]
‘vmret’ => 1. GotoIf($["${IVR_RETVM}" = “RETURN” & “${IVR_CONTEXT}” != “”]?playret) [pbx_config]
2. Hangup() [pbx_config]
[playret] 3. Playback(exited-vm-will-be-transfered&silence/1) [pbx_config]
4. Goto(${IVR_CONTEXT},return,1) [pbx_config]

-= 1 extension (4 priorities) in 1 context. =-
[/code]


#6

one more puzzle piece - dialplan show macro-vm-exten


#7

[code]asterisk*CLI> dialplan show macro-exten-vm
[ Context ‘macro-exten-vm’ created by ‘pbx_config’ ]
‘docfb’ => 1. Set(RTCFB=${IF($["${VMBOX}"!=“novm”]?${RINGTIMER}:"")}) [pbx_config]
2. Dial(Local/${CFBEXT}@from-internal/n,${RTCFB},${DIAL_OPTIONS}) [pbx_config]
3. Return() [pbx_config]
‘docfu’ => 1. Set(RTCFU=${IF($["${VMBOX}"!=“novm”]?${RINGTIMER}:"")}) [pbx_config]
2. Dial(Local/${CFUEXT}@from-internal/n,${RTCFU},${DIAL_OPTIONS}) [pbx_config]
3. Return() [pbx_config]
‘exit’ => 1. Playback(beep&line-busy-transfer-menu&silence/1) [pbx_config]
2. MacroExit() [pbx_config]
‘s’ => 1. Macro(user-callerid,) [pbx_config]
2. Set(RingGroupMethod=none) [pbx_config]
3. Set(VMBOX=${ARG1}) [pbx_config]
4. Set(__EXTTOCALL=${ARG2}) [pbx_config]
5. Set(CFUEXT=${DB(CFU/${EXTTOCALL})}) [pbx_config]
6. Set(CFBEXT=${DB(CFB/${EXTTOCALL})}) [pbx_config]
7. Set(RT=${IF($[$["${VMBOX}"!=“novm”] | $["${CFUEXT}"!=""]]?${RINGTIMER}:"")}) [pbx_config]
[checkrecord] 8. Macro(record-enable,${EXTTOCALL},IN) [pbx_config]
[macrodial] 9. Macro(dial-one,${RT},${DIAL_OPTIONS},${EXTTOCALL}) [pbx_config]
10. GotoIf($["${VMBOX}"!=“novm” & “${SCREEN}”!="" & “${DIALSTATUS}”=“NOANSWER”]?exit) [pbx_config]
11. Set(SV_DIALSTATUS=${DIALSTATUS}) [pbx_config]
[calldocfu] 12. GosubIf($[("${SV_DIALSTATUS}"=“NOANSWER”|"${SV_DIALSTATUS}"=“CHANUNAVAIL”) & “${CFUEXT}”!="" & “${SCREEN}”=""]?docfu,1) [pbx_config]
[calldocfb] 13. GosubIf($["${SV_DIALSTATUS}"=“BUSY” & “${CFBEXT}”!=""]?docfb,1) [pbx_config]
14. Set(DIALSTATUS=${SV_DIALSTATUS}) [pbx_config]
15. Noop(Voicemail is ‘${VMBOX}’) [pbx_config]
16. GotoIf($["${VMBOX}"=“novm”]?s-${DIALSTATUS},1) [pbx_config]
17. Noop(Sending to Voicemail box ${EXTTOCALL}) [pbx_config]
18. Macro(vm,${VMBOX},${DIALSTATUS},${IVR_RETVM}) [pbx_config]
‘s-BUSY’ => 1. Noop(Extension is reporting BUSY and not passing to Voicemail) [pbx_config]
2. GotoIf($["${IVR_RETVM}"=“RETURN” & “${IVR_CONTEXT}”!=""]?exit,1) [pbx_config]
3. Playtones(busy) [pbx_config]
4. Busy(20) [pbx_config]
’_s-!’ => 1. Noop(IVR_RETVM: ${IVR_RETVM} IVR_CONTEXT: ${IVR_CONTEXT}) [pbx_config]
2. GotoIf($["${IVR_RETVM}"=“RETURN” & “${IVR_CONTEXT}”!=""]?exit,1) [pbx_config]
3. Playtones(congestion) [pbx_config]
4. Congestion(10) [pbx_config]
Include => ‘macro-exten-vm-custom’ [pbx_config]

-= 6 extensions (34 priorities) in 1 context. =-
[/code]


#8

I really hope this is the last one - dialplan show macro-vm


#9

No problem, I appreciate your help.

[code]asteriskCLI> dialplan show macro-vm
[ Context ‘macro-vm’ created by ‘pbx_config’ ]
‘a’ => 1. Macro(get-vmcontext,${MEXTEN}) [pbx_config]
2. GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/
/ext)}" = “0”]?adef,1) [pbx_config]
3. Set(VMX_ADEST_EXT=${DB_RESULT}) [pbx_config]
4. GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}//context)}" = “1”]?acontext) [pbx_config]
5. Set(DB_RESULT=${VMX_CONTEXT}) [pbx_config]
[acontext] 6. Set(VMX_ADEST_CONTEXT=${DB_RESULT}) [pbx_config]
7. GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/
/pri)}" = “1”]?apri) [pbx_config]
8. Set(DB_RESULT=${VMX_PRI}) [pbx_config]
[apri] 9. Set(VMX_ADEST_PRI=${DB_RESULT}) [pbx_config]
10. Goto(${VMX_ADEST_CONTEXT},${VMX_ADEST_EXT},${VMX_ADEST_PRI}) [pbx_config]
‘adef’ => 1. VoiceMailMain(${MEXTEN}@${VMCONTEXT}) [pbx_config]
2. GotoIf($["${RETVM}" = “RETURN”]?exit-RETURN,1) [pbx_config]
3. Hangup() [pbx_config]
‘dovm’ => 1. Noop(VMX Timeout - go to voicemail) [pbx_config]
2. VoiceMail(${MEXTEN}@${VMCONTEXT},${VMX_OPTS}${VMGAIN}) [pbx_config]
3. Goto(exit-${VMSTATUS},1) [pbx_config]
‘exit-FAILED’ => 1. Playback(im-sorry&an-error-has-occured) [pbx_config]
2. GotoIf($["${RETVM}" = “RETURN”]?exit-RETURN,1) [pbx_config]
3. Hangup() [pbx_config]
‘exit-RETURN’ => 1. Noop(Returning From Voicemail because macro) [pbx_config]
‘exit-SUCCESS’ => 1. GotoIf($["${RETVM}" = “RETURN”]?exit-RETURN,1) [pbx_config]
2. Playback(goodbye) [pbx_config]
3. Hangup() [pbx_config]
‘exit-USEREXIT’ => 1. GotoIf($["${RETVM}" = “RETURN”]?exit-RETURN,1) [pbx_config]
2. Playback(goodbye) [pbx_config]
3. Hangup() [pbx_config]
‘o’ => 1. Playback(one-moment-please) [pbx_config]
2. GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/0/ext)}" = “0”]?doopdef) [pbx_config]
3. Set(VMX_OPDEST_EXT=${DB_RESULT}) [pbx_config]
4. GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/0/context)}" = “1”]?opcontext) [pbx_config]
5. Set(DB_RESULT=${VMX_CONTEXT}) [pbx_config]
[opcontext] 6. Set(VMX_OPDEST_CONTEXT=${DB_RESULT}) [pbx_config]
7. GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/0/pri)}" = “1”]?oppri) [pbx_config]
8. Set(DB_RESULT=${VMX_PRI}) [pbx_config]
[oppri] 9. Set(VMX_OPDEST_PRI=${DB_RESULT}) [pbx_config]
10. Goto(${VMX_OPDEST_CONTEXT},${VMX_OPDEST_EXT},${VMX_OPDEST_PRI}) [pbx_config]
[doopdef] 11. GotoIf($[“x${OPERATOR_XTN}”=“x”]?nooper:from-internal,${OPERATOR_XTN},1) [pbx_config]
[nooper] 12. GotoIf($[“x${FROM_DID}”=“x”]?nodid) [pbx_config]
13. Dial(Local/${FROM_DID}@from-pstn,) [pbx_config]
14. Macro(hangup,) [pbx_config]
[nodid] 15. Dial(Local/s@from-pstn,) [pbx_config]
16. Macro(hangup,) [pbx_config]
‘s’ => 1. Macro(user-callerid,SKIPTTL) [pbx_config]
2. Set(VMGAIN=${IF($[“foo${VM_GAIN}”!=“foo”]?“g(${VM_GAIN})”:"")}) [pbx_config]
3. GotoIf($[“foo${DB(${BLKVM_OVERRIDE})}” != “fooTRUE”]?vmx,1) [pbx_config]
4. Noop(CAME FROM: ${NODEST} - Blocking VM cause of key: ${DB(BLKVM_OVERRIDE)}) [pbx_config]
5. Hangup() [pbx_config]
‘s-BUSY’ => 1. Noop(BUSY voicemail) [pbx_config]
2. Macro(get-vmcontext,${MEXTEN}) [pbx_config]
3. VoiceMail(${MEXTEN}@${VMCONTEXT},${VM_OPTS}b${VMGAIN}) [pbx_config]
4. Goto(exit-${VMSTATUS},1) [pbx_config]
‘s-DIRECTDIAL’ => 1. Noop(DIRECTDIAL voicemail) [pbx_config]
2. Macro(get-vmcontext,${MEXTEN}) [pbx_config]
3. VoiceMail(${MEXTEN}@${VMCONTEXT},${VM_OPTS}${VM_DDTYPE}${VMGAIN}) [pbx_config]
4. Goto(exit-${VMSTATUS},1) [pbx_config]
‘s-NOMESSAGE’ => 1. Noop(NOMESSAGE (beeb only) voicemail) [pbx_config]
2. Macro(get-vmcontext,${MEXTEN}) [pbx_config]
3. VoiceMail(${MEXTEN}@${VMCONTEXT},s${VM_OPTS}${VMGAIN}) [pbx_config]
4. Goto(exit-${VMSTATUS},1) [pbx_config]
‘t’ => 1. Hangup() [pbx_config]
‘vmx’ => 1. Set(MEXTEN=${ARG1}) [pbx_config]
2. Set(MMODE=${ARG2}) [pbx_config]
3. Set(RETVM=${ARG3}) [pbx_config]
4. Set(MODE=${IF($["${MMODE}"=“BUSY”]?busy:unavail)}) [pbx_config]
5. GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/vmxopts/timeout)}" = “0”]?chknomsg) [pbx_config]
6. Set(VM_OPTS=${DB_RESULT}) [pbx_config]
[chknomsg] 7. GotoIf($["${MMODE}"=“NOMESSAGE”]?s-${MMODE},1) [pbx_config]
8. GotoIf($["${MMODE}" != “DIRECTDIAL”]?notdirect) [pbx_config]
9. Set(MODE=${IF($["${REGEX("[b]" ${VM_DDTYPE})}" = “1”]?busy:${MODE})}) [pbx_config]
[notdirect] 10. Noop(Checking if ext ${MEXTEN} is enabled: ${DB(AMPUSER/${MEXTEN}/vmx/${MODE}/state)}) [pbx_config]
11. GotoIf($["${DB(AMPUSER/${MEXTEN}/vmx/${MODE}/state)}" != “enabled”]?s-${MMODE},1) [pbx_config]
12. Macro(get-vmcontext,${MEXTEN}) [pbx_config]
13. GotoIf($[(${STAT(f,${ASTSPOOLDIR}/voicemail/${VMCONTEXT}/${MEXTEN}/temp.wav)} = 1) || (${STAT(f,${ASTSPOOLDIR}/voicemail/${VMCONTEXT}/${MEXTEN}/temp.WAV)} = 1)]?tmpgreet) [pbx_config]
14. GotoIf($[(${STAT(f,${ASTSPOOLDIR}/voicemail/${VMCONTEXT}/${MEXTEN}/${MODE}.wav)} = 0) && (${STAT(f,${ASTSPOOLDIR}/voicemail/${VMCONTEXT}/${MEXTEN}/${MODE}.WAV)} = 0)]?nofile) [pbx_config]
15. Set(LOOPCOUNT=0) [pbx_config]
16. GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/repeat)}" = “0”]?vmxtime) [pbx_config]
17. Set(VMX_REPEAT=${DB_RESULT}) [pbx_config]
[vmxtime] 18. GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/timeout)}" = “0”]?vmxloops) [pbx_config]
19. Set(VMX_TIMEOUT=${DB_RESULT}) [pbx_config]
[vmxloops] 20. GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/loops)}" = “0”]?vmxanswer) [pbx_config]
21. Set(VMX_LOOPS=${DB_RESULT}) [pbx_config]
[vmxanswer] 22. Answer() [pbx_config]
[loopstart] 23. Read(ACTION,${ASTSPOOLDIR}/voicemail/${VMCONTEXT}/${MEXTEN}/${MODE},1,skip,${VMX_REPEAT},${VMX_TIMEOUT}) [pbx_config]
24. GotoIf($["${EXISTS(${ACTION})}" = “1”]?checkopt) [pbx_config]
[noopt] 25. Noop(Timeout: going to timeout dest) [pbx_config]
26. Set(VMX_OPTS=${VMX_OPTS_TIMEOUT}) [pbx_config]
27. GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/vmxopts/timeout)}" = “0”]?chktime) [pbx_config]
28. Set(VMX_OPTS=${DB_RESULT}) [pbx_config]
[chktime] 29. GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/timedest/ext)}" = “0”]?dotime) [pbx_config]
30. Set(VMX_TIMEDEST_EXT=${DB_RESULT}) [pbx_config]
31. GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/timedest/context)}" = “0”]?timepri) [pbx_config]
32. Set(VMX_TIMEDEST_CONTEXT=${DB_RESULT}) [pbx_config]
[timepri] 33. GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/timedest/pri)}" = “0”]?dotime) [pbx_config]
34. Set(VMX_TIMEDEST_PRI=${DB_RESULT}) [pbx_config]
[dotime] 35. Goto(${VMX_TIMEDEST_CONTEXT},${VMX_TIMEDEST_EXT},${VMX_TIMEDEST_PRI}) [pbx_config]
[checkopt] 36. GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/${ACTION}/ext)}" = “1”]?doopt) [pbx_config]
37. GotoIf($["${ACTION}" = “0”]?o,1) [pbx_config]
38. GotoIf($["${ACTION}" = “*”]?adef,1) [pbx_config]
39. Set(LOOPCOUNT=$[${LOOPCOUNT} + 1]) [pbx_config]
40. GotoIf($[${LOOPCOUNT} > ${VMX_LOOPS}]?toomany) [pbx_config]
41. Playback(pm-invalid-option&please-try-again) [pbx_config]
42. Goto(loopstart) [pbx_config]
[toomany] 43. Noop(Too Many invalid entries, got to invalid dest) [pbx_config]
44. Set(VMX_OPTS=${VMX_OPTS_LOOPS}) [pbx_config]
45. GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/vmxopts/loops)}" = “0”]?chkloop) [pbx_config]
46. Set(VMX_OPTS=${DB_RESULT}) [pbx_config]
[chkloop] 47. GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/loopdest/ext)}" = “0”]?doloop) [pbx_config]
48. Set(VMX_LOOPDEST_EXT=${DB_RESULT}) [pbx_config]
49. GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/loopdest/context)}" = “0”]?looppri) [pbx_config]
50. Set(VMX_LOOPDEST_CONTEXT=${DB_RESULT}) [pbx_config]
[looppri] 51. GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/loopdest/pri)}" = “0”]?doloop) [pbx_config]
52. Set(VMX_LOOPDEST_PRI=${DB_RESULT}) [pbx_config]
[doloop] 53. Goto(${VMX_LOOPDEST_CONTEXT},${VMX_LOOPDEST_EXT},${VMX_LOOPDEST_PRI}) [pbx_config]
[doopt] 54. Noop(Got a valid option: ${DB_RESULT}) [pbx_config]
55. Set(VMX_EXT=${DB_RESULT}) [pbx_config]
56. GotoIf($["${VMX_EXT}" != “dovm”]?getdest) [pbx_config]
[vmxopts] 57. Set(VMX_OPTS=${VMX_OPTS_DOVM}) [pbx_config]
58. GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/vmxopts/dovm)}" = “0”]?vmxdovm) [pbx_config]
[vmxopts] 59. Set(VMX_OPTS=${DB_RESULT}) [pbx_config]
[vmxdovm] 60. Goto(dovm,1) [pbx_config]
[getdest] 61. GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/${ACTION}/context)}" = “0”]?vmxpri) [pbx_config]
62. Set(VMX_CONTEXT=${DB_RESULT}) [pbx_config]
[vmxpri] 63. GotoIf($["${DB_EXISTS(AMPUSER/${MEXTEN}/vmx/${MODE}/${ACTION}/pri)}" = “0”]?vmxgoto) [pbx_config]
64. Set(VMX_PRI=${DB_RESULT}) [pbx_config]
[vmxgoto] 65. Goto(${VMX_CONTEXT},${VMX_EXT},${VMX_PRI}) [pbx_config]
[nofile] 66. Noop(File for mode: ${MODE} does not exist, SYSTEMSTATUS: ${SYSTEMSTATUS}, going to normal voicemail) [pbx_config]
67. Goto(s-${MMODE},1) [pbx_config]
[tmpgreet] 68. Noop(Temporary Greeting Detected, going to normal voicemail) [pbx_config]
69. Goto(s-${MMODE},1) [pbx_config]
’_s-.’ => 1. Macro(get-vmcontext,${MEXTEN}) [pbx_config]
2. VoiceMail(${MEXTEN}@${VMCONTEXT},${VM_OPTS}u${VMGAIN}) [pbx_config]
3. Goto(exit-${VMSTATUS},1) [pbx_config]
Include => ‘macro-vm-custom’ [pbx_config]

-= 15 extensions (132 priorities) in 1 context. =-
[/code]


#10

This is my best guess as to what is happening -
you call macro-vm for extension 780
you get a NOANSWER condition from voicemail (is the box set up?)
the macro doesn’t have a handler for the condition so it “drops out” leaving the call connected

solution:
add this line to macro-vm and reload the dialplan
exten => s-NOANSWER,1,hangup()

no guarantees, but you should be any worse off if it doesn’t work.


#11

Well actually now that you mention it, I think the issue might be that there is an inbound route that points to a ring group with three voice mail enabled extensions. I changed the ring time for two of the extension from default (15 seconds) to 20. Is my logic correct that this should resolve the problem by preventing calls from opening two voice mail connections?


#12

since it looks like you are using FreePBX, and using a ring group, the individual extension ring time before voicemail is not used, there is a ring time defined n the ring group that is used there.

What do you have setup in your ring group for ‘Destination if No Answer’?


#13

‘Destination if No Answer’ for the Ring Group is Voicemail/780 and Ring Time is 20 seconds.

So even though the individual extension is set to go to voice mail before the Ring Group no answer destination (extension is 15 seconds, ring group is 20 seconds), that’s not coming into play? I guess I thought an extension going to voice mail was basically the same as someone answering the extension - no matter how the extension is dialed.


#14

My experience with freePBX is that the process of ringing an individual extension and ringing a group of extensions via a ring group are handled by completely different parts of dialplan code with completely different calls to Dial()

For example: Dial(SIP/780,15) for a single exten and Dial(SIP/780&SIP/781&SIP/781,20) for a ring group.

Anywho… I am curious if VoiceMail() is actually doing something. During these events, if you look in the directory /var/spool/asterisk/voicemail/default/780/tmp, are there any files there?

Also, In your initial post, you had the SIP channel information XXXXd out. Are these coming from internal callers, external callers via a SIP provider, external callers via a PSTN-to-SIP gateway, etc?

Can we see your voicemail.conf file (passwords removed of course). I all really interested in the [general] section and just the 780 mailbox, all other mailboxes can be removed.

Finally, what version of FreePBX are you using?


#15

/var/spool/asterisk/voicemail/default/780/tmp contains 272 files! Other extensions are empty.

The IP that was X’d out was a single public IP from an external caller (not our SIP provider).

voicemail.conf

[code][general]
#include “vm_email.inc”
#include “vm_general.inc”

[default]
779 => ****,Extension,vm@domain.com,attach=yes|saycid=no|envelope=no|delete=yes
[/code]

vm_general.inc

[code];!
;! Automatically generated configuration file
;! Filename: voicemail.conf (/etc/asterisk/vm_general.inc)
;! Generator: AppVoicemail
;! Creation Date: Wed Nov 3 11:29:18 2010
;!
; 1st listed format gets emailed
format = wav49|wav

attach = yes
pbxskip = yes ; Don’t put [PBX]: in the subject line
serveremail = voicemail@domain.com ; Who the e-mail notification should appear to come from
fromstring = Voicemail System ; Real name of email sender
maxsilence = 5 ; Wait for 5 silent seconds and end the voicemail
silencethreshold = 128 ; What do we consider to be silence
skipms = 3000 ; How many miliseconds to skip forward/back when rew/ff in message playback
review = yes ; Allow sender to review/rerecord their message before saving it
operator = yes ; Allow caller to press 0
nextaftercmd = yes ; Automagically play next message when current message is deleted or saved
~
~
~
~[/code]

vm_email.inc

[code];!
;! Automatically generated configuration file
;! Filename: voicemail.conf (/etc/asterisk/vm_email.inc)
;! Generator: AppVoicemail
;! Creation Date: Wed Nov 3 11:29:18 2010
;!
; To be able to localize text in the email by using utf-8 characters you can remove the remark on the next line so that the charset will be utf-8
; charset=utf-8
; Change the email body, variables: VM_NAME, VM_DUR, VM_MSGNUM, VM_MAILBOX, VM_CALLERID, VM_DATE

emailbody = ${VM_NAME},\n\nThere is a new voicemail in mailbox ${VM_MAILBOX}:\n\n\tFrom:\t${VM_CALLERID}\n\tLength:\t${VM_DUR} seconds\n\tDate:\t${VM_DATE}\n\n\n
~
[/code]


#16

OK. the 272 files are voice mail recordings that did not properly complete. Normally, they would be renamed to msgXXXX.wav and placed into the INBOX when the recording was complete. Do these files have sizes?

Since these are temporary recordings, they may contain audio that may be beneficial in determining if this is a legitimate call gone wrong or something not so nice happening. You could try listening to some of them for clues. The paranoid side of me is saying that someone is trying something funny on your system.

Are you allowing anonymous inbound SIP calls? Unless you are very careful, this is a dangerous thing. OK it can be a dangerous thing even if you are very careful. It is typically recommended that anonymous SIP calls not be allowed. There is a setting under FreePBX ‘General Settings’ to disable this. If this is set to NO already and this outside address is not your provider, you may have a larger problem, like a compromised SIP device password. If that device has long distance access, watch your phone bills carefully. What am I saying, I am sure you already do that :wink:

At least you should block the external IP address at the firewall. The truly paranoid part of me would also change all my device passwords.


#17

Anonymous inbound SIP calls is enabled. But I think I may have tracked down the issue. We had TCP 5038 open on the outside for TAPI dialing integration which I now understand allows remote access to the manager interface. TCP 5038 has been closed on the outside.

Is it correct that the TCP 5038 could be responsible for these orphaned voicemail sessions?


#18

If someone has achieved this by a successful port 5038 compromise, you should rebuild the system from scratch, including re-installing the OS from trusted media.

(I think it is unlikely, as most attacks are on UDP 5060.)