TUTORIAL Exchange 2013 UM with PIAF

rjaiswal

Active Member
Joined
May 24, 2013
Messages
438
Reaction score
58
Hello all,

After learning so much from this site, I thought I'd give a little back. I've scoured the interwebs, looking for tutorials that would allow me to hookup asterisk to Exchange UM. I had it running fairly reliably on my PiaF purple install, but that crashed and burned. So, I decided to setup Exchange 2013 and PiaF Green. This is what I needed to do get it to work. Credit goes to all authors of the various blogs and forum posts. This is NOT for the faint of heart. One needs the ability to figure out gremlins, and such when setting this up. These instructions worked for me, and they could, very well, work for you. I will try to look at the thread once a day to answer questions, however, I do have to make a living, so please be patient with me in responding. :)

First off, you need to tell Asterisk to use TCP in addition to UDP for SIP communication. Micro$oft, in their infinite wisdom, decided to only allow TCP SIP communication on all of their Unified Communications applications, which includes Exchange. To do this, you need to add 2 fields to the "Other SIP Settings" area of the "Asterisk SIP Settings" Menu.

After adding the 2 fields, enter the following settings to enable TCP communication:

Code:
tcpenable=yes
tcpbindaddr=0.0.0.0

Once that is completed, the next step is to configure a Trunk that will be used to communicate between Exchange and PiaF (For Exchange 2013, you need to create 2 Trunks one that uses Port 5065, and one that uses Port 5067)

Code:
General Settings
 
Trunk Name: ToExchange 
 
Outgoing Settings
 
Trunk Name:ToExchange 
PEER Details:
host=xxx.xxx.xxx.xxx (IP Address of Exchange Server)
type=friend
insecure=very
transport=tcp
port=5065  (For Exchange 2013 create a 2nd Trunk with Port 5067)
context=from-internal
qualify=yes

Now, we need to create an outbound route so that we can allow internal communication between Asterisk And Exchange. This is what needs to be added to the Outbound Route. For your trunk sequence, only add the newly created trunk that we just made. (For Exchange 2013, you would also add the 2nd trunk.)
Code:
Route Settings
 
Route Name: ToExchangeVM 
Route Type:  Intra-Company CHECKED
Music On Hold Default 
Time Group: Permanent Route 
Route Position: No Change
Additional Settings
 
 
Dial Patterns that will use this Route?
 
401
402
999
 
 
Trunk Sequence for Matched Routes?
 
0      Exchange Trunk
1      2nd Exchange Trunk, if using Exchange 2013
2

My Dial Patterns might look weird, but it's normal for this route. You need to enter every IVR, that you've configured in Exchange as a separate dial pattern. You also need to create a Misc Destination for EVERY Exchange hosted IVR as well as the "pilot identifier" to access voicemail. The default is 999. In my example I use 999 to access voicemail, 401 to access my first IVR, and 402 to access my second IVR.

Configure Asterisk to Forward Calls to Exchange Unified Messaging for Voicemail

Asterisk defaults to forwarding calls to its own voicemail extensions and so edits need to be made to the extensions.conf ( or linked files if using FreePBX) to route calls to the Exchange Server for voicemail.

Since we are using FreePBX, we need to edit /etc/asterisk/extensions_override_freepbx.conf.
The next section is copied from a blog post from Brian Reid, of C7 Solutions.

The first change is to copy the [macro-vm] section from /etc/asterisk/extensions_additional.conf into /etc/asterisk/extensions_override_freepbx.conf. [macro-vm] is approx 150 lines long and ends with “;--== end of [macro-vm] ==--;”.

Then we need to make some changes and additions to the macro-vm section. The first set of changes will comment out the code the directs calls to Asterisk voicemail and the additional lines will dial the Exchange Server trunks and add SIP Diversion headers so that Exchange knows which mailbox to answer the call for.

So first, locate the following lines and comment them out. The numbers in brackets at the start are the approx. location in extensions_override_freepbx.conf where you will find the line:

Code:
(86) exten => s-BUSY,n,VoiceMail(${MEXTEN}@${VMCONTEXT},${VM_OPTS}b${VMGAIN})
(92) exten => s-NOMESSAGE,n,VoiceMail(${MEXTEN}@${VMCONTEXT},s${VM_OPTS}${VMGAIN})
(97) exten => s-DIRECTDIAL,n,VoiceMail(${MEXTEN}@${VMCONTEXT},${VM_OPTS}${VM_DDTYPE}${VMGAIN})

Each of the above lines can be commented out by placing a semi-colon (;) at the start of the line.

Return to the s-BUSY block (starting at line 84) and add the following after the line that you just commented out:

Code:
exten => s-BUSY,n,SIPAddHeader(Diversion:<tel:${MEXTEN}>\;reason=no-answer\;screen=no\;privacy=off)
exten => s-BUSY,n,Dial(SIP/xxxx&SIP/yyyy) /* xxxx/yyyy here are the two trunk names, one for each TCP listening port */
exten => s-BUSY,n,Hangup

This code adds the Diversion header to read tel:extension. Note that the tel:ext block is surrounded by greater and less than signed (triangle brackets if you will) which have a habit of not being displayed on web pages.

Also note that you need to use the names of your trunk (or 2 trunks if using Exchange 2013) connecting to Exchange. The Dial() command tells Asterisk to dial both trunks at the same time and direct the call to whichever answers first. Therefore if Exchange is listening on 5065 or 5067 the connection will work. I used ToExchangeUM5065 and ToExchangeUM5067 in my lab. Then I replace xxxx with ToExchangeUM5065 and yyyy with ToExchangeUM5067.

The s-NOMESSAGE block (at line 92) needs the following added after the line that has been commented out:
Code:
exten => s-NOMESSAGE,n,SIPAddHeader(Diversion:<tel:${MEXTEN}>\;reason=no-answer\;screen=no\;privacy=off)
exten => s-NOMESSAGE,n,Dial(SIP/xxxx&SIP/yyyy) /* xxxx/yyyy here are the two trunk names, one for each TCP listening port */
exten => s-NOMESSAGE,n,Hangup

Again, change xxxx and yyyy for your two different trunk names that you create in the next part of this blog and make sure that the Diversion:<tel:ext> header includes triangle brackets around tel:ext.

Next you need to do the same for the s-DIRECTDIAL block:
Code:
exten => s-DIRECTDIAL,n,SIPAddHeader(Diversion:<tel:${MEXTEN}>\;reason=no-answer\;screen=no\;privacy=off)
exten => s-DIRECTDIAL,n,Dial(SIP/xxxx&SIP/yyyy) /* xxxx/yyyy here are the two trunk names, one for each TCP listening port */
exten => s-DIRECTDIAL,n,Hangup

