Problem with connecting 2 asterisk servers

I want to connect 2 asterisks servers, but there is a problem in configurations.

IP addresses of 2 asterisk servers are :

  • Server A : 192.168.0.108
  • Server B : 192.168.0.137

When executing : dundi show peers
each server can see the other asterisk server.

My problem is when subscriber from server A wants to call subscriber from server B, the call is not active.
I use X-Lite as soft phone.
I use this document to configure trunk between 2 servers : sourceforge.net/docman/display_d … _id=121515

What other configuration must I do to make it works?
What other configuration must I do in sip.conf, extension.conf, iax.conf and/or any other files?

Please help me

you probably don’t have call routing set up between the two boxes…are you connecting them with iax or sip?

post the relevant portions of your extensions.conf and sip.conf or iax.conf, depending on how you’re trunking the servers.

- Server A (192.168.0.108) :
* dundi.conf :
[general]
bindaddr=0.0.0.0
port=4520
entityid=00:10:B5:BB:DB:6A
cachetime=5
ttl=32
autokill=yes
[mappings]

priv => ext-local,0,SIP,192.168.0.108/${NUMBER},nopartial

[00:0F:FE:17:96:1E] <-- EID/MAC from BOX B
model = symmetric
host = 192.168.0.137
inkey = box2 <- BOX B’s public key
outkey = box1 <- BOX A’s private key
include = priv
permit = priv
qualify = yes
order = primary

* sip.conf :
[general]
bindport=5060
bindaddr=0.0.0.0
allow=all
allow=ulaw
allow=alaw

[450]
username=450
type=friend
secret=ashok
record_out=Adhoc
record_in=Adhoc
qualify=no
port=5060
nat=never
mailbox=450@device
host=dynamic
dtmfmode=rfc2833
context=from-internal
canreinvite=no
callerid=450 <450>

* extension.conf :
[ext-local]
include => ext-local-custom
exten => 450,1,Macro(exten-vm,450,450)
exten => 450,hint,SIP/450
exten => ${VM_PREFIX}450,1,Macro(vm,450,DIRECTDIAL)
; end of [ext-local]

[outbound-allroutes]
include => outbound-allroutes-custom
include => outrt-001-9_outside
exten => foo,1,Noop(bar)

; end of [outbound-allroutes]

[outrt-001-9_outside]
include => outrt-001-9_outside-custom
exten => _9.,1,Macro(dialout-trunk,1,${EXTEN:1},)
exten => _9.,n,Macro(outisbusy,)
; end of [outrt-001-9_outside]

[from-internal-additional]
include => from-internal-additional-custom
include => ext-group
include => ext-meetme
include => app-dialvm
include => app-vmmain
include => ext-findmefollow
include => app-recordings
include => app-callwaiting-cwoff
include => app-callwaiting-cwon
include => app-dnd-off
include => app-dnd-on
include => app-cf-busy-off
include => app-cf-busy-off-any
include => app-cf-busy-on
include => app-cf-off
include => app-cf-off-any
include => app-cf-on
include => app-cf-unavailable-off
include => app-cf-unavailable-on
include => ext-queues
include => app-userlogonoff
include => app-zapbarge
include => ext-test
include => ext-local
include => outbound-allroutes
exten => h,1,Hangup
; end of [from-internal-additional]

* iax.conf :

[general]
port=5036
bindaddr=0.0.0.0
disallow=all
allow=ilbc
allow=ulaw
allow=alaw
iaxcompat=yes
bandwidth=low

[boxB-peer]
username=boxA-user
type=peer
secret=testtest
host=192.168.0.137
disallow=all
allow=gsm

[boxB-user]
type=user
secret=testtest
host=192.168.0.137
disallow=all
allow=gsm

  • Server B (192.168.0.137) :
    * dundi.conf :
    [general]
    port=4520
    entityid=00:0F:FE:17:96:1E
    cachetime=5
    ttl=32
    autokill=yes
    [mappings]

priv => ext-local,0,SIP,192.168.0.137/${NUMBER},nopartial

[00:10:B5:BB:DB:6A] <-- EID/MAC from BOX B
model = symmetric
host = 192.168.0.108
inkey = box2 <- BOX B’s public key
outkey = box1 <- BOX A’s private key
include = priv
permit = priv
qualify = yes
order = primary

* sip.conf :
[general]
bindport=5060
bindaddr=0.0.0.0
allow=all
allow=ulaw
allow=alaw
[949]
username=949
type=friend
secret=ashok
record_out=Adhoc
record_in=Adhoc
qualify=no
port=5060
nat=never
mailbox=949@device
host=dynamic
dtmfmode=rfc2833
context=from-internal
canreinvite=no
callerid=949 <949>

