Hi,
I am currently running Asterisk 1.4.11-BRIstuffed-0.4.0-test4 with dundi in a distributed environment on several machines all of which are running debian Etch. I am not deeply familiar with asterisk or dundi, and I seem to have setup my central dundi/asterisk server and peers in such a way that for each incoming call the central server establishes 2 connections in quick succession with a single peer. The first connection basically fails/falls through and then my dialplan or agi script runs correctly on the second connection. I’m not sure what the root of the problem is (dundi or asterisk or…?) or how to fix it, but I’ve posted my basic test setup below in the hopes that someone else with more experience will have some quick insight into a solution. I’m guessing it has something to do with the autofallthrough setting, but I’m not sure…
Current output from peer CLI for a single call:
extensions.conf file for asterisk peer
[general]
static=yes
writeprotect=no
autofallthrough=yes
clearglobalvars=no
priorityjumping=no
disallow=all
allow=gsm
allow=speex
jitterbuffer=yes
tos=lowdelay
[globals]
CONSOLE=Console/dsp ; Console interface for demo
IAXINFO=guest ; IAXtel username/password
TRUNK=Zap/g2 ; Trunk interface
TRUNKMSD=1 ; MSD digits to strip (usually 1 or 0)
[asked]
;exten => s,1,AGI(agi://127.0.0.1:4573)
exten => s,1,Answer
exten => s,n,NoOp(${CALLERID})
[default]
include => asked
dundi.conf file for peer
; DUNDi configuration for peers on EC2
[general]
organization = Asked
cachetime = 0 ; disable caching
ttl = 5 ; maximum ttl of 3 seconds
autokill = yes
[mappings]
; this maps asked_dundi DUNDi context to the asked Asterisk context.
; the weight is calculated as the number of channels in the asked group,
; see extensions.conf for how channels are inserted into the group.
asked => asked,${GROUP_COUNT(asked)},IAX2,dundi:${SECRET}@${IPADDR}/${NUMBER},nopartial
[mac_address]
host = my.host.name
register = 1
model = inbound
precache = inbound
exclude = all
include = asked
deny = all
permit = asked
inkey = asked
outkey = asked
order = primary
Additionally, I’m including the dundi conf from my main asterisk box (which hands off calls to the peers):
; DUNDi configuration for frontend processors
[general]
organization = Asked
cachetime = 0 ; disable caching
ttl = 5 ; maximum ttl of 3 seconds
autokill = yes ; send cancels to slow hosts
[mappings]
; empty mapping to create the asked dundi context
asked =>
[*]
; setup an any peer maping to any host that authenticates with the correct key
; arbitrary EID; we use this instead of the MAC address so that if that even if
; change the frontend's hardware, we don't need to reconfigure the backends
ustothem = 02:03:05:07:0B:0D
; peers are dynamic
host = dynamic
; we only set up outgoing traffic from this host to the peers
model = outbound
precache = outbound
; use the asked RSA key
inkey = asked
outkey = asked
; only allow the asked dundi context
exclude = all
include = asked
; only allow the asked asterisk context
deny = all
permit = asked
; all peers are primary call handlers
order = primary
and finally the central server extensions.conf:
[general]
static=yes
writeprotect=no ; this should probably become yes
autofallthrough=yes
clearglobalvars=no
priorityjumping=no
; is the globals section necessary if we only route calls over IAX?
[globals]
CONSOLE=Console/dsp
IAXINFO=guest
TRUNK=Zap/g2
TRUNKMSD=1
[asked-dundi-switch]
; query the asked dundi context for a peer
switch => DUNDi/asked
[macro-asked-dundi]
; query dundi for the peer
; if we have any local extensions, add them here
include => asked-dundi-switch
[asked]
; the generic asked handler
; route all calls to dundi and if that fails, give a busy signal and hangup
exten => _.,1,Macro(asked-dundi,${EXTEN})
exten => _.,n,Congestion
exten => _.,n,Wait(2)
exten => _.,n,Hangup()
[default]
include => asked