As you can see, the three blocks of inserted code are all the same apart from the s-WORD value at the start of each.

One block of code is missing through from the FreePBX defaults. If you call an extension and it is busy Asterisk runs the code starting s-BUSY, but if the call is ignored then Asterisk attempts to find and run code starting s-NOANSWER and as this is missing it will route ignored calls to Asterisk voicemail. To route ignored calls to Exchange Server add the following block of text:

Code:
exten => s-NOANSWER,1,Noop(NOANSWER voicemail - Exchange UM)
exten => s-NOANSWER,n,Macro(get-vmcontext,${MEXTEN})
exten => s-NOANSWER,n,SIPAddHeader(Diversion:<tel:${MEXTEN}>\;reason=no-answer\;screen=no\;privacy=off)
exten => s-NOANSWER,n,Dial(SIP/xxxx&SIP/yyyy) /* xxxx/yyyy here are the two trunk names, one for each TCP listening port */
exten => s-NOANSWER,n,Hangup
exten => s-NOANSWER,n,Goto(exit-${VMSTATUS},1)

This new block is again a copy of s-BUSY (or the other two) and just the s-WORD bit changed to s-NOANSWER. For completion the Noop line (line 1 above) is also changed to NOANSWER so that the correct text is written to the Asterisk console and log files.

No other changes are needed in extensions_override_freepbx.conf. So save the file and restart Asterisk by using amportal restart from the console.







This is all that is needed to get Asterisk to talk to Exchange. For creating the Exchange dial plan I would recommend reading Brian's blog on creating and Exchange UM Lab. He goes into great detail in explaining everything. Here is the link to the blog:

http://blog.c7solutions.com/2012/07/building-exchange-unified-messaging-lab.html
 

rjaiswal

Active Member
Joined
May 24, 2013
Messages
438
Reaction score
58
I forgot to add that MWI will not work. Please don't expect it...
 

rjaiswal

Active Member
Joined
May 24, 2013
Messages
438
Reaction score
58
One last thing, in order for me use the default vm code *97 and *98, to access exchange vm, I disabled them in the features code list, and created misc applications pointing *97 and *98 to 999.
 

tbrummell

