<div>hi, all,</div>
<div> </div>
<div>I have realized a dundi cluster,,, <br>the details, please read...<a href="http://jefferychen1977.spaces.live.com/blog/cns!9E49EEC4251C4476!494.entry">http://jefferychen1977.spaces.live.com/blog/cns!9E49EEC4251C4476!494.entry
</a></div>
<div> </div>
<div>Thanks,...</div>
<div> </div>
<div> </div>
<div><br> </div>
<div><span class="gmail_quote">On 12/13/06, <b class="gmail_sendername">David Thomas</b> <<a href="mailto:punknow@gmail.com">punknow@gmail.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">On 12/12/06, JR Richardson <<a href="mailto:jmr.richardson@gmail.com">jmr.richardson@gmail.com</a>> wrote:
<br>> > 1.) When a registration server fails there doesn't seem to be an easy<br>> > way to have clients automatically register to a new server. (our<br>> > clients are mostly other asterisk boxes.) To solve this we are
<br>> > considering using DNS failover.<br>><br>> When registering with an Asterisk server to an Asterisk cluster of<br>> servers, for the purpose of traversing a NAT or something else (to<br>> solve a problem where direct contact cannot be performed), I would
<br>> suggest doing multiple registration to two registration servers, using<br>> different names.<br>><br>> Like<br>> registration [name1] to registration server 1<br>> registration [name2] to registration server 2
<br>><br>> in the outgoing dilaplan<br>><br>> exten => _NXXNXXXXXX,1,Dial(IAX2/server1......|j)<br>> exten => _NXXNXXXXXX,102,Dial(IAX2/server2......<br>><br>> so if server one is not there the call will jump to the next server
<br>><br>> or<br>><br>> exten => _NXXNXXXXXX,1,Dial(IAX2/server1&IAX2/server2.............<br>><br>> first server to answer will get the call.<br>><br>> you can do something similar calling from the cluster to the end Asterisk server
<br>> dundi lookup for [name1] if not available lookup [name2]<br>><br>> ><br>> > 2.) If you plan to do any direct routing using the fullcontact<br>> > address like what is shown in JR's whitepaper, you may find that
<br>> > fullcontact sometimes contains private network addresses. This makes<br>> > it impossible to route inbound calls directly to the client.<br>> ><br>> I recently started pulling the ipaddress and port from the database
<br>> instead of using the fullcontact field. Aaron Daniels helped me to<br>> get the realtime query working instead of using the mysql connect<br>> statements.<br>><br>> [lookupmysql]<br>> include => invalid
<br>><br>> exten => _X.,1,RealTime(sippeers|name|${EXTEN}|DN_)<br>> exten => _X.,2,GotoIf($["${DN_ipaddr}" = ""]?${EXTEN},105:${EXTEN},3)<br>> exten => _X.,3,Set(directdial=${EXTEN}@${DN_ipaddr}:${DN_port})
<br>> exten => _X.,4,Dial(SIP/${directdial},15,rj)<br>> exten => _X.,5,Macro(sendtovm,${EXTEN})<br>> exten => _X.,6,Hangup<br>><br>> exten => _X.,105,Macro(sendtovm,${EXTEN})<br>> exten => _X.,106,Hangup
<br>><br>> The RealTime command pulls all the entire record from the database and<br>> prepends all the fields with the last argument (here is have DN_) so<br>> when the record is pulled, all the records info is available as a
<br>> variable like DN_port and DN_ipaddr.<br>><br>> This is a really cool command. Hope this helps.<br><br>Wow, thanks for the examples JR. This is exactly what I needed. I was<br>not aware of the RealTime command. That will be very useful.
<br><br>David<br>_______________________________________________<br>--Bandwidth and Colocation provided by <a href="http://Easynews.com">Easynews.com</a> --<br><br>asterisk-users mailing list<br>To UNSUBSCRIBE or update options visit:
<br> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></div><br>