<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 16, 2014 at 10:20 AM, Kevin Larsen <span dir="ltr"><<a href="mailto:kevin.larsen@pioneerballoon.com" target="_blank">kevin.larsen@pioneerballoon.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="">
<br></div><tt><font>You are a bit outside of what I have done, but this
looks like it might be what you want to do with SIP:</font></tt>
<br><a href="http://www.voip-info.org/wiki/view/DUNDi+Enterprise+Configuration+SIP" target="_blank"><tt><font>http://www.voip-info.org/wiki/view/DUNDi+Enterprise+Configuration+SIP</font></tt></a><br><br></blockquote><div>
<br></div><div>I had looked at that guide before, but couldn't get it working. I could do SIP without authentication. This would have worked if I only wanted to terminate calls to extensions. For future purposes I wanted to include PSTN routes. In the end I went with IAX and have it up and running. It was actually simple to integrate with FreePBX. The important piece was setting ttl to 1 to prevent DUNDi lookup loops, which would cause the box to sometimes see its own DUNDi extensions.<br>
<br></div><div>The one FreePBX box with the PRI will try 10 digits numbers on DUNDi private then go out the PRI. The other FreePBX boxes try to dial 10 digit numbers on DUNDi private then use DUNDi to reach the PSTN. This allows me to add additionally FreePBX boxes with PSTN connections and use weights. Additionally providing a separate mapping for the PSTN allows toll free to first try DUNDi private, then a VoIP provider, then the DUNDi PSTN.<br>
</div><div><br>cd /var/lib/asterisk/keys<br> astgenkey -n `hostname -f`<br> chown asterisk:asterisk *<br> <br> share .pub keys between all servers<br><br>vim /etc/asterisk/dundi.conf<br> cachetime=60<br> ttl=1<br>
<br> priv => dundi-extens,0,IAX2,dundi:${<a href="http://SECRET}@1.1.1.1/${NUMBER},nounsolicited,nocomunsolicit,nopartial">SECRET}@1.1.1.1/${NUMBER},nounsolicited,nocomunsolicit,nopartial</a><br> priv => dundi-dids,100,IAX2,dundi:${<a href="http://SECRET}@1.1.1.1/${NUMBER},nounsolicited,nocomunsolicit,nopartial">SECRET}@1.1.1.1/${NUMBER},nounsolicited,nocomunsolicit,nopartial</a><br>
pstn => dundi-via-pstn,400,IAX2,dundi:${<a href="http://SECRET}@1.1.1.1/${NUMBER},nounsolicited,nocomunsolicit,nopartial">SECRET}@1.1.1.1/${NUMBER},nounsolicited,nocomunsolicit,nopartial</a><br> <br> ;[<EID of remote DUNDi peer>]<br>
;model = symmetric<br> ;host = <IP or FQDN of remote DUNDi peer><br> ;inkey = <public key of remote DUNDi peer, without ".pub"><br> ;outkey = <private key of local PBX, without ".key"><br>
;include = all<br> ;permit = all<br> ;qualify = yes<br><br>vim /etc/asterisk/extensions_custom.conf<br> [dundi-local]<br> include => dundi-extens<br> include => dundi-dids<br> include => dundi-via-pstn<br>
<br> [dundi-local-keepcid]<br> exten => _X.,1,Set(KEEPCID=TRUE)<br> exten => _X.,n,Goto(dundi-local,${EXTEN},1)<br><br> [dundi-extens]<br> include => ext-queues<br> include => ext-findmefollow<br>
include => ext-group<br> include => ext-local<br><br> [dundi-dids]<br> include => ext-did-0002<br><br> [dundi-via-pstn]<br> include => outbound-allroutes<br><br>FreePBX Trunks<br> Type: DUNDi<br>
Trunk Name: DUNDi Private<br> DUNDi Mapping: priv<br><br> Type: DUNDi<br> Trunk Name: DUNDi Pstn<br> DUNDi Mapping: pstn<br> <br> Type: IAX<br> Trunk Name: DUNDi<br> Outgoing Settings:<br> Trunk Name: dundi<br>
PEER Details:<br> type=friend<br> dbsecret=dundi/secret<br> disallow=all<br> context=dundi-local-keepcid<br> allow=ulaw&g729<br><br>FreePBX Outbound Routes<br> Route Name: dundi<br>
Route Type: Intra-Company<br> Dial Pattern: NXXX<br> Trunk: DUNDi Private<br><br> Route Name: outbound<br> Dial Pattern: 1NXXNXXXXXX<br> Dial Pattern: NXXNXXXXXX<br> Trunk: DUNDi Private<br> Trunk: PRI or DUNDi Pstn<br>
</div></div><br></div></div>