Guru
Joined
Jan 8, 2011
Messages
1,275
Reaction score
339
So I've been wanting to set up Exchange UM for a long time now, and I finally got hardware to do it on. I'm using Exchange 2010 and follwed yours, and other turtorials around. I have Exchange answering and voicemail working with 1 issue (so far). If the extension is *not* logged in, I end up in Asterisk voicemail, here is a sanitized log of the call:
Code:
    -- Executing [s@im-mygmailgmailcom:1] NoOp("Motif/+1613799XXXX-fcb8", "Receiving GoogleVoice on DID: 315908XXXX") in new stack
    -- Executing [s@im-mygmailgmailcom:2] NoOp("Motif/+1613799XXXX-fcb8", "s") in new stack
    -- Executing [s@im-mygmailgmailcom:3] Set("Motif/+1613799XXXX-fcb8", "CALLERID(name)=+1613799XXXX") in new stack
    -- Executing [s@im-mygmailgmailcom:4] GotoIf("Motif/+1613799XXXX-fcb8", "0?nextstop") in new stack
    -- Executing [s@im-mygmailgmailcom:5] Set("Motif/+1613799XXXX-fcb8", "CALLERID(name)=613799XXXX") in new stack
    -- Executing [s@im-mygmailgmailcom:6] GotoIf("Motif/+1613799XXXX-fcb8", "1?notrim") in new stack
    -- Goto (im-mygmailgmailcom,s,8)
    -- Executing [s@im-mygmailgmailcom:8] Set("Motif/+1613799XXXX-fcb8", "CALLERID(number)=613799XXXX") in new stack
    -- Executing [s@im-mygmailgmailcom:9] Wait("Motif/+1613799XXXX-fcb8", "1") in new stack
    -- Executing [s@im-mygmailgmailcom:10] Answer("Motif/+1613799XXXX-fcb8", "") in new stack
       > 0x7f35a002c4f0 -- Probation passed - setting RTP source address to 74.125.142.127:19305
    -- Executing [s@im-mygmailgmailcom:11] SendDTMF("Motif/+1613799XXXX-fcb8", "1") in new stack
    -- Executing [s@im-mygmailgmailcom:12] Goto("Motif/+1613799XXXX-fcb8", "from-trunk,315908XXXX,1") in new stack
    -- Goto (from-trunk,315908XXXX,1)
    -- Executing [315908XXXX@from-trunk:1] NoOp("Motif/+1613799XXXX-fcb8", "Catch-All DID Match - Found 315908XXXX - You probably want a DID for this.") in new stack
    -- Executing [315908XXXX@from-trunk:2] Set("Motif/+1613799XXXX-fcb8", "__FROM_DID=315908XXXX") in new stack
    -- Executing [315908XXXX@from-trunk:3] Goto("Motif/+1613799XXXX-fcb8", "ext-did,s,1") in new stack
    -- Goto (ext-did,s,1)
    -- Executing [s@ext-did:1] ExecIf("Motif/+1613799XXXX-fcb8", "0?Set(__FROM_DID=s)") in new stack
    -- Executing [s@ext-did:2] Gosub("Motif/+1613799XXXX-fcb8", "app-blacklist-check,s,1()") in new stack
    -- Executing [s@app-blacklist-check:1] GotoIf("Motif/+1613799XXXX-fcb8", "0?blacklisted") in new stack
    -- Executing [s@app-blacklist-check:2] Set("Motif/+1613799XXXX-fcb8", "CALLED_BLACKLIST=1") in new stack
    -- Executing [s@app-blacklist-check:3] Return("Motif/+1613799XXXX-fcb8", "") in new stack
    -- Executing [s@ext-did:3] Set("Motif/+1613799XXXX-fcb8", "CDR(did)=315908XXXX") in new stack
    -- Executing [s@ext-did:4] ExecIf("Motif/+1613799XXXX-fcb8", "0 ?Set(CALLERID(name)=613799XXXX)") in new stack
    -- Executing [s@ext-did:5] Macro("Motif/+1613799XXXX-fcb8", "privacy-mgr,3,10") in new stack
    -- Executing [s@macro-privacy-mgr:1] Set("Motif/+1613799XXXX-fcb8", "KEEPCID=613799XXXX") in new stack
    -- Executing [s@macro-privacy-mgr:2] Set("Motif/+1613799XXXX-fcb8", "TESTCID=613799XXXX.000000") in new stack
    -- Executing [s@macro-privacy-mgr:3] ExecIf("Motif/+1613799XXXX-fcb8", "0?Set(CALLERID(num)=)") in new stack
    -- Executing [s@macro-privacy-mgr:4] PrivacyManager("Motif/+1613799XXXX-fcb8", "3,10") in new stack
    -- CallerID number present: Skipping
    -- Executing [s@macro-privacy-mgr:5] GotoIf("Motif/+1613799XXXX-fcb8", "0?fail") in new stack
    -- Executing [s@macro-privacy-mgr:6] GosubIf("Motif/+1613799XXXX-fcb8", "1?app-blacklist-check,s,1()") in new stack
    -- Executing [s@app-blacklist-check:1] GotoIf("Motif/+1613799XXXX-fcb8", "0?blacklisted") in new stack
    -- Executing [s@app-blacklist-check:2] Set("Motif/+1613799XXXX-fcb8", "CALLED_BLACKLIST=1") in new stack
    -- Executing [s@app-blacklist-check:3] Return("Motif/+1613799XXXX-fcb8", "") in new stack
    -- Executing [s@macro-privacy-mgr:7] Set("Motif/+1613799XXXX-fcb8", "CALLERID(num-pres)=allowed_passed_screen") in new stack
    -- Executing [s@macro-privacy-mgr:8] MacroExit("Motif/+1613799XXXX-fcb8", "") in new stack
    -- Executing [s@ext-did:6] Set("Motif/+1613799XXXX-fcb8", "FAX_DEST=custom-fax-iaxmodem^s^1") in new stack
    -- Executing [s@ext-did:7] Answer("Motif/+1613799XXXX-fcb8", "") in new stack
    -- Executing [s@ext-did:8] Wait("Motif/+1613799XXXX-fcb8", "2") in new stack
    -- Executing [s@ext-did:9] Goto("Motif/+1613799XXXX-fcb8", "from-did-direct,221,1") in new stack
    -- Goto (from-did-direct,221,1)
    -- Executing [221@from-did-direct:1] Set("Motif/+1613799XXXX-fcb8", "__RINGTIMER=15") in new stack
    -- Executing [221@from-did-direct:2] Macro("Motif/+1613799XXXX-fcb8", "exten-vm,221,221,0,0,0") in new stack
    -- Executing [s@macro-exten-vm:1] Macro("Motif/+1613799XXXX-fcb8", "user-callerid,") in new stack
    -- Executing [s@macro-user-callerid:1] Set("Motif/+1613799XXXX-fcb8", "TOUCH_MONITOR=1380823956.24") in new stack
    -- Executing [s@macro-user-callerid:2] Set("Motif/+1613799XXXX-fcb8", "AMPUSER=613799XXXX") in new stack
    -- Executing [s@macro-user-callerid:3] GotoIf("Motif/+1613799XXXX-fcb8", "0?report") in new stack
    -- Executing [s@macro-user-callerid:4] ExecIf("Motif/+1613799XXXX-fcb8", "1?Set(REALCALLERIDNUM=613799XXXX)") in new stack
    -- Executing [s@macro-user-callerid:5] Set("Motif/+1613799XXXX-fcb8", "AMPUSER=") in new stack
    -- Executing [s@macro-user-callerid:6] Set("Motif/+1613799XXXX-fcb8", "AMPUSERCIDNAME=") in new stack
    -- Executing [s@macro-user-callerid:7] GotoIf("Motif/+1613799XXXX-fcb8", "1?report") in new stack
    -- Goto (macro-user-callerid,s,14)
    -- Executing [s@macro-user-callerid:14] GotoIf("Motif/+1613799XXXX-fcb8", "0?continue") in new stack
    -- Executing [s@macro-user-callerid:15] Set("Motif/+1613799XXXX-fcb8", "__TTL=64") in new stack
    -- Executing [s@macro-user-callerid:16] GotoIf("Motif/+1613799XXXX-fcb8", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,27)
    -- Executing [s@macro-user-callerid:27] Set("Motif/+1613799XXXX-fcb8", "CALLERID(number)=613799XXXX") in new stack
    -- Executing [s@macro-user-callerid:28] Set("Motif/+1613799XXXX-fcb8", "CALLERID(name)=613799XXXX") in new stack
    -- Executing [s@macro-user-callerid:29] Set("Motif/+1613799XXXX-fcb8", "CDR(cnum)=613799XXXX") in new stack
    -- Executing [s@macro-user-callerid:30] Set("Motif/+1613799XXXX-fcb8", "CDR(cnam)=613799XXXX") in new stack
    -- Executing [s@macro-user-callerid:31] Set("Motif/+1613799XXXX-fcb8", "CHANNEL(language)=en") in new stack
    -- Executing [s@macro-exten-vm:2] Set("Motif/+1613799XXXX-fcb8", "RingGroupMethod=none") in new stack
    -- Executing [s@macro-exten-vm:3] Set("Motif/+1613799XXXX-fcb8", "__EXTTOCALL=221") in new stack
    -- Executing [s@macro-exten-vm:4] Set("Motif/+1613799XXXX-fcb8", "__PICKUPMARK=221") in new stack
    -- Executing [s@macro-exten-vm:5] Set("Motif/+1613799XXXX-fcb8", "RT=15") in new stack
    -- Executing [s@macro-exten-vm:6] Gosub("Motif/+1613799XXXX-fcb8", "sub-record-check,s,1(exten,221,)") in new stack
    -- Executing [s@sub-record-check:1] Set("Motif/+1613799XXXX-fcb8", "REC_POLICY_MODE_SAVE=") in new stack
...to be continued

I did follow the above, any reason it is not ending up in the ExchangeUM?

Note:
315908XXXX=my GVoice trunk
613799XXXX=my cell
 

tbrummell

