DIY FreePBX checking connections

January 3, 2023 0 Comments

Sometimes we need to check if we are getting traffic from specific IP address or port, these DIY are simple, I will just give you commands or example

Checking if we are getting traffic on port 5061 to check if we are getting pjsip

tcpdump port 5061

This is the result

cpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
08:56:38.668636 IP 192.168.10.20.sip > freepbx.sangoma.local.sip-tls: SIP: SUBSCRIBE sip:71@192.168.2.10 SIP/2.0
08:56:38.668666 IP 192.168.10.20.sip > freepbx.sangoma.local.sip-tls: SIP: SUBSCRIBE sip:2725@192.168.2.10 SIP/2.0
08:56:38.674053 IP 192.168.10.20.sip > freepbx.sangoma.local.sip-tls: SIP: SUBSCRIBE sip:2733@192.168.2.10 SIP/2.0
08:56:39.159127 IP 192.168.10.20.sip > freepbx.sangoma.local.sip-tls: SIP: SUBSCRIBE sip:72@192.168.2.10 SIP/2.0
08:56:39.670655 IP 192.168.10.20.sip > freepbx.sangoma.local.sip-tls: SIP: SUBSCRIBE sip:71@192.168.2.10 SIP/2.0
08:56:39.670692 IP 192.168.10.20.sip > freepbx.sangoma.local.sip-tls: SIP: SUBSCRIBE sip:72@192.168.2.10 SIP/2.0
08:56:39.675667 IP 192.168.10.20.sip > freepbx.sangoma.local.sip-tls: SIP: SUBSCRIBE sip:2700@192.168.2.10 SIP/2.0
08:56:40.168624 IP 192.168.10.20.sip > freepbx.sangoma.local.sip-tls: SIP: SUBSCRIBE sip:70@192.168.2.10 SIP/2.0
08:56:40.668589 IP 192.168.10.20.sip > freepbx.sangoma.local.sip-tls: SIP: SUBSCRIBE sip:72@192.168.2.10 SIP/2.0
08:56:41.168622 IP 192.168.10.20.sip > freepbx.sangoma.local.sip-tls: SIP: REGISTER sip:192.168.2.10:5061 SIP/2.0
08:56:41.175415 IP 192.168.10.20.sip > freepbx.sangoma.local.sip-tls: SIP: SUBSCRIBE sip:2711@192.168.2.10 SIP/2.0
08:56:41.175466 IP 192.168.10.20.sip > freepbx.sangoma.local.sip-tls: SIP: SUBSCRIBE sip:2730@192.168.2.10 SIP/2.0

In this case my FreePBX is getting traffic on port 5061, however, it is not responding, not answering the extension.

I set pjsip debug on:

pjsip set logger on

I get the followiin result:

<— Received SIP request (577 bytes) from UDP:50.215.73.189:5060 —>
SUBSCRIBE sip:2700@192.168.2.10 SIP/2.0
Via: SIP/2.0/UDP 192.168.10.20;branch=z9hG4bK7db2670033462C7F
From: “2724-Raul Flores” ;tag=9161800B-E383D27A
To:
CSeq: 1 SUBSCRIBE
Call-ID: 246ae43ff9e6e61cb0f37ce0966814d1
Contact:
Allow: INVITE,ACK,BYE,CANCEL,OPTIONS,INFO,MESSAGE,SUBSCRIBE,NOTIFY,PRACK,UPDATE,REFER
Event: dialog
User-Agent: PolycomVVX-VVX_400-UA/5.9.7.4477
Accept-Language: en
Accept: application/dialog-info+xml
Max-Forwards: 70
Expires: 3600
Content-Length: 0

<— Received SIP request (573 bytes) from UDP:50.215.73.189:5060 —>
SUBSCRIBE sip:71@192.168.2.10 SIP/2.0
Via: SIP/2.0/UDP 192.168.10.20;branch=z9hG4bK2d7fde8c20EC15CB
From: “2724-Raul Flores” ;tag=B9D1B9F9-357B25C8
To:
CSeq: 1 SUBSCRIBE
Call-ID: 6ab5386b0fc22d2fafc764ffbf6814d1
Contact:
Allow: INVITE,ACK,BYE,CANCEL,OPTIONS,INFO,MESSAGE,SUBSCRIBE,NOTIFY,PRACK,UPDATE,REFER
Event: dialog
User-Agent: PolycomVVX-VVX_400-UA/5.9.7.4477
Accept-Language: en
Accept: application/dialog-info+xml
Max-Forwards: 70
Expires: 3600
Content-Length: 0

Looks like my FreePBX is not answering my extension request for subscription

In this way you can find communication problems with FreePBX