New to Wazo - Trunk and Context Setings

Added by Craig Abbott 6 months ago

Hi Wazo Gurus

I've got a FreePBX setup working for the last 4 years and was looking at moving over to Wazo. I'm having a few problems with the basic differences between the 2 systems I was hoping someone could clarify.

My first question is about Trunk setup. My current setup has 1 Trunk, 1 DID and 4 lines. Freepbx has an option to set maximum channels which I can't find in Wazo. I have seen some suggestions to create multiple trunks for both inbound and outbound calls. Do I need to create 4 trunks for inbound and 4 trunks for outbound to allow 4 simultaneous calls? If not, what is the best way to setup this configuration?

I am also struggling with the concept of "Contexts" and associated settings for Users, Sub-contexts and Incoming calls.

My test setup has:

  • 2 users 201 and 221
  • 2 lines 201 and 221
  • 2 Yealink phones
  • 1 trunk 09XXXXXX (4 lines)
  • DID 0243XXXXXX
  • Australian numbers from 01xxxxxxxx to 09xxxxxxxx initially

I'm trying to start off with a basic setup of all incoming calls to x201 and all outgoing calls to the SIP trunk. Nothing I have tried has been successful. I keep getting "The person is busy" message on both inbound and outbound. I can however make internal calls.

I currently have:

  • Default - Outcalls sub-context and Users 201-299
  • Incalls - Users 201-299 and Incoming calls 09XXXXXX
  • Outcalls - Users 0100000000 - 0999999999

Can someone suggest the correct Users/Sub-context/incoming calls settings? I'm sure it is something simple I'm doing wrong.

I also have a backup SIP Trunk with 1 DID and 1 line that I have setup and shows as registered in Wazo.

Thanks in advance for the help.

Craig


Replies (3)

RE: New to Wazo - Trunk and Context Setings - Added by Pascal Cadotte-Michaud 6 months ago

Hi Craig,

I'll try to clarify how you should configure your contexts.

Your internal context "Default" is used for routing calls that stay on your PBX, usually your users, conference rooms, etc.
The "Incall" context is used to associate your DID to internal resources. You can remove the Users range [201-299] from the "Incalls" context. It is only necessary in the "Default" context.
The "Outcalls" context does not need ranges associated to it.

Once that's done, you can create your incoming calls. An incoming call route a call from a DID in the "Incalls" context to an internal resource.

For example:

0243123201
User: 201

So when an incoming call is received on did 0243123201 it will be routed to your user 201.

You will have to create an incoming call for each DID.

For outgoing calls, you'll have to create an outgoing call and select the trunks you wish to use, if you select more than one trunk, asterisk will try them in the configured order, if trunk 1 reached its maximum number of calls, trunk 2 will be used.
In the "Exten" tab, you have to define which numbers are routed to this outgoing call. You can add many patterns here.

0zxxxxxxxx for 01xxxxxxxx to 09xxxxxxxx

Don't forget another pattern for the emergency number if it does not match 0zxxxxxxxx, "911" for example.

From that point all your users should be able to do outgoing calls since the "Outcalls" context is included in the "Default" context.

I wish that will get you started, keep us updated if you have a problem.

RE: New to Wazo - Trunk and Context Setings - Added by Craig Abbott 5 months ago

Thanks for the help Pascal.

I've now got outbound and internal calls working. I still can't get inbound to work. I keep getting "person busy" message.