Guru
Joined
Jan 8, 2011
Messages
1,275
Reaction score
339
The rest of the log....
Code:
    -- Executing [s@sub-record-check:2] GotoIf("Motif/+1613799XXXX-fcb8", "1?check") in new stack
    -- Goto (sub-record-check,s,7)
    -- Executing [s@sub-record-check:7] Set("Motif/+1613799XXXX-fcb8", "__MON_FMT=wav") in new stack
    -- Executing [s@sub-record-check:8] GotoIf("Motif/+1613799XXXX-fcb8", "1?next") in new stack
    -- Goto (sub-record-check,s,11)
    -- Executing [s@sub-record-check:11] ExecIf("Motif/+1613799XXXX-fcb8", "0?Return()") in new stack
    -- Executing [s@sub-record-check:12] ExecIf("Motif/+1613799XXXX-fcb8", "0?Set(__REC_POLICY_MODE=)") in new stack
    -- Executing [s@sub-record-check:13] GotoIf("Motif/+1613799XXXX-fcb8", "0?exten,1") in new stack
    -- Executing [s@sub-record-check:14] Set("Motif/+1613799XXXX-fcb8", "__REC_STATUS=INITIALIZED") in new stack
    -- Executing [s@sub-record-check:15] Set("Motif/+1613799XXXX-fcb8", "NOW=1380823960") in new stack
    -- Executing [s@sub-record-check:16] Set("Motif/+1613799XXXX-fcb8", "__DAY=03") in new stack
    -- Executing [s@sub-record-check:17] Set("Motif/+1613799XXXX-fcb8", "__MONTH=10") in new stack
    -- Executing [s@sub-record-check:18] Set("Motif/+1613799XXXX-fcb8", "__YEAR=2013") in new stack
    -- Executing [s@sub-record-check:19] Set("Motif/+1613799XXXX-fcb8", "__TIMESTR=20131003-141240") in new stack
    -- Executing [s@sub-record-check:20] Set("Motif/+1613799XXXX-fcb8", "__FROMEXTEN=613799XXXX") in new stack
    -- Executing [s@sub-record-check:21] Set("Motif/+1613799XXXX-fcb8", "__CALLFILENAME=exten-221-613799XXXX-20131003-141240-1380823956.24") in new stack
    -- Executing [s@sub-record-check:22] Goto("Motif/+1613799XXXX-fcb8", "exten,1") in new stack
    -- Goto (sub-record-check,exten,1)
    -- Executing [exten@sub-record-check:1] GotoIf("Motif/+1613799XXXX-fcb8", "0?callee") in new stack
    -- Executing [exten@sub-record-check:2] Set("Motif/+1613799XXXX-fcb8", "__REC_POLICY_MODE=always") in new stack
    -- Executing [exten@sub-record-check:3] GotoIf("Motif/+1613799XXXX-fcb8", "0?caller") in new stack
    -- Executing [exten@sub-record-check:4] GotoIf("Motif/+1613799XXXX-fcb8", "1?callee") in new stack
    -- Goto (sub-record-check,exten,8)
    -- Executing [exten@sub-record-check:8] GosubIf("Motif/+1613799XXXX-fcb8", "1?record,1(exten,221,613799XXXX)") in new stack
    -- Executing [record@sub-record-check:1] Set("Motif/+1613799XXXX-fcb8", "AUDIOHOOK_INHERIT(MixMonitor)=yes") in new stack
    -- Executing [record@sub-record-check:2] MixMonitor("Motif/+1613799XXXX-fcb8", "2013/10/03/exten-221-613799XXXX-20131003-141240-1380823956.24.wav,,") in new stack
    -- Executing [record@sub-record-check:3] Set("Motif/+1613799XXXX-fcb8", "__REC_STATUS=RECORDING") in new stack
    -- Executing [record@sub-record-check:4] Set("Motif/+1613799XXXX-fcb8", "CDR(recordingfile)=exten-221-613799XXXX-20131003-141240-1380823956.24.wav") in new stack
    -- Executing [record@sub-record-check:5] Return("Motif/+1613799XXXX-fcb8", "") in new stack
    -- Executing [exten@sub-record-check:9] Return("Motif/+1613799XXXX-fcb8", "") in new stack
  == Begin MixMonitor Recording Motif/+1613799XXXX-fcb8
    -- Executing [s@macro-exten-vm:7] GotoIf("Motif/+1613799XXXX-fcb8", "1?macrodial") in new stack
    -- Goto (macro-exten-vm,s,13)
    -- Executing [s@macro-exten-vm:13] GosubIf("Motif/+1613799XXXX-fcb8", "0?clrheader,1()") in new stack
    -- Executing [s@macro-exten-vm:14] Macro("Motif/+1613799XXXX-fcb8", "dial-one,15,Ttr,221") in new stack
    -- Executing [s@macro-dial-one:1] Set("Motif/+1613799XXXX-fcb8", "DEXTEN=221") in new stack
    -- Executing [s@macro-dial-one:2] Set("Motif/+1613799XXXX-fcb8", "DIALSTATUS_CW=") in new stack
    -- Executing [s@macro-dial-one:3] GosubIf("Motif/+1613799XXXX-fcb8", "0?screen,1()") in new stack
    -- Executing [s@macro-dial-one:4] GosubIf("Motif/+1613799XXXX-fcb8", "0?cf,1()") in new stack
    -- Executing [s@macro-dial-one:5] GotoIf("Motif/+1613799XXXX-fcb8", "1?skip1") in new stack
    -- Goto (macro-dial-one,s,8)
    -- Executing [s@macro-dial-one:8] GotoIf("Motif/+1613799XXXX-fcb8", "0?nodial") in new stack
    -- Executing [s@macro-dial-one:9] GotoIf("Motif/+1613799XXXX-fcb8", "0?continue") in new stack
    -- Executing [s@macro-dial-one:10] Set("Motif/+1613799XXXX-fcb8", "EXTHASCW=ENABLED") in new stack
    -- Executing [s@macro-dial-one:11] GotoIf("Motif/+1613799XXXX-fcb8", "0?next1:cwinusebusy") in new stack
    -- Goto (macro-dial-one,s,23)
    -- Executing [s@macro-dial-one:23] GotoIf("Motif/+1613799XXXX-fcb8", "1?next3:continue") in new stack
    -- Goto (macro-dial-one,s,24)
    -- Executing [s@macro-dial-one:24] ExecIf("Motif/+1613799XXXX-fcb8", "0?Set(DIALSTATUS_CW=BUSY)") in new stack
    -- Executing [s@macro-dial-one:25] GotoIf("Motif/+1613799XXXX-fcb8", "0?nodial") in new stack
    -- Executing [s@macro-dial-one:26] GosubIf("Motif/+1613799XXXX-fcb8", "1?dstring,1():dlocal,1()") in new stack
    -- Executing [dstring@macro-dial-one:1] Set("Motif/+1613799XXXX-fcb8", "DSTRING=") in new stack
    -- Executing [dstring@macro-dial-one:2] Set("Motif/+1613799XXXX-fcb8", "DEVICES=221") in new stack
    -- Executing [dstring@macro-dial-one:3] ExecIf("Motif/+1613799XXXX-fcb8", "0?Return()") in new stack
    -- Executing [dstring@macro-dial-one:4] ExecIf("Motif/+1613799XXXX-fcb8", "0?Set(DEVICES=21)") in new stack
    -- Executing [dstring@macro-dial-one:5] Set("Motif/+1613799XXXX-fcb8", "LOOPCNT=1") in new stack
    -- Executing [dstring@macro-dial-one:6] Set("Motif/+1613799XXXX-fcb8", "ITER=1") in new stack
    -- Executing [dstring@macro-dial-one:7] Set("Motif/+1613799XXXX-fcb8", "THISDIAL=IAX2/221") in new stack
    -- Executing [dstring@macro-dial-one:8] GosubIf("Motif/+1613799XXXX-fcb8", "1?zap2dahdi,1()") in new stack
    -- Executing [zap2dahdi@macro-dial-one:1] ExecIf("Motif/+1613799XXXX-fcb8", "0?Return()") in new stack
    -- Executing [zap2dahdi@macro-dial-one:2] Set("Motif/+1613799XXXX-fcb8", "NEWDIAL=") in new stack
    -- Executing [zap2dahdi@macro-dial-one:3] Set("Motif/+1613799XXXX-fcb8", "LOOPCNT2=1") in new stack
    -- Executing [zap2dahdi@macro-dial-one:4] Set("Motif/+1613799XXXX-fcb8", "ITER2=1") in new stack
    -- Executing [zap2dahdi@macro-dial-one:5] Set("Motif/+1613799XXXX-fcb8", "THISPART2=IAX2/221") in new stack
    -- Executing [zap2dahdi@macro-dial-one:6] ExecIf("Motif/+1613799XXXX-fcb8", "0?Set(THISPART2=DAHDI2/221)") in new stack
    -- Executing [zap2dahdi@macro-dial-one:7] Set("Motif/+1613799XXXX-fcb8", "NEWDIAL=IAX2/221&") in new stack
    -- Executing [zap2dahdi@macro-dial-one:8] Set("Motif/+1613799XXXX-fcb8", "ITER2=2") in new stack
    -- Executing [zap2dahdi@macro-dial-one:9] GotoIf("Motif/+1613799XXXX-fcb8", "0?begin2") in new stack
    -- Executing [zap2dahdi@macro-dial-one:10] Set("Motif/+1613799XXXX-fcb8", "THISDIAL=IAX2/221") in new stack
