Voicemail to Email

I have setup Office 365 and i can receive the emails that are sent via the test in the debug area.

I’m now testing with a voicemail, i leave one and i get nothing. I’ve checked;

  • The extension has voicemail enabled
  • There is a correct email address entered
  • Email Attachment is set to yes
  • I’ve checked out Office 365 exchange admin area, it hasn’t been quarantined
  • I’ve looked in the mailbox configured and can see the test emails in the sent box but not any voice messages.

This is what i can see in the logs which suggests it’s being recorded.

[2020-03-20 18:06:55] VERBOSE[13053][C-00001471] app_voicemail.c: Recording the message
[2020-03-20 18:06:55] VERBOSE[13053][C-00001471] app.c: x=0, open writing: /var/spool/asterisk/voicemail/default/1048/tmp/lD8VDV format: wav, 0x7f645c0cebc0

Check
/var/log/maillog

That might be your best bet to what is going on.

Is that the same as what the debug option shows?

Nope, maillog is postfix’s output. It’ll show you the SMTP traffic,
you are just looking at the asterisk live log. Very different.

> 
> Mar 20 18:07:58 pbx postfix/pickup[12845]: B029780B1CCE: uid=995 from=<asterisk>
> Mar 20 18:07:58 pbx postfix/cleanup[12956]: B029780B1CCE: message-id=<[email protected]>
> Mar 20 18:07:58 pbx postfix/qmgr[12846]: B029780B1CCE: from=<[email protected]>, size=573, nrcpt=1 (queue active)
> Mar 20 18:07:58 pbx postfix/smtp[12958]: connect to smtp.office365.com[2603:1026:500:3d::2]:587: Network is unreachable
> Mar 20 18:07:59 pbx postfix/smtp[12958]: B029780B1CCE: to=<[email protected]>, relay=smtp.office365.com[52.97.146.194]:587, delay=0.6, delays=0/0/0.41/0.19, dsn=2.0.0, status=sent (250 2.0.0 OK <[email protected]> [Hostname=LOYP123MB3184.GBRP123.PROD.OUTLOOK.COM])
> Mar 20 18:07:59 pbx postfix/qmgr[12846]: B029780B1CCE: removed
> Mar 20 18:10:56 pbx postfix/qmgr[12846]: CEA6180B1CCB: from=<[email protected]>, size=573, nrcpt=1 (queue active)
> Mar 20 18:10:56 pbx postfix/smtp[13780]: CEA6180B1CCB: to=<[email protected]>, relay=smtp.office365.com[52.97.133.130]:587, delay=380, delays=380/0.02/0.25/0.2, dsn=2.0.0, status=sent (250 2.0.0 OK <[email protected]> [Hostname=LOYP123MB3184.GBRP123.PROD.OUTLOOK.COM])
> Mar 20 18:10:56 pbx postfix/qmgr[12846]: CEA6180B1CCB: removed

This is from the maillog, to me it looks like just the test messges from the debug

Just done another test voicemail as i couldn’t see anything in the logs. I think this is telling us whats going on.

