[Asterisk-Users] IAX <> IAX trunking... DP cache?
Ian Blenke
icblenke at nks.net
Wed Aug 20 18:09:11 MST 2003
Ian Blenke wrote:
> Brian West wrote:
>
>> I would use the latest CVS for one. And try again.
>
>
> Unfortunately, I've tried numerous times to get a current CVS trunk
> snapshot to talk to *anything*, to no avail. Even getting my Grandstream
> phones to register with it was an apparent excersize in futility.
> Dropping back to 0.4.0 *immediately* worked with the same configs.
Ok, I've managed to get my Grandstream phones working correctly. With
G.711/ulaw and 8 voice frames per packet, they work fine. Until I
hard-coded all negotiable codecs to ulaw/alaw and upped the default
setting of 1 voice frame per packet, I was getting no voice. Joy.
Anyway, the BudgeTone 100's (1.0.3.78) are working fine with Asterisk
now, using today's CVS snapshot.
Back to the problem at hand: I simply cannot get the IAX/IAX2
registration to "work". Honestly, I'm a bit lost. I'm still getting the
same errors:
WARNING[14351]: File chan_iax.c, Line 4852 (find_cache): Unable to
generate call for 'privatepbx:[privatepbx]@publicpbx/local'
WARNING[14351]: File chan_iax.c, Line 4972 (iax_exists): Unable to
make DP cache
WARNING[14351]: File chan_iax.c, Line 4852 (find_cache): Unable to
generate call for 'privatepbx:[privatepbx]@publicpbx/local'
WARNING[14351]: File chan_iax.c, Line 4994 (iax_canmatch): Unable to
make DP cache
along with an apparent Registration Refused:
NOTICE[9226]: File chan_iax2.c, Line 4341 (socket_read): Registration
of 'privatepbx' rejected: Registration Refused
on the Public PBX box, I'm getting the following:
NOTICE[7176]: File chan_iax2.c, Line 2860 (register_verify): Host
privatepbx failed RSA authentication with inkeys 'privatepbx'
Now this is the weird part, I can start asterisk with -i or run "init
keys" and the keys appear to load just fine:
PrivatePBX
*CLI> show keys
Key Name Type Status Sum
privatepbx PUBLIC [Loaded] 7ace809ae1c70b1bf4e50586f2d228e9
privatepbx PRIVATE [Loaded] 4288d8b63dd77228ac9a9ceebba335c8
publicpbx PUBLIC [Loaded] 115599073563eec2fd3cfc5e1891ed27
iaxtel PUBLIC [Loaded] d919b3ef03eb4dc54c8fee86bfeeada1
PrivatePBX
*CLI> show keys
Key Name Type Status Sum
publicpbx PUBLIC [Loaded] 115599073563eec2fd3cfc5e1891ed27
publicpbx PRIVATE [Loaded] b2b4484bbd90e93ac8e17a05251b561d
iaxtel PUBLIC [Loaded] d919b3ef03eb4dc54c8fee86bfeeada1
publicpbx PUBLIC [Loaded] 7ace809ae1c70b1bf4e50586f2d228e9
also, the initial IAX registration appears to work!
PrivatePBX
*CLI> iax show registry
Host Username Perceived Refresh State
x.x.x.x:5036 privatepbx y.y.y.y:5036 60 Registered
*CLI> iax2 show registry
Host Username Perceived Refresh State
x.x.x.x:4569 privatepbx y.y.y.y:4569 60 Registered
but here's the weird part: if I check back on these registrations
periodically, I will see IAX or IAX2 as Rejected, apparently randomly:
*CLI> iax show registry
Host Username Perceived Refresh State
x.x.x.x:5036 privatepbx y.y.y.y:5036 60 Registered
*CLI> iax2 show registry
Host Username Perceived Refresh State
x.x.x.x:5036 privatepbx y.y.y.y:5036 60 Rejected
On the other side, I see the registration:
PublicPBX
*CLI> iax show peers
Name/Username Host Mask Port Status
privatepbx y.y.y.y (D) 255.255.255.255 5036 Unmonitored
Gah. In debug mode, I see initial REGREJ messages often when I reload,
yet if I wait a bit, I seem to see REJACK messages after a while - but
nothing deterministic.
Tx-Frame Retry[000] -- Seqno: 01 Type: IAX Subclass: REGREQ
Timestamp: 00066ms Callno: 00014 DCall: 00193 [x.x.x.x:5036]
Rx-Frame Retry[N/A] -- Seqno: 01 Type: IAX Subclass: ACK
Timestamp: 00066ms Callno: 00193 DCall: 00014 [x.x.x.x:5036]
Rx-Frame Retry[N/A] -- Seqno: 01 Type: IAX Subclass: REGREJ
Timestamp: 00045ms Callno: 00193 DCall: 00014 [x.x.x.x:5036]
and then a few frames later:
Rx-Frame Retry[No] -- OSeqno: 001 ISeqno: 002 Type: IAX Subclass: REGACK
Timestamp: 00061ms SCall: 00004 DCall: 00001 [66.152.21.108:4569]
USERNAME : privatepbx
REFRESH : 60
APPARENT ADDRES : IPV4 y.y.y.y:4569
I'm slowly beginning to study these IAX frames to decypher their meanings...
This is my current setup, perhaps you can point out what I'm doing wrong
(the same diagram from my earlier email stands):
PrivatePBX
;iax.conf:
[general]
; This appears to work.
register => privatepbx:[privatepbx]@publicpbx
;extension.conf:
[local]
; Neither of these seem to work.
switch => IAX2/privatepbx:[privatepbx]@publicpbx/local
;switch => IAX/privatepbx:[privatepbx]@publicpbx/local
PublicPBX
;iax.conf:
[privatepbx]
type=friend
host=dynamic
context=default
auth=rsa
;trunk=yes ; <-- still can't use without zap timing
inkeys=privatepbx
outkeys=publicpbx
qualify=yes ; Make sure this peer is alive
;extension.conf:
[default]
switch => IAX2/publicpbx:[publicpbx]@privatepbx/default
The idea is to have all publicpbx inbound calls get forwarded from
[default] there to [default] on privatepbx. Likewise, all privatepbx
outbound calls get forwarded from [local] there through the [local]
contect on publicpbx.
When do you use the switch directive? Is this my entire problem?
--
- Ian C. Blenke <icblenke at nks.net>
(This message bound by the following:
http://www.nks.net/email_disclaimer.html)
More information about the asterisk-users
mailing list