....to be continued
 

tbrummell

Guru
Joined
Jan 8, 2011
Messages
1,275
Reaction score
339
And the end...stupid character limits.
Code:
    -- Executing [zap2dahdi@macro-dial-one:11] Return("Motif/+1613799XXXX-fcb8", "") in new stack
    -- Executing [dstring@macro-dial-one:9] Set("Motif/+1613799XXXX-fcb8", "DSTRING=IAX2/221&") in new stack
    -- Executing [dstring@macro-dial-one:10] Set("Motif/+1613799XXXX-fcb8", "ITER=2") in new stack
    -- Executing [dstring@macro-dial-one:11] GotoIf("Motif/+1613799XXXX-fcb8", "0?begin") in new stack
    -- Executing [dstring@macro-dial-one:12] Set("Motif/+1613799XXXX-fcb8", "DSTRING=IAX2/221") in new stack
    -- Executing [dstring@macro-dial-one:13] Return("Motif/+1613799XXXX-fcb8", "") in new stack
    -- Executing [s@macro-dial-one:27] GotoIf("Motif/+1613799XXXX-fcb8", "0?nodial") in new stack
    -- Executing [s@macro-dial-one:28] GotoIf("Motif/+1613799XXXX-fcb8", "0?skiptrace") in new stack
    -- Executing [s@macro-dial-one:29] GosubIf("Motif/+1613799XXXX-fcb8", "1?ctset,1():ctclear,1()") in new stack
    -- Executing [ctset@macro-dial-one:1] Set("Motif/+1613799XXXX-fcb8", "DB(CALLTRACE/221)=613799XXXX") in new stack
    -- Executing [ctset@macro-dial-one:2] Return("Motif/+1613799XXXX-fcb8", "") in new stack
    -- Executing [s@macro-dial-one:30] Set("Motif/+1613799XXXX-fcb8", "D_OPTIONS=Ttr") in new stack
    -- Executing [s@macro-dial-one:31] ExecIf("Motif/+1613799XXXX-fcb8", "0?SIPAddHeader(Alert-Info: )") in new stack
    -- Executing [s@macro-dial-one:32] ExecIf("Motif/+1613799XXXX-fcb8", "0?SIPAddHeader()") in new stack
    -- Executing [s@macro-dial-one:33] ExecIf("Motif/+1613799XXXX-fcb8", "0?Set(CHANNEL(musicclass)=)") in new stack
    -- Executing [s@macro-dial-one:34] GosubIf("Motif/+1613799XXXX-fcb8", "0?qwait,1()") in new stack
    -- Executing [s@macro-dial-one:35] Set("Motif/+1613799XXXX-fcb8", "__CWIGNORE=") in new stack
    -- Executing [s@macro-dial-one:36] Set("Motif/+1613799XXXX-fcb8", "__KEEPCID=TRUE") in new stack
    -- Executing [s@macro-dial-one:37] GotoIf("Motif/+1613799XXXX-fcb8", "0?usegoto,1") in new stack
    -- Executing [s@macro-dial-one:38] GotoIf("Motif/+1613799XXXX-fcb8", "1?godial") in new stack
    -- Goto (macro-dial-one,s,42)
    -- Executing [s@macro-dial-one:42] Dial("Motif/+1613799XXXX-fcb8", "IAX2/221,15,Ttr") in new stack
