I've setup a brand new install for IncrediblePBX 2021 on ubuntu.
I've created the trunk, inbound and outbound routes. I can see in the logs that whenever my trunk (Which is an ATA) connects using another port besides 5060.
This causes an error whenever income calls are placed as the PBX rejects "unknown SIP connections from my ATA IP 192.168.x.x:randomport
I had added whitelisted my subnet using /root/add-ip on the server and allowing ALL.
I later decided to just do the same thing for the specific IP of the ATA but only for UDP, thinking maybe this will restrict the registration ports to 5060. It did not work. I changed chan_sip to 5160 and pjsip to 5060. I am using pjsip.
Does anyone know why my ATA keeps getting registered with a random port number instead of 5060?
How can I reset the iptables?
And yes, the ATA is properly configured and it specifies UDP, 5060 ports. Yes, there is a connection established between the ATA and PBX.
FIRST CONNECTION ATA AND PBX
[2023-12-12 20:08:32] VERBOSE[1856] res_pjsip_registrar.c: Added contact 'sip:[email protected]:5060' to AOR 'TRUNK' with expiration of 60 seconds
[2023-12-12 20:08:32] VERBOSE[1856] res_pjsip/pjsip_options.c: Contact xxx-xxx-xxxx/sip:[email protected]:5060 is now Reachable. RTT: 505.834 msec
[2023-12-12 20:09:01] WARNING[1856] res_pjsip_registrar.c: Registration attempt from endpoint 'xxx-xxx-xxxx' (192.168.xx.xx:26701) to AOR 'TRUNK' will exceed max contacts of 1
[2023-12-12 20:09:31] WARNING[1856] res_pjsip_registrar.c: Registration attempt from endpoint 'xxx-xxx-xxxx' (192.168.4.73:26701) to AOR 'TRUNK' will exceed max contacts of 1
[2023-12-12 20:09:48] VERBOSE[1438] res_pjsip_registrar.c: Removed contact 'sip:[email protected]:5060' from AOR 'TRUNK' due to expiration
[2023-12-12 20:09:48] VERBOSE[11882] res_pjsip/pjsip_options.c: Contact xxx-xxx-xxxx/sip:[email protected]:5060 has been deleted
[2023-12-12 20:10:01] VERBOSE[11882] res_pjsip_registrar.c: Added contact 'sip:[email protected]:26701' to AOR 'TRUNK' with expiration of 60 seconds
[2023-12-12 20:10:04] VERBOSE[11882] res_pjsip/pjsip_options.c: Contact xxx-xxx-xxxx/sip:[email protected]:26701 is now Unreachable. RTT: 0.000 msec
CALL REJECTION MESSAGE
[2023-12-12 20:11:26] VERBOSE[12233][C-00000001] pbx.c: Executing [s@from-sip-external:7] Log("PJSIP/anonymous-00000000", "WARNING,"Rejecting unknown SIP connection from 192.168.xx.xx:26701"") in new stack
[2023-12-12 20:11:26] WARNING[12233][C-00000001] Ext. s: "Rejecting unknown SIP connection from 192.168.xx.xx:26701"
I've created the trunk, inbound and outbound routes. I can see in the logs that whenever my trunk (Which is an ATA) connects using another port besides 5060.
This causes an error whenever income calls are placed as the PBX rejects "unknown SIP connections from my ATA IP 192.168.x.x:randomport
I had added whitelisted my subnet using /root/add-ip on the server and allowing ALL.
I later decided to just do the same thing for the specific IP of the ATA but only for UDP, thinking maybe this will restrict the registration ports to 5060. It did not work. I changed chan_sip to 5160 and pjsip to 5060. I am using pjsip.
Does anyone know why my ATA keeps getting registered with a random port number instead of 5060?
How can I reset the iptables?
And yes, the ATA is properly configured and it specifies UDP, 5060 ports. Yes, there is a connection established between the ATA and PBX.
FIRST CONNECTION ATA AND PBX
[2023-12-12 20:08:32] VERBOSE[1856] res_pjsip_registrar.c: Added contact 'sip:[email protected]:5060' to AOR 'TRUNK' with expiration of 60 seconds
[2023-12-12 20:08:32] VERBOSE[1856] res_pjsip/pjsip_options.c: Contact xxx-xxx-xxxx/sip:[email protected]:5060 is now Reachable. RTT: 505.834 msec
[2023-12-12 20:09:01] WARNING[1856] res_pjsip_registrar.c: Registration attempt from endpoint 'xxx-xxx-xxxx' (192.168.xx.xx:26701) to AOR 'TRUNK' will exceed max contacts of 1
[2023-12-12 20:09:31] WARNING[1856] res_pjsip_registrar.c: Registration attempt from endpoint 'xxx-xxx-xxxx' (192.168.4.73:26701) to AOR 'TRUNK' will exceed max contacts of 1
[2023-12-12 20:09:48] VERBOSE[1438] res_pjsip_registrar.c: Removed contact 'sip:[email protected]:5060' from AOR 'TRUNK' due to expiration
[2023-12-12 20:09:48] VERBOSE[11882] res_pjsip/pjsip_options.c: Contact xxx-xxx-xxxx/sip:[email protected]:5060 has been deleted
[2023-12-12 20:10:01] VERBOSE[11882] res_pjsip_registrar.c: Added contact 'sip:[email protected]:26701' to AOR 'TRUNK' with expiration of 60 seconds
[2023-12-12 20:10:04] VERBOSE[11882] res_pjsip/pjsip_options.c: Contact xxx-xxx-xxxx/sip:[email protected]:26701 is now Unreachable. RTT: 0.000 msec
CALL REJECTION MESSAGE
[2023-12-12 20:11:26] VERBOSE[12233][C-00000001] pbx.c: Executing [s@from-sip-external:7] Log("PJSIP/anonymous-00000000", "WARNING,"Rejecting unknown SIP connection from 192.168.xx.xx:26701"") in new stack
[2023-12-12 20:11:26] WARNING[12233][C-00000001] Ext. s: "Rejecting unknown SIP connection from 192.168.xx.xx:26701"