* extension.conf :
[ext-local]
include => ext-local-custom
exten => 949,1,Macro(exten-vm,949,949)
exten => 949,hint,SIP/949
exten => ${VM_PREFIX}949,1,Macro(vm,949,DIRECTDIAL)
; end of [ext-local]

[outbound-allroutes]
include => outbound-allroutes-custom
include => outrt-001-9_outside
exten => foo,1,Noop(bar)
; end of [outbound-allroutes]

[outrt-001-9_outside]
include => outrt-001-9_outside-custom
exten => _9.,1,Macro(dialout-trunk,1,${EXTEN:1},)
exten => _9.,n,Macro(outisbusy,)
; end of [outrt-001-9_outside]

[from-internal-additional]
include => from-internal-additional-custom
include => ext-group
include => app-callwaiting-cwoff
include => app-callwaiting-cwon
include => ext-meetme
include => app-dnd-off
include => app-dnd-on
include => app-cf-busy-off
include => app-cf-busy-off-any
include => app-cf-busy-on
include => app-cf-off
include => app-cf-off-any
include => app-cf-on
include => app-cf-unavailable-off
include => app-cf-unavailable-on
include => app-dialvm
include => app-vmmain
include => app-recordings
include => ext-findmefollow
include => ext-queues
include => app-userlogonoff
include => app-zapbarge
include => ext-test
include => ext-local
include => outbound-allroutes
exten => h,1,Hangup

; end of [from-internal-additional]

* iax.conf :
[general]
port=5036
bindaddr=0.0.0.0
disallow=all
allow=ilbc
allow=ulaw
allow=alaw
iaxcompat=yes
bandwidth=low

[boxA-peer]
username=boxB-user
type=peer
secret=testtest
host=192.168.0.108
disallow=all
allow=gsm

[boxA-user]
type=user
secret=testtest
host=192.168.0.108
disallow=all
allow=gsm

this helped me:

blog.thegoldfish.net/dundi-tutor … eriskhome/

[quote=“whoiswes”]you probably don’t have call routing set up between the two boxes…are you connecting them with iax or sip?

post the relevant portions of your extensions.conf and sip.conf or iax.conf, depending on how you’re trunking the servers.[/quote]

I have practically the same problem. I’m trying to use SIP to connect. I’ll post my config files and the situation here:

I’ve been struggling with DUNDi for a few days now and I can’t seem to
make call from Asterisk A to Asterisk B. If I do a “dundi show peers”,
it finds the other peer but I can’t seem to make any calls. Can
anybody help me out here.

Here’s the situation:

Machine 1: Debian with Asterisk 1.4.4 --> 192.168.1.103
Machine 2: AsteriskNOW --> 192.168.1.69

The machines are like you can see on the same subnetwork! I’m using
SIP and for the configurations I based myself on
voip-info.org/wiki/view/DUND … ration+SIP,
but no luck!

here are my config files:

=========================
== MACHINE 1: 192.168.1.103 ==

DUNDI.CONF

[general]
bindaddr=0.0.0.0
port=4520
entityid=00:0E:A6:0B:E7:50
cachetime=60 ; 1 minute
ttl=5
autokill=yes
;secretpath=dundi
storehistory=yes

[mappings]
priv => dundi-priv-canonical,0,SIP,${NUMBER}@192.168.1.103,nopartial
priv => dundi-priv-customers,100,SIP,${NUMBER}@192.168.1.103,nopartial
priv => dundi-priv-via-pstn,400,SIP,${NUMBER}@192.168.1.103,nopartial

; AsteriskNOW server
[00:07:95:BD:F1:FF]
model = symmetric
host = 192.168.1.69
inkey = asnow
outkey = asreg
include = priv
permit = priv
qualify = yes
order = primary

SIP.CONF

[priv]
type=user
dbsecret=dundi/secret
context=dundi-priv-local

[5010]
type = friend
callwaiting = yes
cid_number = 5010
context =
email = info@info.com
fullname = TestAcc1
group =
hasagent = no
hasdirectory = yes
hasiax = no
hasmanager = no
hassip = yes
hasvoicemail = yes
host = dynamic
mailbox = 5010
secret = 1234
threewaycalling = yes
vmsecret = 1234
zapchan =
registeriax = no
registersip = yes

EXTENSIONS.CONF

[general]
static=yes
writeprotect=no
;autofallthrough=no
clearglobalvars=no
;priorityjumping=yes
;userscontext=default

; Private DUNDi network
[dundi-priv-canonical]
; Direct numbers

