Been having an issue with FreePBX & SIPSTATION trunk conversion to PJSIP. I have several phone systems connected to SIPSTATION, routes through fine and works reliably. When I try to make the move to PJSIP trunks, I configure our firewall to allow it, then make the change in Advanced Settings to use PJSIP for sipstation trunks. I click on the sipstation module page in Freepbx, and am presented with, at the top, “Remote trunk settings have been changed. Please hit Apply Config to apply the new settings”. So, I do this. The firewall test works, the trunks say the provider is connected, I see traffic going in and out via tcpdump on that port. However, when I try to call in, I see the network activity… but the phone system doesn’t pick up. SIPSTATION acts like it can’t contact my phone system at all, and goes to failover options immediately.
While this change was active, I tried restarting asterisk (fwconsole restart). No change. I messed around in the firewall and triple checked everything. Everything looks good so I made no changes, and I can see the rules fire and the traffic flow through, then hit the FreePBX phone system. There’s no blocking going on in the firewall for ‘intrusion prevention’, and the PBX is responding quickly to the incoming protocol messages from SIPSTATION, so I assume it’s seeing them and it’s not just a coincidence, but it’s saying ‘internal server error’ and ‘unauthorized’.
What the heck is goin’ on? Am I missing a step somewhere? tcpdump shows "sip-tls’ but I’m guessing that’s some kind of translation for the port number, which is on 5061.
In the following log entry, I replaced the local fqdn, external ip, passwords and fake identifying information, but the rest is the same.
[root@myphonesystem log]# tcpdump -i eth2 host trunk1.freepbx.com or host trunk2.freepbx.com
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth2, link-type EN10MB (Ethernet), capture size 262144 bytes
13:20:12.340141 IP static.192.159.66.3.cyberlynk.net.sip > myphonesystem.pbx.local.sip-tls: SIP: INVITE sip:[email protected]:5061 SIP/2.0
13:20:12.341332 IP myphonesystem.pbx.local.sip-tls > static.192.159.66.3.cyberlynk.net.sip: SIP: SIP/2.0 500 Server Internal Error
13:20:12.373904 IP static.192.159.66.3.cyberlynk.net.sip > myphonesystem.pbx.local.sip-tls: SIP: ACK sip:[email protected]:5061 SIP/2.0
13:20:12.485317 IP static.192.159.66.3.cyberlynk.net.sip > myphonesystem.pbx.local.sip: SIP: INVITE sip:[email protected] SIP/2.0
13:20:12.547761 IP myphonesystem.pbx.local.sip > static.192.159.66.3.cyberlynk.net.sip: SIP: SIP/2.0 401 Unauthorized
13:20:12.576065 IP static.192.159.66.3.cyberlynk.net.sip > myphonesystem.pbx.local.sip: SIP: ACK sip:[email protected] SIP/2.0
13:20:17.590340 IP myphonesystem.pbx.local.sip-tls > static.162.253.134.142.cyberlynk.net.sip: SIP: OPTIONS sip:[email protected]:5060 SIP/2.0
13:20:18.090614 IP myphonesystem.pbx.local.sip-tls > static.162.253.134.142.cyberlynk.net.sip: SIP: OPTIONS sip:[email protected]:5060 SIP/2.0
13:20:18.390066 IP static.162.253.134.142.cyberlynk.net.sip > myphonesystem.pbx.local.sip-tls: SIP: SIP/2.0 200 OK
13:20:19.688543 IP static.162.253.134.142.cyberlynk.net.sip > myphonesystem.pbx.local.sip-tls: SIP: INVITE sip:[email protected]:5061 SIP/2.0
13:20:19.689232 IP myphonesystem.pbx.local.sip-tls > static.162.253.134.142.cyberlynk.net.sip: SIP: SIP/2.0 500 Server Internal Error
13:20:19.756644 IP static.162.253.134.142.cyberlynk.net.sip > myphonesystem.pbx.local.sip-tls: SIP: ACK sip:[email protected]:5061 SIP/2.0
13:20:27.144031 IP myphonesystem.pbx.local.sip-tls > static.192.159.66.3.cyberlynk.net.sip: SIP: OPTIONS sip:[email protected]:5060 SIP/2.0
13:20:27.172790 IP static.192.159.66.3.cyberlynk.net.sip > myphonesystem.pbx.local.sip-tls: SIP: SIP/2.0 200 OK