> 
> Mar 20 18:35:14 pbx postfix/pickup[12845]: 5911780B1CC9: uid=995 from=<asterisk>
> Mar 20 18:35:14 pbx postfix/cleanup[16931]: 5911780B1CC9: message-id=<[email protected]>
> Mar 20 18:35:14 pbx postfix/qmgr[12846]: 5911780B1CC9: from=<[email protected]>, size=121993, nrcpt=1 (queue active)
> Mar 20 18:35:14 pbx postfix/smtp[16934]: connect to smtp.office365.com[2603:1026:c06:23::2]:587: Network is unreachable
> Mar 20 18:35:14 pbx postfix/smtp[16934]: connect to smtp.office365.com[2603:1026:c06:29::2]:587: Network is unreachable
> Mar 20 18:35:14 pbx postfix/smtp[16934]: 5911780B1CC9: to=<[email protected]>, relay=smtp.office365.com[40.100.174.2]:587, delay=0.61, delays=0.02/0.01/0.27/0.32, dsn=5.2.0, status=bounced (host smtp.office365.com[40.100.174.2] said: 554 5.2.0 STOREDRV.Submission.Exception:SendAsDeniedException.MapiExceptionSendAsDenied; Failed to process message due to a permanent exception with message Cannot submit message. 0.35250:7D030000, 1.36674:0A000000, 1.61250:00000000, 1.45378:02000000, 1.44866:71270000, 1.36674:0E000000, 1.61250:00000000, 1.45378:76270000, 1.44866:54020000, 16.55847:02120000, 17.43559:0000000024020000000000000000000000000000, 20.52176:140F138B1000F01F00000000, 20.50032:140F138B8017F01F0A00E480, 0.35180:140F138B, 255.23226:0A000000, 255.27962:0A000000, 255.27962:0E000000, 255.31418:D8050000, 0.35250:0A00EA35, 1.36674:0A000000, 1.61250:00000000, 1.45378:02000000, 1.44866:4C000000, 1.36674:32000000, 1.61250:00000000, 1.45378:51000000, 1.44866:01000000, 16.55847:B8000000, 17.43559:0000000080030000000000000100000000000000, 20.52176:140F138B1000101053000000, 20.50032:140F138B80170000674A0000, 0.35180:58000000, 255.23226:4800D13D, 255.27962:0A000000, 255.27962:32000000, 255.17082:DC040000, 0.27745:714A0000, 4.21921:DC040000, 255.27962:FA000000, 255.1494:764A0000, 0.38698:00000000, 0.37692:01000000, 0.37948:20000100, 5.33852:00000000534D545000000100, 7.36354:010000000000010920000100, 4.56248:DC040000, 7.40748:010000000000010B3A336133, 7.57132:00000000000000003937362D, 1.63016:32000000, 4.39640:DC040000, 8.45434:B33B4635D00A4149A8A780A3B720F95B3937362D, 5.10786:0000000031352E32302E323833352E3031363A4C4F59503132334D42333138343A33613330336431342D303439332D343937362D626138352D31653966333532396633313700201000000000, 7.51330:4ECE7B6EFDCCD70818000000, 0.39570:00000000, 1.55954:0A000000, 0.48754:02000000, 0.40818:00000000, 0.56946:80000000, 1.33010:0A000000, 2.54258:00000000, 0.40002:00000000, 1.56562:00000000, 1.64146:32000000, 1.33010:32000000, 2.54258:DC040000, 255.1750:34450000, 255.314
> Mar 20 18:35:14 pbx postfix/cleanup[16931]: EF36380B1CCF: message-id=<[email protected]>
> Mar 20 18:35:14 pbx postfix/bounce[16945]: 5911780B1CC9: sender non-delivery notification: EF36380B1CCF
> Mar 20 18:35:14 pbx postfix/qmgr[12846]: EF36380B1CCF: from=<>, size=7022, nrcpt=1 (queue active)
> Mar 20 18:35:14 pbx postfix/qmgr[12846]: 5911780B1CC9: removed

> Mar 20 18:07:58 pbx postfix/smtp[12958]: connect to smtp.office365.com[2603:1026:500:3d::2]:587: Network is unreachable

Take a look at the log…its saying it right there

it was the lines afterwards saying status 200 sent that threw me off. i was thinking it was the same send.

It’s still odd that it’s fine for test messages but not the actual voicemail one.

red herring - thats not the stoppage , ran that one down once

Thats IPV6 (and microsoft office365)

Chase these, should be good.
This is what a typical 365 logfile would look like

Mar 20 15:17:32 pbx02 postfix/pickup[54104]: 285F416373D: uid=499 from=<asterisk>
Mar 20 15:17:32 pbx02 postfix/cleanup[59591]: 285F416373D: message-id=<[email protected]>
Mar 20 15:17:32 pbx02 postfix/qmgr[1466]: 285F416373D: from=<[email protected]>, size=945914, nrcpt=1 (queue active)
Mar 20 15:17:32 pbx02 postfix/smtp[59594]: certificate verification failed for 10.1.100.79[10.1.100.79]:25: untrusted issuer /DC=INC/DC=COMPANY/CN=COMPANY-RootCA
Mar 20 15:17:32 pbx02 postfix/smtp[59594]: 285F416373D: to=<[email protected]>, relay=10.1.100.79[10.1.100.79]:25, delay=0.43, delays=0.12/0.18/0.02/0.1, dsn=2.6.0, status=sent (250 2.6.0  <[email protected]> Queued mail for delivery)
Mar 20 15:17:32 pbx02 postfix/qmgr[1466]: 285F416373D: removed

The last two installs we’ve done the “Office 365” option has NOT worked. We’ve had to setup for Office 365-based email using the Other option.

Hostname: host.domain.com (change to match your install. We make sure there is an A or C for this that corresponds to the source IP
Origin: domain.com
My Domain: domain.com
SMTP: smtp.office365.com:25
Use Auth
Use TLS
Allow Plaintext
UN and PW are for a valid mailbox on the O365 platform. We set one up for the phone systems to use exclusively.

Almost forgot. Disable IPv6 for Postfix:

Add the following to the end of /etc/postfix/main.cf
smtp_generic_maps = hash:/etc/postfix/generic
and
inet_protocols = ipv4

1 Like

best bet with office 365 is to use direct send

you may need to whitelist the IP but the mail logs will tell you if thats the case

its essentially looking at your fist MX and relaying mail via that host , caveat is mail can only be sent to other users of the domain … ie if office 365 email domain is abc.com you cant email anyone at xyz.com

see details here https://docs.microsoft.com/en-us/exchange/mail-flow-best-practices/how-to-set-up-a-multifunction-device-or-application-to-send-email-using-office-3

( option 2 specifically )

Agree with Chris on direct send, however, you should be able to send to send to addresses outside your tenancy via that method; O365 doesn’t see it any different than a copier or any other authenticated client.

Is there anything related to fax service? If yes, I would like to try it.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.