• V20: 3CX Re-engineered. Get V20 for increased security, better call management, a new admin console and Windows softphone. Learn More.

Call routing logic in Ring Groups

Status
Not open for further replies.

zafeirop

Joined
Jul 4, 2012
Messages
10
Reaction score
0
Hi,

I'm running 3CX Phone System v10.

I've setup a Ring Group containing a Ringall policy which contains virtual extensions (forwards to mobile numbers).
Our mobile calls are routed through a Portech MV372 whic works fine.

In general, if a call fails to be routed through the Portech, a Route2 & Route3 entry is triggered in the Outbound rules in order to route the call properly via alternate gateways.

However, this is not the case for the Ring Group routing logic.
When the Ring group is called and the Portech has no ports available to place the outgoing call, the call will fail and NO fallbackup route will be used from the Outbound rules (route2, route3) or the next available matching rule from the Outbound Rules!

Any hints ?
 
My understanding (and I hope I'm corrected if I'm wrong), is that...if a trunk group has idle trunks and accepts a call from 3CX, which then fails, for some reason, the call won't be handed back to 3CX and attempted on another trunk group.

That said, there may be some gateways capable of sending a SIP message back to 3CX that will accomplish this. I'm not sure.

I believe that for calls to a second or third trunk group to make use of these, the first group has to have all trunks busy, not be registered, be not available because the PSTN lines are in use, or a PRI is down, but that must be communicated to 3CX so that it knows not to even attempt a call on one of those trunks.
 
Hi leejor,
Thanks for replying.

Yes, indeed.
In order for backup trunks (routes) to work, the main trunk has to be unavailable, busy, 503 error etc.

Our Portech is usually out of lines (503 error or Busy error, it is configurable by the user, how to react in such a case) so the next available route should be used, as defined in route2, and route3 entries in the particular outbound rule.

But this does not work.
For every call that we receive in our Ring Groups, only the main (route1) setting is used to route outgoing calls.
If route1 fails, routing logic stops.

This is definitely unacceptable!
 
I don't have a Portech MV372 Gateway to check but I would be pretty sure it works the same way a SPA3102

When a call is placed to it it actual answers the sip call and then places the call onto the GSM Network. In that case 3CX does not know what the actual status of the call is, it could be ringing, engaged or answered on the GSM Network side but in the Sip side is connected and answered.

The caller is connected to to gateway immediately and hears what ever the phone line sends, this through can not be used to control the PBX, only give feed back to the caller through tones etc.

To make this work the way you want it to you would need a direct sip trunk to a VoiP provider. Then 3CX would be able to see the call had not been answered until it actually was, and if not take the appropriate action to forward the call on.

Another method might be the following if the Portech supports it. Get the Portech to reject the call and return it to 3CX in the way that Sipbroker Enum does.

You would do this by having an access code for the first call (say 99). Prefix the mobile numbers you want to call with 99 to use the first rule. In that rule strip out the 99 so the correct number is sent to the Portech. Then when it is returned with the 99 striped a second rule for a standard number call can be used.
 
Thank you Paul.
Nice approach.

However, the channel of the SIP session is not answered unless the GSM GW has successfully placed a call to the GSM network.
So, in my case, I always receive the 503 error if something goes wrong, without having to answer the channel first.
That means that the gateway behaves exactly like your VoIP provider.

The 503 error code should signal 3CX to do fallback routing (place call via route2, route3)!
But it does not happen with Ring Group when forwarding calls to external numbers.

This is my problem.
 
So when a call is in progress through the GSM gateway (ie ringing but not answered) does 3cx show the call as ringing or connected, do you see the call flow correctly or does it just go to connected.
 
I found similar with my Patton GW. If extension is set to ring desk and mobile simultaneously, then the Patton takes the call and desk phone doesn't ring.
if that user is part of a ring grip and has ring mobile simultaneously checked, then the only phone that rings is the users mobile and none of the other phones in ring group.
 
Guys,
I'll try to be more explanatory.

In normal operation, when you place an outgoing call, 3cx applies route logic based on Outbound rules processing each of the routes (route1, route2, route3) in the order of preference.
This is useful because, if one of the trunks fails, the other next will take over.

In Ring groups, if an extension is Away and wants to receive calls forwarded to mobile phone, this routing logic is not applied!
It only accepts as outgoing route, the first matched entry in the first rule of the Outbound rules table.

Is this normal ?
I think it is a bug!
 
Hi, some detailed logs from the Phine System:

A normal call (not a Ring Group call) through our GSM gateway, with backup routes would like like this:

11:34:08.713 [CM503008]: Call(563): Call is terminated
11:34:03.492 [CM505002]: Gateway:[Portech MV372 GSM GW] Device info: Device Not Identified: User Agent not matched;
Capabilities:[reinvite, replaces, able-no-sdp, recvonly] UserAgent: [Mv-37x (1008030)] PBX contact:
[sip:[email protected]:5060]
11:34:02.676 [CM503025]: Call(563): Calling PSTNline:6946XXXXXX@(Ln.10005@Portech MV372 GSM GW)@
[Dev:sip:[email protected]:5060]
11:34:02.637 [CM503004]: Call(563): Route 3: VoIPline:6946XXXXXX@(Ln.10004@Provider3)@
[Dev:sip:[email protected]:5060]
11:34:02.637 [CM503004]: Call(563): Route 2: VoIPline:6946XXXXXX@(Ln.10003@Provider2)@
[Dev:sip:[email protected]:5060]
11:34:02.636 [CM503004]: Call(563): Route 1: PSTNline:6946XXXXXX@(Ln.10005@Portech MV372 GSM GW)@
[Dev:sip:[email protected]:5060]
11:34:02.625 [CM503001]: Call(563): Incoming call from Ext.203 to <sip:[email protected]>