[2013-10-03 14:12:40] WARNING[10878][C-0000000c]: app_dial.c:2437 dial_exec_full: Unable to create channel of type 'IAX2' (cause 20 - Subscriber absent)
  == Everyone is busy/congested at this time (1:0/0/1)
    -- Executing [s@macro-dial-one:43] ExecIf("Motif/+1613799XXXX-fcb8", "0?MacroExit()") in new stack
    -- Executing [s@macro-dial-one:44] ExecIf("Motif/+1613799XXXX-fcb8", "0?Set(DIALSTATUS=)") in new stack
    -- Executing [s@macro-dial-one:45] GosubIf("Motif/+1613799XXXX-fcb8", "0?s-CHANUNAVAIL,1()") in new stack
    -- Executing [s@macro-dial-one:46] MacroExit("Motif/+1613799XXXX-fcb8", "") in new stack
    -- Executing [s@macro-exten-vm:15] Set("Motif/+1613799XXXX-fcb8", "SV_DIALSTATUS=CHANUNAVAIL") in new stack
    -- Executing [s@macro-exten-vm:16] GosubIf("Motif/+1613799XXXX-fcb8", "0?docfu,1()") in new stack
    -- Executing [s@macro-exten-vm:17] GosubIf("Motif/+1613799XXXX-fcb8", "0?docfb,1()") in new stack
    -- Executing [s@macro-exten-vm:18] Set("Motif/+1613799XXXX-fcb8", "DIALSTATUS=CHANUNAVAIL") in new stack
    -- Executing [s@macro-exten-vm:19] ExecIf("Motif/+1613799XXXX-fcb8", "0?MacroExit()") in new stack
    -- Executing [s@macro-exten-vm:20] GotoIf("Motif/+1613799XXXX-fcb8", "0?s-CHANUNAVAIL,1") in new stack
    -- Executing [s@macro-exten-vm:21] Macro("Motif/+1613799XXXX-fcb8", "vm,221,CHANUNAVAIL,") in new stack
    -- Executing [s@macro-vm:1] Macro("Motif/+1613799XXXX-fcb8", "user-callerid,SKIPTTL") in new stack
    -- Executing [s@macro-user-callerid:1] Set("Motif/+1613799XXXX-fcb8", "TOUCH_MONITOR=1380823956.24") in new stack
    -- Executing [s@macro-user-callerid:2] Set("Motif/+1613799XXXX-fcb8", "AMPUSER=613799XXXX") in new stack
    -- Executing [s@macro-user-callerid:3] GotoIf("Motif/+1613799XXXX-fcb8", "0?report") in new stack
    -- Executing [s@macro-user-callerid:4] ExecIf("Motif/+1613799XXXX-fcb8", "0?Set(REALCALLERIDNUM=613799XXXX)") in new stack
    -- Executing [s@macro-user-callerid:5] Set("Motif/+1613799XXXX-fcb8", "AMPUSER=") in new stack
    -- Executing [s@macro-user-callerid:6] Set("Motif/+1613799XXXX-fcb8", "AMPUSERCIDNAME=") in new stack
    -- Executing [s@macro-user-callerid:7] GotoIf("Motif/+1613799XXXX-fcb8", "1?report") in new stack
    -- Goto (macro-user-callerid,s,14)
    -- Executing [s@macro-user-callerid:14] GotoIf("Motif/+1613799XXXX-fcb8", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,27)
    -- Executing [s@macro-user-callerid:27] Set("Motif/+1613799XXXX-fcb8", "CALLERID(number)=613799XXXX") in new stack
    -- Executing [s@macro-user-callerid:28] Set("Motif/+1613799XXXX-fcb8", "CALLERID(name)=613799XXXX") in new stack
    -- Executing [s@macro-user-callerid:29] Set("Motif/+1613799XXXX-fcb8", "CDR(cnum)=613799XXXX") in new stack
    -- Executing [s@macro-user-callerid:30] Set("Motif/+1613799XXXX-fcb8", "CDR(cnam)=613799XXXX") in new stack
    -- Executing [s@macro-user-callerid:31] Set("Motif/+1613799XXXX-fcb8", "CHANNEL(language)=en") in new stack
    -- Executing [s@macro-vm:2] Set("Motif/+1613799XXXX-fcb8", "VMGAIN=") in new stack
    -- Executing [s@macro-vm:3] Macro("Motif/+1613799XXXX-fcb8", "blkvm-check,") in new stack
    -- Executing [s@macro-blkvm-check:1] Set("Motif/+1613799XXXX-fcb8", "GOSUB_RETVAL=") in new stack
    -- Executing [s@macro-blkvm-check:2] ExecIf("Motif/+1613799XXXX-fcb8", "0?Set(GOSUB_RETVAL=TRUE)") in new stack
    -- Executing [s@macro-blkvm-check:3] MacroExit("Motif/+1613799XXXX-fcb8", "") in new stack
    -- Executing [s@macro-vm:4] GotoIf("Motif/+1613799XXXX-fcb8", "1?vmx,1") in new stack
    -- Goto (macro-vm,vmx,1)
    -- Executing [vmx@macro-vm:1] Set("Motif/+1613799XXXX-fcb8", "MEXTEN=221") in new stack
    -- Executing [vmx@macro-vm:2] Set("Motif/+1613799XXXX-fcb8", "MMODE=CHANUNAVAIL") in new stack
    -- Executing [vmx@macro-vm:3] Set("Motif/+1613799XXXX-fcb8", "RETVM=") in new stack
    -- Executing [vmx@macro-vm:4] Set("Motif/+1613799XXXX-fcb8", "MODE=unavail") in new stack
    -- Executing [vmx@macro-vm:5] GotoIf("Motif/+1613799XXXX-fcb8", "1?chknomsg") in new stack
    -- Goto (macro-vm,vmx,7)
    -- Executing [vmx@macro-vm:7] GotoIf("Motif/+1613799XXXX-fcb8", "0?s-CHANUNAVAIL,1") in new stack
    -- Executing [vmx@macro-vm:8] GotoIf("Motif/+1613799XXXX-fcb8", "1?notdirect") in new stack
    -- Goto (macro-vm,vmx,10)
    -- Executing [vmx@macro-vm:10] NoOp("Motif/+1613799XXXX-fcb8", "Checking if ext 221 is enabled: ") in new stack
    -- Executing [vmx@macro-vm:11] GotoIf("Motif/+1613799XXXX-fcb8", "1?s-CHANUNAVAIL,1") in new stack
    -- Goto (macro-vm,s-CHANUNAVAIL,1)
    -- Executing [s-CHANUNAVAIL@macro-vm:1] Macro("Motif/+1613799XXXX-fcb8", "get-vmcontext,221") in new stack
    -- Executing [s@macro-get-vmcontext:1] Set("Motif/+1613799XXXX-fcb8", "VMCONTEXT=default") in new stack
    -- Executing [s@macro-get-vmcontext:2] GotoIf("Motif/+1613799XXXX-fcb8", "0?200:300") in new stack
    -- Goto (macro-get-vmcontext,s,300)
    -- Executing [s@macro-get-vmcontext:300] NoOp("Motif/+1613799XXXX-fcb8", "") in new stack
    -- Executing [s-CHANUNAVAIL@macro-vm:2] VoiceMail("Motif/+1613799XXXX-fcb8", "221@default,u") in new stack
    -- <Motif/+1613799XXXX-fcb8> Playing 'vm-theperson.gsm' (language 'en')
    -- <Motif/+1613799XXXX-fcb8> Playing 'digits/2.gsm' (language 'en')
    -- <Motif/+1613799XXXX-fcb8> Playing 'digits/2.gsm' (language 'en')
    -- <Motif/+1613799XXXX-fcb8> Playing 'digits/1.gsm' (language 'en')
    -- <Motif/+1613799XXXX-fcb8> Playing 'vm-isunavail.gsm' (language 'en')
  == Spawn extension (macro-vm, s-CHANUNAVAIL, 2) exited non-zero on 'Motif/+1613799XXXX-fcb8' in macro 'vm'
  == Spawn extension (macro-exten-vm, s, 21) exited non-zero on 'Motif/+1613799XXXX-fcb8' in macro 'exten-vm'
  == Spawn extension (from-did-direct, 221, 2) exited non-zero on 'Motif/+1613799XXXX-fcb8'
    -- Executing [h@from-did-direct:1] Macro("Motif/+1613799XXXX-fcb8", "hangupcall,") in new stack
    -- Executing [s@macro-hangupcall:1] GotoIf("Motif/+1613799XXXX-fcb8", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,3)
    -- Executing [s@macro-hangupcall:3] ExecIf("Motif/+1613799XXXX-fcb8", "0?Set(CDR(recordingfile)=)") in new stack
    -- Executing [s@macro-hangupcall:4] Hangup("Motif/+1613799XXXX-fcb8", "") in new stack
  == Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'Motif/+1613799XXXX-fcb8' in macro 'hangupcall'
  == Spawn extension (from-did-direct, h, 1) exited non-zero on 'Motif/+1613799XXXX-fcb8'
  == MixMonitor close filestream (mixed)
  == End MixMonitor Recording Motif/+1613799XXXX-fcb8
 

