[Asterisk-Users] IAX2 failed to authenticate as priv (DUNDi)

tijmen van den brink tijmen.vandenbrink at gmail.com
Mon Jul 10 06:38:08 MST 2006


Hi all,

I'm stuck here! I am trying to get DUNDi to work and it seems DUNDi is
working accept the IAX part I think. I'm trying to let an extension from
Trixbox1 call an extension on Trixbox2 with the use of DUNDi.

Ext 1301 ---- * TrixBox1 * -----------IAX2------------ * TrixBox2
*-----------Ext 1601

I got two trixboxes setup and a dundi lookup at the CLI works like a charme

TrixBox1

asterisk1*CLI> dundi lookup 1601 at priv
  1.     0 IAX2/priv:V7yRFTML+VgyGxEI+BLQQg at 192.168.1.22/1601
(EXISTS|NOUNSLCTD|NOCOMUNSLTD)
     from 00:0c:29:30:77:fa, expires in 5 s
DUNDi lookup completed in 35 ms

asterisk1*CLI> dundi show peers
EID                  Host                Model      AvgTime  Status
00:0c:29:30:77:fa    192.168.1.16    (S) Symmetric  Unavail  OK (1 ms)
1 dundi peers [1 online, 0 offline, 0 unmonitored]

TrixBox2

asterisk1*CLI> dundi lookup 1301 at priv
  1.     0 IAX2/priv:MOlNFyyvZjj7Jk4sn9ReQg at 192.168.1.16/1301
(EXISTS|NOUNSLCTD|NOCOMUNSLTD)
     from 00:0c:29:0c:ab:c2, expires in 5 s
DUNDi lookup completed in 24 ms

asterisk1*CLI> dundi show peers
EID                  Host                Model      AvgTime  Status
00:0c:29:0c:ab:c2    192.168.1.22     (S) Symmetric  Unavail  OK (1 ms)

1 dundi peers [1 online, 0 offline, 0 unmonitored]

But when I'm trying to make the call I get the following message:


Jul 10 15:28:29 DEBUG[4389] channel.c: Set channel IAX2/192.168.1.16:4569-1
to read format ulaw
Jul 10 15:28:29 DEBUG[4389] channel.c: Set channel SIP/1601-fcaf to write
format ulaw
Jul 10 15:28:29 DEBUG[4389] channel.c: Set channel SIP/1601-fcaf to read
format ulaw
Jul 10 15:28:29 DEBUG[4389] channel.c: Set channel IAX2/192.168.1.16:4569-1
to write format ulaw
Jul 10 15:28:29 NOTICE[827] chan_iax2.c: Host 192.168.1.16 failed to
authenticate as priv
Jul 10 15:28:29 WARNING[827] chan_iax2.c: Call rejected by 192.168.1.16: No
authority found
Jul 10 15:28:29 DEBUG[827] chan_iax2.c: Immediately destroying 1, having
received reject
Jul 10 15:28:29 DEBUG[4389] channel.c: Hanging up channel
'IAX2/192.168.1.16:4569-1'
Jul 10 15:28:29 DEBUG[4389] chan_iax2.c: We're hanging up
IAX2/192.168.1.16:4569-1 now...
Jul 10 15:28:29 DEBUG[4389] chan_iax2.c: Really destroying
IAX2/192.168.1.16:4569-1 now...

I have the following config in my iax_custom.conf on both boxes:

[priv]
type=user
dbsecret=dundi/secret
context=dundi-priv-incoming
disallow=all
allow=ulaw
allow=g726

my dundi.conf on trixbox1 looks like this:

[general]
port=4520
entityid=00:0C:29:0C:AB:C2
cachetime=5
ttl=32
autokill=yes

[mappings]
priv => dundi-priv-local,0,IAX2,priv:${SECRET}@192.168.1.16
/${NUMBER},nounsolicited,nocomunsolicit,nopartial

[00:0C:29:30:77:FA] ; TrixBox2
model = symmetric
host = 192.168.1.22
inkey = dundi
outkey = dundi
include = priv
permit = priv
qualify = yes
dynamic=yes


my dundi.conf on trixbox2 looks like this:

[general]
port=4520
entityid=00:0C:29:30:77:FA
cachetime=5
ttl=32
autokill=yes

[mappings]
priv => dundi-priv-local,0,IAX2,priv:${SECRET}@192.168.1.22<priv:$%7BSECRET%7D at 192.168.1.22>/${NUMBER},nounsolicited,nocomunsolicit,nopartial

[00:0C:29:0C:AB:C2] ; TrixBox1
model = symmetric
host = 192.168.1.22
inkey = dundi
outkey = dundi
include = priv
permit = priv
qualify = yes
dynamic=yes

On both boxes the extensions-custom.conf have the following contexts:

; Macro Block
;------------------------------------------------------------------------------

[macro-stdexten]
; standard extension macro
exten => s,1,Answer
exten => s,2,Dial(SIP/${ARG1},25,t)
exten => s,3,Goto(s-${DIALSTATUS},1)
exten => s-NOANSWER,1,Voicemail(u${ARG1})
exten => s-NOANSWER,2,Hangup
exten => s-BUSY,1,Voicemail(b${ARG1})
exten => s-BUSY,2,Hangup
exten => _s.,1,Goto(s-NOANSWER,1)
exten => a,1,VoicemailMain(${ARG1})
[macro-dundi-lookup]
; Goto the extension number. Check the local context first, followed by
lookup
; dundi-priv-lookup is a pointer to the switch statement which will look for
; extensions on other machines. This allows the convergence of multiple
; Asterisk servers with different extension number blocks. Very cool!
;
exten => s,1,Goto(${ARG1},1)
include => dundi-priv-local
include => dundi-priv-lookup

; Directory Service Contexts
;------------------------------------------------------------------------------

[dundi-test-canonical]

[dundi-test-local]
; if we want to do a local lookup of numbers we advertise to dundi-test,
then
; we can just look here
include => dundi-test-canonical
include => dundi-pstn-local

[dundi-test-lookup]
; if we want to lookup an external number, use this context. The switch
; statement lets us search our peers for the number we are requesting
switch => DUNDi/dundi-test

[dundi-pstn-local]

[dundi-priv-local]
; we only have extensions 1600 -> 1699 locally
exten => _16XX,1,Macro(stdexten,${EXTEN})        ;I got _13XX on my other
box

[dundi-priv-lookup]
; Check our private peers for the exten #. Search 'priv' dundi context
switch => DUNDi/priv

[dundi-priv-incoming]
; when we get an incoming call from a private peer, it gets directed here
include => dundi-priv-local
;------------------------------------------------------------------------------

; Outgoing Calls Contexts
;------------------------------------------------------------------------------
[local]
; For extensions starting with 1300 -> 1399 do a dundi-lookup (private
extens)
exten => _13XX,1,Macro(dundi-lookup,${EXTEN})          ;I got _16XX on my
other box

I hope there's someone out there to help me!

Thanks in advance!

Regards Tijmen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060710/b8f4db0d/attachment.htm


More information about the asterisk-users mailing list