It is clear defined that there are 3 routes for this number:
1. Ln.10005@Portech MV372 GSM GW
2. Ln.10003@Provider2
3. Ln.10004@Provider3

If a normal outgoing call fails to reach route1, goes to route2 and then to route3.
That is fine!


When a call arrives to Ring Group 809, and tries to reach the same numbers, our logs like this:

11:41:55.013 [CM503020]: Normal call termination. Reason: Disabled by Forwarding Rule
11:41:55.013 [CM503016]: Call(565): Attempt to reach <sip:[email protected]> failed. Reason: Busy
11:41:45.934 [CM505002]: Gateway:[Portech MV372 GSM GW] Device info: Device Not Identified: User Agent not matched;
Capabilities:[reinvite, replaces, able-no-sdp, recvonly] UserAgent: [Mv-37x (1008030)] PBX contact:
[sip:[email protected]:5060]
11:41:45.338 [CM503003]: Call(565): Call to sip:[email protected]:5060 has failed; Cause: 503 Service
Unavailable
; from IP:xxx.xxx.xxx.xxx:5060
11:41:45.005 [CM503025]: Call(565): Calling RingAll809[6980XXXXXX@(Ln.10005@Portech MV372 GSM GW),6946xxxxxx@
(Ln.10005@Portech MV372 GSM GW)]@[Dev:sip:[email protected]:5060]
11:41:44.997 [CM503025]: Call(565): Calling RingAll809[6980XXXXXX@(Ln.10005@Portech MV372 GSM GW),6946xxxxxx@
(Ln.10005@Portech MV372 GSM GW)]@[Dev:sip:[email protected]:5060]
11:41:44.959 [CM503004]: Call(565): Route 1: RingAll809[6980XXXXXX@(Ln.10005@Portech MV372 GSM GW),6946xxxxxx@
(Ln.10005@Portech MV372 GSM GW)]@[Dev:sip:[email protected]:5060,Dev:sip:[email protected]:5060]
11:41:44.944 [CM503001]: Call(565): Incoming call from Ext.203 to <sip:[email protected]>

Which means that ONLY route1 is been used for call termination.
Where are the rest of our backup routes ?

You can see clearly that at line CM503003, call fails due to 503 error (GSM GW has run out of channels at this time).
The system did not try to reach backup routes as it did in a normal call to the same number

I think that the routing logic is not accurate at this point.

Hope that a software engineer from 3CX will response to this ticket. :(
Thank you.
 
I think you posted about the GW and timing and this is a follow-on post to that which explains the forwarding problem you described earlier.

What the log shows is that a call came in and was routed to the 809 ring group. The log is a little confusing as it shows the ring group, but in less than a second shows the call attempt being made to the Portech. I assume the ring group was already busy. Being busy, the call was sent to the Portech which then shows no available trunks so the system sent it back to the ring group whereupon the ring group being busy, the call was disconnected. I assume that one of the rules pertains as to the disconnect.

You apparently have created a number of rules and have presumably ordered/structured them in the sequence or priority by which you want them processed. It may help if more detail regarding the rules can be had. Like you, I am a little confused, given your explanation, as to why the calls do not progress as you have stated, but without more detail of how the rules are structured and then what the attributes are for each rule, I can't be certain that the system is not reacting as it should. On the surface and assuming that all is correct with the rule formulation, you do seem to have a valid issue.
 
Hi lneblett,

That topic is different than the other that we met :)
However, there are some common problems regarding Ring Group routing policy.

What I have created is a Ring Group which is populated only with virtual extensions for After Office Hours calls:
These extensions have their status always set to "Away"
These extensions are never registered to 3CX, they just have been assigned with a dummy 3 digit number in order to be valid.
In the General Tab of Extension settings, the mobile numbers are set, in order for calls to be forwarded.
In Settings/General/Global Options I've ticked the setting "Allow forwarding to external numbers in Ring Groups and Queues"
This is why you find in the log that the call is forwarded right away to the gateway.

When a customer calls our company after Office Hours, this Ring Group is triggered and our Cellular Phones ring, in parallel.
First person who picks up the call gets the channel.

But if there are no channels available, the call to the particular cellular will fail and unfortunately, fallback routing is not triggered.
Why does this happen since I've activated all possible route entries for my destinations, even in different Outbound rules ?

There should definetily be an asnwer from the programming team of 3CX.
 
zafeirop said:
But if there are no channels available, the call to the particular cellular will fail and unfortunately, fallback routing is not triggered.

When you say "channels", you obviously don't mean trunks (as in a 3CX trunk group), because that should trigger an attempt on a second trunk group, if another one is in the outbound rules.

While VoIP provider are generally capable of sending the status of a call back to 3CX, it is not always the case with a gateway. Some might, if set-up correctly, and have features such as current reversal, on a PSTN line, indicate answer supervision, but would still not indicate, other than audible, a busy line.

The only way to truly confirm what is happening, would be to use something like Wireshark. That would tell you exactly what is being passed back to 3CX after the dialled digits have been sent to a gateway.
 
Yes, I aggree.

But this GW is a SIP GW which means that every response is compliant with the SIP protocol and that if all lines are busy, or a general problem occurs, the corresponding error code will be sent.

In my case I receive:
Cause: 503 Service Unavailable which, in my case, is translated in simple words:
"I do not have any more lines to serve your request, please do something else, give up, or try later"

3CX should do something else and try the next route but instead, gives up and never dials the particular number!
This is not accepted!
 
Status
Not open for further replies.

Getting Started - Admin

Latest Posts

Members Online Now

Forum statistics

Threads
141,622
Messages
748,858
Members
144,735
Latest member
Hammad.k
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.