rjaiswal

Active Member
Joined
May 24, 2013
Messages
438
Reaction score
58
I was able to reproduce this error. It looks like the s-CHANUNAVAIL status is called by macro-dial-one and not by macro-vm, which we are overriding. In order for me to fix this, I inserted this code in the extensions_override_freepbx.conf under the exten => s-NOANSWER scripts
Code:
exten => s-CHANUNAVAIL,1,Noop(NOANSWER voicemail - Exchange UM)
exten => s-CHANUNAVAIL,n,Macro(get-vmcontext,${MEXTEN})
exten => s-CHANUNAVAIL,n,SIPAddHeader(Diversion:<tel:${MEXTEN}>\;reason=no-answer\;screen=no\;privacy=off)
exten => s-CHANUNAVAIL,n,Dial(SIP/ToExchangeUM5065&SIP/ToExchangeUM5067)
exten => s-CHANUNAVAIL,n,Hangup
exten => s-CHANUNAVAIL,n,Goto(exit-${VMSTATUS},1)

After inserting the code, I was able to get the exchange VM with my extension unplugged.

Please try this out and let me know how it goes. I don't know if it affects anything else, but on my personal system, everything seems to be fine... But your mileage may vary...
 

tbrummell

Guru
Joined
Jan 8, 2011
Messages
1,275
Reaction score
339
Yup, worked here as well with no ill effects seen so far. I'll keep testing different scenario's and see if all is well. My test plan before live has 59 different test cases to pass, so we'll see how she does. 'Go live' is a home environment with 8 users. :)

Code:
              ┌────────────────────────SYSTEM INFORMATION───────────────────────────┐
              │  Asterisk  = ONLINE  | Dahdi    = ONLINE  | MySQL    = ONLINE    │
              │  SSH        = ONLINE  | Apache    = ONLINE  | Iptables  = ONLINE    │
              │  Fail2ban  = ONLINE  | Internet  = ONLINE  | Ip6Tables = ONLINE    │
              │  Disk Free  = ADEQUATE| Mem Free  = ADEQUATE| NTPD      = ONLINE    │
              │  SendMail  = ONLINE  | Samba    = OFFLINE | Webmin    = ONLINE    │
              │  Ethernet0  = ONLINE  | Ethernet1 = N/A    | Wlan0    = N/A      │
              │                                                                    │
              │  PIAF Installed Version  = 2.0.6.4 under *VMWARE*                  │
              │  FreePBX Version          = 2.11.0.11                              │
              │  Running Asterisk Version = 11.5.1                                  │
              │  Asterisk Source Version  = 11.5.1                                  │
              │  Dahdi Source Version    = 2.7.0.1                                │
              │  Libpri Source Version    = 1.4.14                                  │
              │  IP Address              = 192.168.12.12 on eth0                  │
              │  Operating System        = CentOS release 6.4 (Final)              │
              │  Kernel Version          = 2.6.32-358.6.2.el6.x86_64 - 64 Bit      │
              │  Incredible Version      = 11.5                                    │
              └─────────────────────────────────────────────────────────────────────┘

+ Exchange 2010UM. I really should move up to 2013 but it just takes soooo much of my damn time.
 

rjaiswal

Active Member
Joined
May 24, 2013
Messages
438
Reaction score
58
I was very happy with exchange 2010. But when the VM host started to die, I made the decision to upgrade to ex2013, so I could better support clients. Managing ex2013, is way different than ex2010. Everything is done either from a web browser or powershell.
 

TwigsUSAN

Guru
Joined
Apr 7, 2011
Messages
215
Reaction score
24
Test cases at home? Terry, you really need to separate home and work.
 

tbrummell

Guru
Joined
Jan 8, 2011
Messages
1,275
Reaction score
339
Well, to be honest, they are just test cases I wrote at work for the systems there, and am applying them here with a few modifications. But yes, system verification is always on the brain and I'm always dreaming up ways to break sh!t. :)
 

rsw686

New Member
Joined
Oct 15, 2013
Messages
2
Reaction score
2
I've been using Asterisk with Exchange for over 2.5 years. I started with Exchange 2007 and Asterisk 1.6, which was the first version with SIP tcp support. I then moved to Exchange 2010 and Asterisk 1.8 and have a deployment with over 400 users. With a few minor patches to Asterisk you can have full functionality including MWI support.

You also don't need two SIP trunks. Instead enable SIP redirections by addding "promiscredir=yes" to your sip_general_customer.conf and create the trunk to port 5060. Upon receiving the call Exchange will ask to redirect to port 5065 or 5067.

