TIPS Trunk fails to connect using 5060

cantVOIP

Member
Joined
Jun 19, 2023
Messages
60
Reaction score
8
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"
 
If you want to watch what is going on with registrations, install and use sngrep.
 
change maximum contacts to 2,explain which x is which x and why your x is not the same as x ;-)
 
explain which x is which x and why your x is not the same as x ;-)
Use a different letter for each incoming number. That way we might be able to make sense of the signalling.
 
change maximum contacts to 2,explain which x is which x and why your x is not the same as x ;-)
Sorry about that. Here's a better look at the logs. The calls keeps getting identified as anonymous. I'm using pjsip 5061 fresh intall unbuntu, incrediblepbx2021

[2023-12-13 19:48:36] VERBOSE[142929][C-00000001] pbx.c: Executing [9998887777@from-sip-external:1] NoOp("PJSIP/anonymous-00000000", "Received incoming SIP connection from unknown peer to 9998887777") in new stack
17316[2023-12-13 19:48:36] VERBOSE[142929][C-00000001] pbx.c: Executing [9998887777@from-sip-external:2] Set("PJSIP/anonymous-00000000", "DID=9998887777") in new stack
17317[2023-12-13 19:48:36] VERBOSE[142929][C-00000001] pbx.c: Executing [9998887777@from-sip-external:3] Goto("PJSIP/anonymous-00000000", "s,1") in new stack
17318[2023-12-13 19:48:36] VERBOSE[142929][C-00000001] pbx_builtins.c: Goto (from-sip-external,s,1)
17319[2023-12-13 19:48:36] VERBOSE[142929][C-00000001] pbx.c: Executing [s@from-sip-external:1] GotoIf("PJSIP/anonymous-00000000", "1?setlanguage:checkanon") in new stack
17320[2023-12-13 19:48:36] VERBOSE[142929][C-00000001] pbx_builtins.c: Goto (from-sip-external,s,2)
17321[2023-12-13 19:48:36] VERBOSE[142929][C-00000001] pbx.c: Executing [s@from-sip-external:2] Set("PJSIP/anonymous-00000000", "CHANNEL(language)=en") in new stack
17322[2023-12-13 19:48:36] VERBOSE[142929][C-00000001] pbx.c: Executing [s@from-sip-external:3] GotoIf("PJSIP/anonymous-00000000", "1?noanonymous") in new stack
17323[2023-12-13 19:48:36] VERBOSE[142929][C-00000001] pbx_builtins.c: Goto (from-sip-external,s,5)
17324[2023-12-13 19:48:36] VERBOSE[142929][C-00000001] pbx.c: Executing [s@from-sip-external:5] Set("PJSIP/anonymous-00000000", "TIMEOUT(absolute)=15") in new stack
17325[2023-12-13 19:48:36] VERBOSE[142929][C-00000001] func_timeout.c: Channel will hangup at 2023-12-13 19:48:51.526 UTC.
17326[2023-12-13 19:48:36] VERBOSE[142929][C-00000001] pbx.c: Executing [s@from-sip-external:6] Set("PJSIP/anonymous-00000000", "receveip=pjsip,remote_addr") in new stack
17327[2023-12-13 19:48:36] VERBOSE[142929][C-00000001] pbx.c: Executing [s@from-sip-external:7] Log("PJSIP/anonymous-00000000", "WARNING,"Rejecting unknown SIP connection from 192.168.4.72:5061"") in new stack
17328[2023-12-13 19:48:36] WARNING[142929][C-00000001] Ext. s: "Rejecting unknown SIP connection from 192.168.4.72:5061"
17329[2023-12-13 19:48:36] VERBOSE[142929][C-00000001] pbx.c: Executing [s@from-sip-external:8] Answer("PJSIP/anonymous-00000000", "") in new stack
17330[2023-12-13 19:48:36] VERBOSE[142929][C-00000001] pbx.c: Executing [s@from-sip-external:9] Wait("PJSIP/anonymous-00000000", "2") in new stack
17331[2023-12-13 19:48:38] VERBOSE[142929][C-00000001] pbx.c: Executing [s@from-sip-external:10] Playback("PJSIP/anonymous-00000000", "ss-noservice") in new stack
17332[2023-12-13 19:48:38] VERBOSE[142929][C-00000001] file.c: <PJSIP/anonymous-00000000> Playing 'ss-noservice.ulaw' (language 'en')
17333[2023-12-13 19:48:43] VERBOSE[142929][C-00000001] pbx.c: Executing [h@from-sip-external:1] Hangup("PJSIP/anonymous-00000000", "") in new stack
 
You should not accept 'anonymous' nor 'guest ' calls for security reasons. Generally use "from-pstn" context for your trunks unless the carrier delivers you calls with non standard headers and make sure you have a destination for 9998887777 and any other numbers you manage. Your ATA should be set to ONLY send calls to your listening port.
 
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Back
Top