SIP Station Outgoing Connection Problem

I’ve been having intermittent connection problems from our Asterisk 1.6 box to our FreePBX SIP Station trunks. We can consistently receive calls over the trunk but we seem to have trouble consistently establishing outgoing connections. When we are having a problem it is evidenced in the SIP Station control panel within FreePBX with the SIP Ping showing “Unreachable” for both trunks. All other values look good and the Firewall test passes. I’ve been pulling my hair out trying to figure it out. I ran a TCP trace on it this evening and saw the following things in the trace:

71 17.870822 192.168.125.12 216.82.231.10 SIP Request: REGISTER sip:trunk2.freepbx.com
78 17.945623 192.168.125.12 216.82.225.24 SIP Request: REGISTER sip:trunk1.freepbx.com
79 18.024085 216.82.231.10 192.168.125.12 SIP Status: 401 Unauthorized (0 bindings)
80 18.024226 192.168.125.12 216.82.231.10 SIP Request: REGISTER sip:trunk2.freepbx.com
81 18.105642 216.82.225.24 192.168.125.12 SIP Status: 401 Unauthorized (0 bindings)
82 18.105727 192.168.125.12 216.82.225.24 SIP Request: REGISTER sip:trunk1.freepbx.com
83 18.145140 216.82.231.10 192.168.125.12 SIP Status: 200 OK (1 bindings)
84 18.171690 216.82.231.10 192.168.125.12 SIP Request: NOTIFY sip:[email protected]
85 18.171826 192.168.125.12 216.82.231.10 SIP Status: 489 Bad event
86 18.265951 216.82.225.24 192.168.125.12 SIP Status: 200 OK (1 bindings)
87 18.282233 216.82.225.24 192.168.125.12 SIP Request: NOTIFY sip:[email protected]
88 18.282342 192.168.125.12 216.82.225.24 SIP Status: 489 Bad event

I don’t know if these logs are helpful in diagnosing the problem but the 401 and 489 errors looked a little suspicious.

Can anyone help me diagnose this?

Thanks,

Eric

Looks like a trunk setting between 216.82.225.24 and 192.168.125.12 has a bad user name or secret that doesn’t match the other end.

These two agree: 216.82.231.10 and 192.168.125.12
and so do these two: 216.82.225.24 192.168.125.12