exten => 5010,1,NooP(DUNDI LOOKUP 5010)
exten => 5011,1,NooP(DUNDI LOOKUP 5011)

exten => _60XX,1,Goto(dundi-ext,${EXTEN},1)

[dundi-priv-customers]
; If you are an ITSP or Reseller, list your customers here.
exten => _60XX,1,Goto(dundi-ext,${EXTEN},1)

[dundi-priv-via-pstn]
; If you are freely delivering calls to the PSTN, list them here

[dundi-priv-local]
include => dundi-priv-canonical
include => dundi-priv-customers
include => dundi-priv-via-pstn

exten => 5010,1,Dial(SIP/5010)
exten => 5011,1,Dial(SIP/5011)

[dundi-priv-switch]
; Just a wrapper for the switch
switch => DUNDi/priv

[dundi-priv-lookup]
include => dundi-priv-local
include => dundi-priv-switch

[macro-dundi-priv]
exten => s,1,Goto(${ARG1},1)
include => dundi-priv-lookup

[trydundi]
exten => _.,1,Macro(dundi-priv,${EXTEN})
exten => _.,2,Congestion

[dundi-ext]
exten => _60XX,1,Dial(SIP/${EXTEN}@priv)

=========================
== MACHINE 2: 192.168.1.69 ==

DUNDI.CONF

[general]
bindaddr=0.0.0.0
port=4520
entityid=00:07:95:BD:F1:FF
cachetime=60
ttl=5
autokill=yes
;secretpath=dundi
storehistory=yes

[mappings]
priv => dundi-priv-canonical,0,SIP,${NUMBER}@192.168.1.103,nopartial
priv => dundi-priv-customers,100,SIP,${NUMBER}@192.168.1.103,nopartial
priv => dundi-priv-via-pstn,400,SIP,${NUMBER}@192.168.1.103,nopartial

; Asterisk Server (laptop)
[00:0E:A6:0B:E7:50]
model = symmetric
host = 192.168.1.103
inkey = asreg
outkey = asnow
include = priv
permit = priv
qualify = yes
order = primary

SIP.CONF

[priv]
type=user
dbsecret=dundi/secret
context=dundi-priv-local

[6010]
type = friend
callwaiting = yes
cid_number = 6010
context =
email = tverscheure@gmail.com
fullname = TestAcc1
group =
hasagent = no
hasdirectory = yes
hasiax = no
hasmanager = no
hassip = yes
hasvoicemail = yes
host = dynamic
mailbox = 6010
secret = 1234
threewaycalling = yes
vmsecret = 1234
zapchan =
registeriax = no
registersip = yes

EXTENSIONS.CONF

[general]
static = yes
writeprotect = no
;autofallthrough=no
clearglobalvars = no
;priorityjumping=yes
;userscontext=default

; Private DUNDi network
[dundi-priv-canonical]
; Direct numbers

exten => 6010,1,NooP(DUNDI LOOKUP 6010)
exten => 6011,1,NooP(DUNDI LOOKUP 6011)

exten => _50XX,1,Goto(dundi-ext,${EXTEN},1)

[dundi-priv-customers]
; If you are an ITSP or Reseller, list your customers here.
exten => _50XX,1,Goto(dundi-ext,${EXTEN},1)

[dundi-priv-via-pstn]
; If you are freely delivering calls to the PSTN, list them here
;exten => _50XX,1,Goto(dundi-ext,${EXTEN},1)

[dundi-priv-local]
include => dundi-priv-canonical
include => dundi-priv-customers
include => dundi-priv-via-pstn

;exten => _50XX,1,Goto(dundi-ext,${EXTEN},1)
exten => 6010,1,Dial(SIP/6010)
exten => 6011,1,Dial(SIP/6011)

[dundi-priv-switch]
; Just a wrapper for the switch
switch => DUNDi/priv

[dundi-priv-lookup]
include => dundi-priv-local
include => dundi-priv-switch
;exten => 6000,1,Dial(SIP/6000)

[macro-dundi-priv]
exten => s,1,Goto(${ARG1},1)
include => dundi-priv-lookup

[trydundi]
exten => _.,1,Macro(dundi-priv,${EXTEN})
exten => _.,2,Congestion

[dundi-ext]
exten => _50XX,1,Dial(SIP/${EXTEN}@priv)

On both machines I generated the keys in /var/lib/asterisk/keys/ with
$ astgenkey -n asreg
$ astgenkey -n asnow

And like i said when I do “dundi show peers” it shows me the other
peer, the dundi lookup also works but I can’t call the extensions on the other machine.

If somebody can help me, would be great!

Greetz, Tim