Solved Problem with outgoing calls on 1 SIP trunk (calls rerouting through 2nd SIP trunk)

Status
Not open for further replies.

markoh

Customer
Basic Certified
Joined
Jul 20, 2021
Messages
30
Reaction score
5
Hi all,

I have set up a PBX with two SIP trunks which will eventually be used for two different companies working out of the same building. All has been going smoothly up until recently when it was noticed that all outbound calls are routing through the second SIP trunk, my investigation found that the first SIP trunk is sending a BYE:

1653580046172.png
On the 3CX event log all I can see is:
1653580075145.png

Both SIP trunks are set up identically, can anyone advise why one trunk would be behaving like this and what I could do to rectify it?
If any other info is required please let me know.
 
Last edited:
Are both trunks in the same rule? If so, then a call that finds the first trunk busy, or otherwise unusable, will route over the second trunk. The only way to prevent this is to create two separate rules, with one route each..

As to why the calls fail on the first trunk... it may be one of several things including the trunk credentials, incorrect called number format, or incorrect caller ID. The 3CX Activity Log might offer more information (Verbose setting), but ultimately, you may have to contact your provider for an explanation as to why the calls fail. Which might be the quickest way to resolve, rather than guessing.
 
@leejor Thanks for your input, each SIP trunk has it's own outbound rule but each falls back on the other number (i.e. route 1 is the company1 SIP trunk number while route 2 is set as the company2 SIP trunk). If I disable/remove route2 from the outbound rule for company1 no outbound calls can be made from the company1 number.

I have already been in contact with our SIP provider, it was they who advised the PBX is sending the BYE and provided the 1st log above.
I'll enable verbose logging on the activity log and see if I can get any more info from there.

Thanks again!
 
Which SIP trunk providers are you using? Is it the same provider for both SIP trunks? Are you using a supported SIP trunk provider?
The capture from your provider and the screenshot from the PBX so not seem to corelate as its a different error received in 3CX. You could make your own capture right from the PBX and see if you get any errors there in addition to the activity log.
You can find more info about basic troubleshooting here
 
Hi @YiannisH_3CX, we are using a non 3CX supported SIP trunk provider (Telcom) for both SIP trunks.
WireShark shows SIP trunk 1 is rejecting the INVITE (403 Forbidden), the call re-routes through the second SIP trunk and completes without issue. I'm currently reviewing the dump.pcap file capture to try to determine why this might be happening.

Many thanks.
 
Check that both trunks have identical settings and go from there. In the past we found that some providers do not play very well when you have 2 trunks from them behind the same public IP and they sometimes reject calls because the trunks and credentials get confused on the providers side.
 
Thanks again @YiannisH_3CX, both trunks have identical settings and our provider has no problem with multiple trunks behind a single IP - we have used other PBX solutions in the past which also had multiple SIP trunks behind a single public IP and never ran into any issues.
 
@YiannisH_3CX sorry for the time between posts. Further testing of this issue is showing that each number can make outbound calls, however, 3CX will only use the last number to have registered regardless of outbound rules.
i.e. if line 1 was the first to register calls routed out through this number fail and falls back on the line 2 route (as per outbound rules) and vice versa.
 
You might want to see if your provider offers an alternative server, whose credentials you could use, on the second trunk. It sounds as if it might be 3CX, that has a problem, with both trunks having identical settings.
 
  • Like
Reactions: markoh
if line 1 was the first to register calls routed out through this number fail and falls back on the line 2 route (as per outbound rules) and vice versa.
When you say calls fail, you mean the PBX tries to send the call out through route 1 and gets an error message and then tries route 2 or it does not try at all to use route 1?

I have never seen the PBX not follow outbound rules and routes before so it might be worth creating a ticket with our support department so they can have a look at this.
Make sure you are on the latest 3CX build and running a supported configuration before doing so.
 
  • Like
Reactions: markoh
Hi @YiannisH_3CX I have included an excerpt from the bin log file where it shows the PBX attempting to use line 1 (line: 10000 in the log) and then switch (highlighted in green) to using line 2 (line: 10001). I am not seeing any errors recorded though.
IP addresses and phone numbers have been redacted.

3CX Bin Log.png
 
Without the full logs, the PBX configuration and a packet capture I cannot tell you why this happens. That is why I suggested contacting our support department.
 
  • Like
Reactions: markoh
@YiannisH_3CX further investigation on our side has identified the issue, it was caused by our a2billing system! We have made changes to this and confirmed all is working as it should.
This thread can be closed as solved.

Many thanks!
 
Glad to see you were able to identify the source of the issue
 
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
111,991
Messages
590,167
Members
164,929
Latest member
Cloudstar