I’m currently attempting to use realtime registration of peers, along with DUNDi across multiple servers, to create a sort of distributed cluster of Asterisk hosts. At this point I have the basics working - Realtime is set up and running (LDAP backend), DUNDi is configured, and I can register SIP phones to either of the two servers and make calls between the two.
I’m struggling right now with the Dialplan. What doesn’t work in my current configuration is voicemail - the call will go between the soft phones, but never rolls over to voicemail. I’m guessing I need to do some Dialplan work to get it going, but not entirely sure what to do. Since I’m using LDAP as my backend, I’m not putting my entire configuration into LDAP - so, pieces of the dialplan that are not dynamic will end up in the extensions.conf file. At this point, my extensions.conf file has the following entries:
[from-phones]
switch => Realtime/from-phones@
include => lookupdundi
include => Services
[Services]
exten => *98,1,VoiceMailMain()
exten => 1234,1,Playback(demo-congrats)
exten => 1234,n,Hangup()
[lookupdundi]
switch => DUNDi/extensions
[DUNDi_Incoming]
exten => _X.,1,Goto(from-phones,${EXTEN},2)
So, the from-phone context is the one defined in my sip.conf and iax.conf files, along with my LDAP entries for end points, that the end points actually register on. I have the “switch => Realtime” magic specified there, and extconfig.conf configured to go look at LDAP for the extensions - which are the same objects that define the SIP and IAX users. I also have the DUNDi context specified so that DUNDi will be consulted to determine where peers are actually registered.
What I’m having trouble figuring out and wrapping my mind around is how I combine the entries pulled out of Realtime with a Dialplan that deals with, for example, voicemail. How do I correctly set up a context where Realtime and DUNDi will be consulted for peer information, but, if the peer doesn’t answer, or isn’t online, the call will be transferred to voicemail.
I am using realtime for the voicemail configuration, too, along with IMAP, so the same voicemail boxes are available on both Asterisk servers, so it doesn’t matter to me whether the push to voicemail in the Dialplan happens on one server or another.