Forum

Unified Communications PBX System

Help us to improve VitalPBX

USD
Problem dialing out...
 

[Solved] Problem dialing out via ring group  

  RSS

erik
 erik
(@erik)
Active Member
Joined: 2 weeks ago
Posts: 16
25/11/2019 10:06 am  

I am preparing a switch from Elastix/FreePBX to VitalPBX. I have successfully setup a trunk with inbound and outbound routes. Extensions can reach each other and incoming and outgoing calls work fine.

In FreePBX I had a ring group with a number of extensions and one external number. This would work fine. Asterisk would dial the extensions and send the external number out over the trunk.

But I can't get it to work with VitalPBX. I have added the external number to the ring group. I would add a screenshot, but haven't figured out how yet.

When a call comes in, the extension will be dialed, but the external number generates an error.

Spawn extension (invalid-dest-cos, s, 5) exited non-zero on 'Local/0617107190@cos-all-00000079;2'

Somehow it thinks the number is local, which obviously it is not. It seems to go wrong in the ext-ringroups section, right after it determines correctly that a ring group needs to be processed.

-- Executing [610@ext-ringgroups:9] Dial("SIP/6123-0000016f", "Local/298@cos-all/n&Local/0617107190@cos-all/n,30,cU(clean-variables)") in new stack
-- Called Local/298@cos-all/n
-- Executing [298@cos-all:1] NoOp("Local/298@cos-all-00000078;2", "More than on digit pattern") in new stack
-- Called Local/0617107190@cos-all/n

Maybe there's a bug in the code that generates the ring group dial plan, since that is where the line comes from:

same => n,Dial(Local/298@cos-all/n&Local/0617107190@cos-all/n,30,cU(clean-variables))

I thought I might circumvent this by creating an actual local number, 711, by creating a custom application, but that does not work either. I can link it to the external number via a custom destination and when I dial 711, the external number gets dialed.

But I can't add 711 as an extension to the ring group, which I could in FreePBX (because that is free form input versus the selection list in VitalPBX). And if I add it as an external number, the same error is generated.

Spawn extension (invalid-dest-cos, s, 5) exited non-zero on 'Local/711@cos-all-0000007b;2'


mrivera
(@ing-joserivera26)
Developer Admin
Joined: 2 years ago
Posts: 1890
25/11/2019 3:40 pm  

Ok, the question is, may you dial this number "0617107190" without ring groups, this how you dial numbers?


erik
 erik
(@erik)
Active Member
Joined: 2 weeks ago
Posts: 16
26/11/2019 3:04 am  

@ing-joserivera26

Yes. I can dial the number just fine. I went ahead and did some more checking. If I dial the ring group from inside, both the extension and external number get dialed. An extract from the log:

  -- Executing [610@cos-all-post:9] Dial("SIP/299-0000018e", "Local/298@cos-all/n&Local/20617107190@cos-all/n,30,U(clean-variables)") in new stack
-- Called Local/298@cos-all/n
-- Called Local/20617107190@cos-all/n

-- Executing [0617107190@trk-1:2] Gosub("Local/20617107190@cos-all-00000087;2", "s,1(from-trk-grp)") in new stack
-- Executing [s@trk-1:1] NoOp("Local/20617107190@cos-all-00000087;2", "Trunk: Van Linstee ICT") in new stack
-- Executing [s@trk-1:2] NoOp("Local/20617107190@cos-all-00000087;2", "Dialing: 0617107190") in new stack
-- Executing [s@trk-1:3] Set("Local/20617107190@cos-all-00000087;2", "CDR(trunk)=1") in new stack

-- Executing [s@trk-1:13] Dial("Local/20617107190@cos-all-00000087;2", "SIP/6123/0617107190,90,rU(sub-call-recording^f3475b90023baab9^299^0617107190^no)") in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
-- Called SIP/6123/0617107190
-- Local/20617107190@cos-all-00000087;1 is ringing

You may note this time the number is 206..., the 2 is to select one of two trunks.

Also, this time I dialed the ring group on an internal extension. So that works as expected. However, the ring group is on the inbound route of one of the DIDs, and that is where things go wrong.

I dial the DID from the outside, Asterisk picks up de call, selects the ring group as a destination and then dials both numbers, but fails on the external number.

-- Executing [s@cos-all:13] Goto("Local/20617107190@cos-all-00000089;2", "cos-all-post,20617107190,1") in new stack
-- Goto (cos-all-post,20617107190,1)
-- Executing [20617107190@cos-all-post:1] NoOp("Local/20617107190@cos-all-00000089;2", "No valid number found") in new stack
-- Executing [20617107190@cos-all-post:2] ExecIf("Local/20617107190@cos-all-00000089;2", "0?Hangup()") in new stack
-- Executing [20617107190@cos-all-post:3] ForkCDR("Local/20617107190@cos-all-00000089;2", "e") in new stack
-- Executing [20617107190@cos-all-post:4] Goto("Local/20617107190@cos-all-00000089;2", "invalid-dest-cos,s,1") in new stack
-- Goto (invalid-dest-cos,s,1)
-- Executing [s@invalid-dest-cos:1] NoOp("Local/20617107190@cos-all-00000089;2", "Invalid Route Dialed in COS") in new stack
-- Executing [s@invalid-dest-cos:2] GotoIf("Local/20617107190@cos-all-00000089;2", "0?end") in new stack
-- Executing [s@invalid-dest-cos:3] GotoIf("Local/20617107190@cos-all-00000089;2", "1?end") in new stack
-- Goto (invalid-dest-cos,s,5)
-- Executing [s@invalid-dest-cos:5] Hangup("Local/20617107190@cos-all-00000089;2", "") in new stack
== Spawn extension (invalid-dest-cos, s, 5) exited non-zero on 'Local/20617107190@cos-all-00000089;2'
-- SIP/298-00000192 is ringing
-- Local/298@cos-all-00000088;1 is ringing