The current setup is below:
  • Default - Outcalls sub-context and Users 201-299
  • Incalls - Incoming calls 0200000000-0999999999 and 09000000 to 10000000 (I wasn't sure whether to put in the range of inbound calls or the user name of the trunk so I tried both)
  • Outcalls - Nothing
Call Management/Incoming Calls
  • DID - 02XXXXXXXX
  • Context - Incalls
  • Destination - User
  • Redirect - Reception 3
  • Ring time - 30sec

The log of an attempted inbound call is below.

[May 14 14:29:58] -- Executing [09XXXXXX@default:1] Set("SIP/09XXXXXX-00000004", "XIVO_BASE_CONTEXT=default") in new stack
[May 14 14:29:58] -- Executing [09XXXXXX@default:2] Set("SIP/09XXXXXX-00000004", "XIVO_BASE_EXTEN=09XXXXXX") in new stack
[May 14 14:29:58] -- Executing [09XXXXXX@default:3] Gosub("SIP/09XXXXXX-00000004", "outcall,s,1(13,)") in new stack
[May 14 14:29:58] -- Executing [s@outcall:1] Set("SIP/09XXXXXX-00000004", "XIVO_DSTID=13") in new stack
[May 14 14:29:58] -- Executing [s@outcall:2] Set("SIP/09XXXXXX-00000004", "XIVO_PRESUBR_GLOBAL_NAME=OUTCALL") in new stack
[May 14 14:29:58] -- Executing [s@outcall:3] Set("SIP/09XXXXXX-00000004", "XIVO_SRCNUM=024304XXXX") in new stack
[May 14 14:29:58] -- Executing [s@outcall:4] Set("SIP/09XXXXXX-00000004", "XIVO_DSTNUM=09XXXXXX") in new stack
[May 14 14:29:58] -- Executing [s@outcall:5] Set("SIP/09XXXXXX-00000004", "XIVO_CONTEXT=default") in new stack
[May 14 14:29:58] -- Executing [s@outcall:6] Gosub("SIP/09XXXXXX-00000004", "originate-caller-id,s,1") in new stack
[May 14 14:29:58] -- Executing [s@originate-caller-id:1] GotoIf("SIP/09XXXXXX-00000004", "0?:name") in new stack
[May 14 14:29:58] -- Goto (originate-caller-id,s,3)
[May 14 14:29:58] -- Executing [s@originate-caller-id:3] GotoIf("SIP/09XXXXXX-00000004", "0?:fix") in new stack
[May 14 14:29:58] -- Goto (originate-caller-id,s,5)
[May 14 14:29:58] -- Executing [s@originate-caller-id:5] GotoIf("SIP/09XXXXXX-00000004", "?:end") in new stack
[May 14 14:29:58] -- Goto (originate-caller-id,s,9)
[May 14 14:29:58] -- Executing [s@originate-caller-id:9] Return("SIP/09XXXXXX-00000004", "") in new stack
[May 14 14:29:58] -- Executing [s@outcall:7] AGI("SIP/09XXXXXX-00000004", "agi://127.0.0.1/outgoing_user_set_features") in new stack
[May 14 14:29:58] agi://127.0.0.1/outgoing_user_set_features: AGI handler 'outgoing_user_set_features' successfully executed
[May 14 14:29:58] -- <SIP/09XXXXXX-00000004>AGI Script agi://127.0.0.1/outgoing_user_set_features completed, returning 0
[May 14 14:29:58] -- Executing [s@outcall:8] Gosub("SIP/09XXXXXX-00000004", "xivo-subroutine,s,1()") in new stack
[May 14 14:29:58] -- Executing [s@xivo-subroutine:1] GotoIf("SIP/09XXXXXX-00000004", "?:nosubroutine") in new stack
[May 14 14:29:58] -- Goto (xivo-subroutine,s,4)
[May 14 14:29:58] -- Executing [s@xivo-subroutine:4] Return("SIP/09XXXXXX-00000004", "") in new stack
[May 14 14:29:58] -- Executing [s@outcall:9] Gosub("SIP/09XXXXXX-00000004", "xivo-user_rights_check,s,1") in new stack
[May 14 14:29:58] -- Executing [s@xivo-user_rights_check:1] AGI("SIP/09XXXXXX-00000004", "agi://127.0.0.1/user_set_call_rights") in new stack
[May 14 14:29:58] agi://127.0.0.1/user_set_call_rights: AGI handler 'user_set_call_rights' successfully executed
[May 14 14:29:58] -- <SIP/09XXXXXX-00000004>AGI Script agi://127.0.0.1/user_set_call_rights completed, returning 0
[May 14 14:29:58] -- Executing [s@xivo-user_rights_check:2] GotoIf("SIP/09XXXXXX-00000004", "ALLOW?:error,1") in new stack
[May 14 14:29:58] -- Executing [s@xivo-user_rights_check:3] GotoIf("SIP/09XXXXXX-00000004", "1?allow,1") in new stack
[May 14 14:29:58] -- Goto (xivo-user_rights_check,allow,1)
[May 14 14:29:58] -- Executing [allow@xivo-user_rights_check:1] NoOp("SIP/09XXXXXX-00000004", "User allowed to make call") in new stack
[May 14 14:29:58] -- Executing [allow@xivo-user_rights_check:2] Return("SIP/09XXXXXX-00000004", "") in new stack
[May 14 14:29:58] -- Executing [s@outcall:10] AGI("SIP/09XXXXXX-00000004", "agi://127.0.0.1/check_schedule") in new stack
[May 14 14:29:58] agi://127.0.0.1/check_schedule: AGI handler 'check_schedule' successfully executed
[May 14 14:29:58] -- <SIP/09XXXXXX-00000004>AGI Script agi://127.0.0.1/check_schedule completed, returning 0
[May 14 14:29:58] -- Executing [s@outcall:11] GotoIf("SIP/09XXXXXX-00000004", "0?CLOSED,1") in new stack
[May 14 14:29:58] -- Executing [s@outcall:12] GotoIf("SIP/09XXXXXX-00000004", "?:14") in new stack
[May 14 14:29:58] -- Goto (outcall,s,14)
[May 14 14:29:58] -- Executing [s@outcall:14] GotoIf("SIP/09XXXXXX-00000004", "SIP/09XXXXXX?:error,1") in new stack
[May 14 14:29:58] -- Executing [s@outcall:15] Set("SIP/09XXXXXX-00000004", "TRUNKINDEX=0") in new stack
[May 14 14:29:58] -- Executing [s@outcall:16] Goto("SIP/09XXXXXX-00000004", "dial,1") in new stack
[May 14 14:29:58] -- Goto (outcall,dial,1)
[May 14 14:29:58] -- Executing [dial@outcall:1] Set("SIP/09XXXXXX-00000004", "INTERFACE=SIP/09XXXXXX") in new stack
[May 14 14:29:58] -- Executing [dial@outcall:2] Set("SIP/09XXXXXX-00000004", "TRUNKEXTEN=09XXXXXX") in new stack
[May 14 14:29:58] -- Executing [dial@outcall:3] Set("SIP/09XXXXXX-00000004", "TRUNKSUFFIX=") in new stack
[May 14 14:29:58] -- Executing [dial@outcall:4] Gosub("SIP/09XXXXXX-00000004", "xivo-global-subroutine,s,1") in new stack
[May 14 14:29:58] -- Executing [s@xivo-global-subroutine:1] GotoIf("SIP/09XXXXXX-00000004", "1?:return") in new stack
[May 14 14:29:58] -- Executing [s@xivo-global-subroutine:2] GotoIf("SIP/09XXXXXX-00000004", "OUTCALL?:return") in new stack
[May 14 14:29:58] -- Executing [s@xivo-global-subroutine:3] GotoIf("SIP/09XXXXXX-00000004", "xivo-subrgbl-outcall?:return") in new stack
[May 14 14:29:58] -- Executing [s@xivo-global-subroutine:4] GotoIf("SIP/09XXXXXX-00000004", "1?:return") in new stack
[May 14 14:29:58] -- Executing [s@xivo-global-subroutine:5] Gosub("SIP/09XXXXXX-00000004", "xivo-subrgbl-outcall,s,1") in new stack
[May 14 14:29:58] -- Executing [s@xivo-subrgbl-outcall:1] NoOp("SIP/09XXXXXX-00000004", "### DID Outgoing Call Subroutine ###") in new stack
[May 14 14:29:58] -- Executing [s@xivo-subrgbl-outcall:2] NoOp("SIP/09XXXXXX-00000004", "Calling FROM: 024304XXXX") in new stack
[May 14 14:29:58] -- Executing [s@xivo-subrgbl-outcall:3] NoOp("SIP/09XXXXXX-00000004", "Calling TO: s") in new stack
[May 14 14:29:58] -- Executing [s@xivo-subrgbl-outcall:4] NoOp("SIP/09XXXXXX-00000004", "XIVO SRC NUMBER=024304XXXX") in new stack
[May 14 14:29:58] -- Executing [s@xivo-subrgbl-outcall:5] NoOp("SIP/09XXXXXX-00000004", "XIVO DST NUMBER=09XXXXXX") in new stack
[May 14 14:29:58] -- Executing [s@xivo-subrgbl-outcall:6] NoOp("SIP/09XXXXXX-00000004", "XIVO DST ID=13") in new stack
[May 14 14:29:58] -- Executing [s@xivo-subrgbl-outcall:7] NoOp("SIP/09XXXXXX-00000004", "XIVO USR ID=") in new stack
[May 14 14:29:58] -- Executing [s@xivo-subrgbl-outcall:8] Return("SIP/09XXXXXX-00000004", "") in new stack
[May 14 14:29:58] -- Executing [s@xivo-global-subroutine:6] Return("SIP/09XXXXXX-00000004", "") in new stack
[May 14 14:29:58] -- Executing [dial@outcall:5] CELGenUserEvent("SIP/09XXXXXX-00000004", "XIVO_OUTCALL") in new stack
[May 14 14:29:58] -- Executing [dial@outcall:6] Set("SIP/09XXXXXX-00000004", "CONNECTEDLINE(num,i)=09XXXXXX") in new stack
[May 14 14:29:58] -- Executing [dial@outcall:7] Dial("SIP/09XXXXXX-00000004", "SIP/09XXXXXX/09XXXXXX,,o(09XXXXXX)") in new stack
[May 14 14:29:58] Using SIP RTP CoS mark 5
[May 14 14:29:58] -- Called SIP/09XXXXXX/09XXXXXX
[May 14 14:29:58] -- Got SIP response 503 "Service Unavailable" back from 125.213.160.81:5060
[May 14 14:29:58] -- SIP/09XXXXXX-00000005 is circuit-busy
[May 14 14:29:58] Everyone is busy/congested at this time (1:0/1/0)
[May 14 14:29:58] -- Executing [dial@outcall:8] Goto("SIP/09XXXXXX-00000004", "CONGESTION,1") in new stack
[May 14 14:29:58] -- Goto (outcall,CONGESTION,1)
[May 14 14:29:58] -- Executing [CONGESTION@outcall:1] Goto("SIP/09XXXXXX-00000004", "redial,1") in new stack
[May 14 14:29:58] -- Goto (outcall,redial,1)
[May 14 14:29:58] -- Executing [redial@outcall:1] Set("SIP/09XXXXXX-00000004", "TRUNKINDEX=1") in new stack
[May 14 14:29:58] -- Executing [redial@outcall:2] GotoIf("SIP/09XXXXXX-00000004", "?dial,1") in new stack
[May 14 14:29:58] -- Executing [redial@outcall:3] Playback("SIP/09XXXXXX-00000004", "congestion-call") in new stack
[May 14 14:29:59] -- <SIP/09XXXXXX-00000004> Playing 'congestion-call.slin' (language 'en_US')
[May 14 14:29:59] > 0x7fc748006d30 -- Probation passed - setting RTP source address to 125.213.160.79:27858

RE: New to Wazo - Trunk and Context Setings - Added by Craig Abbott 5 months ago

I've searched the forum and there have been a few reports of issues similar to mine but no resolutions. https://projects.wazo.community/boards/1/topics/8365 and https://projects.wazo.community/boards/1/topics/9061 .

I don't really understand much of the log file but is the in-call being routed to the out-call context at line 3?

I thought there may be an issue with the trunk so I created an inbound and outbound trunk.

sip show peers indicates that the 2 sip trunks and 1 connected phone are registered and working.

@Name/username Host Dyn Forcerport Comedia ACL Port Status Description
92aqcXXX (Unspecified) D Yes Yes 0 Unmonitored "Reception 1" <201>
MNF_IB/0939XXXX 125.213.160.81 Yes Yes 5060 OK (27 ms)
MNF_OB/0939XXXX 125.213.160.81 Yes Yes 5060 OK (25 ms)
btpy9XXX (Unspecified) D Yes Yes 0 Unmonitored "Office 2" <212>
m1hqyXXX (Unspecified) D Yes Yes 0 UNKNOWN "Web RTC" <705>
w4nm0XXX/XXXX 192.168.1.202 D Yes Yes 5060 Unmonitored "Reception 2" <202>
w7z1vXXX (Unspecified) D Yes Yes 0 Unmonitored "Incredible PBX" <702>
ynizXXX (Unspecified) D Yes Yes 0 Unmonitored "Office 1" <211>
zucriXXX (Unspecified) D Yes Yes 0 Unmonitored "Reception 3" <203>

Is there any other information I need to provide that can assist in troubleshooting?

(1-3/3)