I recently have been testing Exchange 2010 with Asterisk 11. I wrote a module for FreePBX 2.11 for an upcoming deployment that will allow selectively enabling of Exchange UM voicemail on a per user basis. See the below blog post for full details.

Exchange 2010 UM with FreePBX 2.11 and Asterisk 11

If you happen to be using Asterisk 1.8 I can put together a post with the needed details and patches. This is what I am using in production and requires overriding macro-vm in the extensions_override_freepbx.conf file.
 

rjaiswal

Active Member
Joined
May 24, 2013
Messages
438
Reaction score
58
I've been using Asterisk with Exchange for over 2.5 years. I started with Exchange 2007 and Asterisk 1.6, which was the first version with SIP tcp support. I then moved to Exchange 2010 and Asterisk 1.8 and have a deployment with over 400 users. With a few minor patches to Asterisk you can have full functionality including MWI support.

You also don't need two SIP trunks. Instead enable SIP redirections by addding "promiscredir=yes" to your sip_general_customer.conf and create the trunk to port 5060. Upon receiving the call Exchange will ask to redirect to port 5065 or 5067.

I recently have been testing Exchange 2010 with Asterisk 11. I wrote a module for FreePBX 2.11 for an upcoming deployment that will allow selectively enabling of Exchange UM voicemail on a per user basis. See the below blog post for full details.

Exchange 2010 UM with FreePBX 2.11 and Asterisk 11

If you happen to be using Asterisk 1.8 I can put together a post with the needed details and patches. This is what I am using in production and requires overriding macro-vm in the extensions_override_freepbx.conf file.


Hi!

So, I added
Code:
promiscredir=yes
to my sip_custom.conf, and made the necessary changes to my macro-vm override.

However, I'm getting the following error messages when asterisk tries to connect to exchange:
Code:
 -- Called SIP/ToExchangeUM5060
    -- Got SIP response 302 "Moved Temporarily" back from 192.168.15.8:5060
[2013-10-17 08:21:31] ERROR[16621][C-00000004]: sip/reqresp_parser.c:830 get_name_and_number: can not parse name and number from sip header.
    -- Now forwarding SIP/flowroute-0000000f to 'SIP/::::[email protected]:5062' (thanks to SIP/ToExchangeUM5060-00000014)
  == Using SIP RTP TOS bits 184
  == Using SIP RTP CoS mark 5
[2013-10-17 08:21:31] NOTICE[16677][C-00000004]: app_dial.c:958 do_forward: Not accepting call completion offers from call-forward recipient SIP/DAFFY12.Jaiswal.net:5062-00000015
    -- Got SIP response 302 "Moved Temporarily" back from 192.168.15.8:5062
[2013-10-17 08:21:31] WARNING[16662][C-00000004]: chan_sip.c:17321 get_rdnis: Huh?  Not an RDNIS SIP header (tel:250)?
[2013-10-17 08:21:31] ERROR[16662][C-00000004]: sip/reqresp_parser.c:830 get_name_and_number: can not parse name and number from sip header.
    -- Now forwarding SIP/flowroute-0000000f to 'SIP/::::[email protected]:5065' (thanks to SIP/DAFFY12.Jaiswal.net:5062-00000015)
  == Using SIP RTP TOS bits 184
  == Using SIP RTP CoS mark 5
[2013-10-17 08:21:31] NOTICE[16677][C-00000004]: app_dial.c:958 do_forward: Not accepting call completion offers from call-forward recipient SIP/DAFFY12.Jaiswal.net:5065-00000016
[2013-10-17 08:21:31] WARNING[16663][C-00000004]: chan_sip.c:22927 handle_response_invite: Received response: "Forbidden" from '"RJ Tech:+xxxxxxxxxx" <sip:[email protected]>;tag=as7d24bdcb'
  == Everyone is busy/congested at this time (1:0/0/1)

It looks like exchange is telling asterisk to send data to 5062, and then to 5065. But when it get's to 5065, exchange refuses the connection...

Just curious in what I missed...

thanks,

Riten
 

rjaiswal

Active Member
Joined
May 24, 2013
Messages
438
Reaction score
58
Thanks! I'll try it again in a couple of days. Will post an update.
 

jvangent100

Member
Joined
Jan 21, 2008
Messages
47
Reaction score
1
Hi,

I did add send_diversion=no to sip_general_custom.conf, compiled asterisk 11.2-cert2 and applied the two patches you speak off in your tutorial.

Still I am getting this :

[2014-03-16 22:13:35] ERROR[5461][C-00000004]: sip/reqresp_parser.c:830 get_name_and_number: can not parse name and number from sip header.
[2014-03-16 22:13:35] NOTICE[6395][C-00000004]: app_dial.c:958 do_forward: Not accepting call completion offers from call-forward recipient SIP/JVANGENTSVR5.jvangent.nl:5065-00000011

Now for a few years I do have a fully working install, asterisk 1.8.13.0 with applied patch for MWI.

Using asterisk 11.2-cert2 with these two patches does not work at all, maybe I am missing something obvious here, but I did follow instructions to the letter.
 

jvangent100

Member
Joined
Jan 21, 2008
Messages
47
Reaction score
1
as edit to previous post:

I enabled logging on the exchange side and this is how the call comes in:

The Microsoft Exchange Unified Messaging service on the Mailbox server has received a call from "", with user extension "" and a call ID of "[email protected]:5060".

So I guess it is only logical this isn't working !

Now why does asterisk not pass on the extension I wonder

edit, I guess I messed up the compile and forgot to add a bunch of modules. I did reinstall asterisk 11.8.1 and now it works, including both the promiscredir and send_diversion=no. Now all I need to do is figure out if the mwi patch still applies to 11.8.1 without issues.

For the play on phone, I am simply defining user details for the trunk as well, and have extensions as peer instead of friends, this allow for play on phone to work properly.

Edit:

Right, your patch asterisk-11.2-cert-sip-unsolicited-mwi-context-18762.patch still applies to 11.8.1 which is the asterisk green version. (needed to change the paths), recompile asterisk, and I see Exchange sending MWI, phones indeed receive them.

Thanks for your blog post, now I can actually thinking of upgrading from 1.8.13.0 (the one I run currently) to 11.8.1 (the one I have been playing with) as Exchange 2013 integration is fully working against 11.8.1.

Apart from the patch, I also tried to use your freepbx module, which at least means I don't need to mess with extension overrides and happy to report that it seems to be working allright. Thanks again.

and just to make sure my message is clear, I was referring to rws686
 

Members online

Forum statistics

Threads
25,838
Messages
167,923
Members
19,259
Latest member
dancosge
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top