mrivera
(@ing-joserivera26)
Developer Admin
Joined: 2 years ago
Posts: 1890
27/11/2019 10:48 am  

I made the test with two PBX. check the attached picture with the ring group configuration. I am using VitalPBX 2.3.8-3 on both servers.


erik
 erik
(@erik)
Active Member
Joined: 2 weeks ago
Posts: 16
27/11/2019 11:16 am  

@ing-joserivera26

And what was the result of you tests?


mrivera
(@ing-joserivera26)
Developer Admin
Joined: 2 years ago
Posts: 1890
27/11/2019 11:19 am  

Check the picture attached, the call is send to the other PBX.


erik
 erik
(@erik)
Active Member
Joined: 2 weeks ago
Posts: 16
27/11/2019 11:32 am  

@ing-joserivera26

Thanks. How did you make the call? I can't tell from the fragment of your log. Could you send me the entire log from the start of the call?


mrivera
(@ing-joserivera26)
Developer Admin
Joined: 2 years ago
Posts: 1890
27/11/2019 12:29 pm  

Here's the full call log:

https://paste.ofcode.org/KcKTcDiBEQPxqDjpPXejMv


erik
 erik
(@erik)
Active Member
Joined: 2 weeks ago
Posts: 16
27/11/2019 2:11 pm  

@ing-joserivera26

Thanks, I am comparing and have found a difference. Everything is the same until:

-- Goto (cos-all-post,20617107190,1)
-- Executing [20617107190@cos-all-post:1] NoOp("Local/20617107190@cos-all-00000022;2", "No valid number found") in new stack
-- Executing [20617107190@cos-all-post:2] ExecIf("Local/20617107190@cos-all-00000022;2", "0?Hangup()") in new stack

Your log says:

-- Goto (cos-all-post,0558271,1)
-- Executing [0558271@cos-all-post:1] NoOp("Local/0558271@cos-all-000000e2;2", "TelesoftConnection") in new stack
-- Executing [0558271@cos-all-post:2] Gosub("Local/0558271@cos-all-000000e2;2", "sub-setup-call-type,s,1(outgoing)") in new stack

See how your cos-all-post:2 is very different from mine?

So this is how cos-all-post is defined on my system:

[cos-all-post]
include => all-features-category
include => extensions
include => applications
include => cos-all-custom
include => ARS-2
include => not-allowed-features
include => app-termination

exten => i,1,NoOp(Invalid dial on post section)
same => n,ForkCDR(e)
same => n,ExecIf($["${FROM_QUEUE_CALLBACK}"="yes"]?Hangup():)
same => n,Goto(invalid-dest-cos,s,1)

exten => h,1,NoOp(Hanging Up the Call (Post))
same => n,Hangup()

 


mrivera
(@ing-joserivera26)
Developer Admin
Joined: 2 years ago
Posts: 1890
27/11/2019 2:27 pm  

The only difference on your Class of Service is that I am using the ARS-all, and you are using and specific ARS (ARS-2).

"No valid number found", what this message means, is that you cannot dial 20617107190 with your current class of service, means, that there's not internal or external pattern that match with it.


erik
 erik
(@erik)
Active Member
Joined: 2 weeks ago
Posts: 16
27/11/2019 3:05 pm  

@ing-joserivera26

What does that mean? I can dial the number directly from an extension.


mrivera
(@ing-joserivera26)
Developer Admin
Joined: 2 years ago
Posts: 1890
27/11/2019 3:07 pm  

Means that you cannot dial that number with the Class of Service assigned to the ring group.


erik
 erik
(@erik)
Active Member
Joined: 2 weeks ago
Posts: 16
27/11/2019 3:11 pm  

Ah, I think I see what is going on. The outbound routes have all been tied to extensions. In this case, the originator is not an extension, but an external number.

Will check immediately.


erik
 erik
(@erik)
Active Member
Joined: 2 weeks ago
Posts: 16
27/11/2019 3:33 pm  

It was the route selection. All outbound routes have a CID pattern to identify which extensions can use a route. Some extensions use one route with a specific outgoing CID, others use a different on.

When a call comes in on a trunk, the CID is set to that of the caller. When the ring group tries to call the external number, it uses that CID. Since all of the outgoing routes had CID patterns on it that would only match one of the extensions, no route could be selected.

I have now added an additional outgoing route with a pattern matching the external number and a CID pattern set to "XXXXXXXX.". This will now be selected when an inbound route selects the external number.

Everything is working now. Thanks for helping me solve this.


mrivera liked
mrivera
(@ing-joserivera26)
Developer Admin
Joined: 2 years ago
Posts: 1890
27/11/2019 3:35 pm  

You're welcome.


Share:

Please Login or Register