Web GUI : Adding trunks with inbound and outbound routes

Can someone give me some guidance on what steps to take - using the Web GUI - to have inbound and outbound routes properly configured with trunk(s) ?

I am doing everything via the Web GUI for Wazo and I have installed Wazo with two Aastra IP phones configured and working. I can call one phone from the other and vice versa.

I also added a trunk to my service provider and when I run the CLI command

asterisk -rx “pjsip show registrations”

it shows the trunk as registered.

However, I have configured an Incall route and and Outcall route using the Wazo Web GUI and neither are working. When I call the Inbound numnber, it says “The number has not been assigned.” Since i just moved the trunk over from a working PBX, I know the number is working at the provider end.

I did restart the server in case something needed a refresh to work, but no difference.

Is there some guidance somewhere on making Incalls and Outcalls work via the Wazo Web GUI?

… Hopefull …

@sduthil

I had kind of hijacked @Disciplus topic at
https://wazo-platform.discourse.group/t/wazo-ui-connexion-impossible/121
on root user/password so I decided to continue our conversation here in this topic dedicated to our conversation.

I activated

asterisk -r

to start monitoring the log of activity when making the call tests

I have the incalls getting to my server but am getting the errror messages as shown (I replaced the at symbol with {at} since the forum thought I was trying to tag people with each use of the at symbol and would not let me post)

For Outcall from extension 11002 to {RealNumberHidden}

[2020-01-03 12:53:06.3136] NOTICE[11564]: res_pjsip_session.c:3057 new_invite: Call from ‘11002’ (UDP:{RealISourcePaddressHidden}:57956) to extension ‘{RealNumberHidden}’ rejected because extension not found in context ‘StokeInternalContext’.

The {RealNumberHidden} is the 10-digit NorthAmerican number bing dialed, which, since the Internal Context only is defined to allow extensions from numbers ranging from 10000 to 99999 , it is understandable that it would not contain the {RealNumberHidden}. In the Incall Context, I defined the allowed numbers to be 10-digit from 2010000000 to 9999999999.

For Incall to user SoftPhone from {RealNumberHidden}

[Jan 3 13:09:07] – Executing [s{at}StokeIncallContext:1] NoOp(“PJSIP/{RealNumberHidden}-0000000f”, “”) in new stack
[Jan 3 13:09:07] – Executing [s{at}StokeIncallContext:2] GotoIf(“PJSIP/{RealNumberHidden}-0000000f”, “1?:not-pjsip”) in new stack
[Jan 3 13:09:07] – Executing [s{at}StokeIncallContext:3] GotoIf(“PJSIP/{RealNumberHidden}-0000000f”, “1?:error-loop”) in new stack
[Jan 3 13:09:07] – Executing [s{at}StokeIncallContext:4] Set(“PJSIP/{RealNumberHidden}-0000000f”, “XIVO_DID_NEXT_EXTEN=s”) in new stack
[Jan 3 13:09:07] – Executing [s{at}StokeIncallContext:5] Set(“PJSIP/{RealNumberHidden}-0000000f”, “XIVO_FROM_S=1”) in new stack
[Jan 3 13:09:07] – Executing [s{at}StokeIncallContext:6] Goto(“PJSIP/{RealNumberHidden}-0000000f”, “StokeIncallContext,s,1”) in new stack
[Jan 3 13:09:07] – Goto (StokeIncallContext,s,1)
[Jan 3 13:09:07] – Executing [s{at}StokeIncallContext:1] NoOp(“PJSIP/{RealNumberHidden}-0000000f”, “”) in new stack
[Jan 3 13:09:07] – Executing [s{at}StokeIncallContext:2] GotoIf(“PJSIP/{RealNumberHidden}-0000000f”, “1?:not-pjsip”) in new stack
[Jan 3 13:09:07] – Executing [s{at}StokeIncallContext:3] GotoIf(“PJSIP/{RealNumberHidden}-0000000f”, “0?:error-loop”) in new stack
[Jan 3 13:09:07] – Goto (StokeIncallContext,s,10)
[Jan 3 13:09:07] – Executing [s{at}StokeIncallContext:10] NoOp(“PJSIP/{RealNumberHidden}-0000000f”, “”) in new stack
[Jan 3 13:09:07] – Executing [s{at}StokeIncallContext:11] Log(“PJSIP/{RealNumberHidden}-0000000f”, “ERROR, Dialplan loop detected. Got PJSIP header To: sip:s@192.168.1.201”) in new stack
[2020-01-03 13:09:07.0920] ERROR[12564][C-0000000d]: Ext. s:11 {at} StokeIncallContext: Dialplan loop detected. Got PJSIP header To: sip:s{at}{RealServerIPaddressHidden}
[Jan 3 13:09:07] – Executing [s{at}StokeIncallContext:12] Hangup(“PJSIP/{RealNumberHidden}-0000000f”, “”) in new stack
[Jan 3 13:09:07] == Spawn extension (StokeIncallContext, s, 12) exited non-zero on ‘PJSIP/{RealNumberHidden}-0000000f’

which looks like it is looping, but I do not speak Asterisk as well as you I am sure.

I did notice that there is a spot when defining Contexts to include other Contexts, but I did not have that setup when I ran these tests. I did try adding the to-extern and from-extern Contexts to the Internal Context and other combinations but it did not seem to make a difference.

Is this giving you any indication why the Incalls and Outcalls are not working?

Just to show that the trunk is registered, when I did a

asterisk -rx “pjsip show registrations”

I got back

<Registration/ServerURI…> <Auth…> <Status…>

reg_{RealNumberHidden}{at}{HostFQDNhidden}/sip:{HostFQDN-lessTLD-hidden}. auth_reg_{RealNumberHidden}{at}sip02.unlimitel.ca Registered

Not sure where to go next …

Any suggestions are appreciated.

Hi Ramblin,

thanks for creating the dedicated topic.

To paste logs, you can use the Preformatted text option, or the Code block (triple backquote), as defined in the markdown syntax, like this:

```
I c@n write @s m@ny @ th@t I w@nt
```

About your outgoing calls: you need to include the context to-extern inside StokeInternalContext. You seem to have done this already, but make sure it this way and not the other way around. You should not include from-extern inside StokeInternalContext.

To ensure you can place an outgoing call, use the command asterisk -rx "dialplan show realnumber@StokeInternalContext". You should see something like this:

[ Included context 'to-extern' created by 'pbx_config' ]                                                  
  '_97.' =>         1. Set(XIVO_BASE_CONTEXT=${CONTEXT})          [exec.1578081957365167.-1339782336:1631]
                    2. Set(XIVO_BASE_EXTEN=${EXTEN})              [exec.1578081957365167.-1339782336:1632]
                    3. GoSub(outcall,s,1(39,))                    [exec.1578081957365167.-1339782336:1633]
  '_9X.' =>         1. Set(XIVO_BASE_CONTEXT=${CONTEXT})          [exec.1578081957365167.-1339782336:1643]
                    2. Set(XIVO_BASE_EXTEN=${EXTEN})              [exec.1578081957365167.-1339782336:1644]
                    3. GoSub(outcall,s,1(2,))                     [exec.1578081957365167.-1339782336:1645]
                                                                                                          
-= 2 extensions (6 priorities) in 1 context. =-                                                           

The outcall “regexp” goes in the Outcall form, in the tab Exten, in the field “Extension”. And you are absolutely right about adding _ before the call routing “regexp” in the Outcall form: they must be there. If they’re not, you will see them missing from the dialplan show output.

Now, about your incalls: make sure your trunk is configured with Context = from-extern. I’d like to see the start of the loop: you showed us the end of the loop, but I’d like to know how it started, in order to find the real source of the loop :slight_smile: I guess it is a side-effect of your context inclusion of from-extern inside internal, which you should remove.

Well,

I thought I was going to attach a couple of files to show both my setup/configuration and the results of the asterisk queries, but the system will not let me upload .txt files so this will be a LONG reply, but I wanted you to know what has been setup so hopfully it is worth it.

A couple of questions first:

  • Do I need to port forward or open firewall ports?
    I thought not since outcalls reach out and incalls are based on ongoing registration that originated from inside the LAN but ???
    It does look like incalls are getting to server
    Don’t know whow to tell if outcalls are getting out
  • Are the correct “Host” settings
    – Dynamic for Lines
    – Static (pointing to server) for trunks
    This is what I have used (arrived at via trial and error) and it seems to be working, but wanted to check.

FYI, I have left actual data in here. I kow this means changing the setup after I get it working, but wanted to show you exactly what I am seeing so here it is.

To first answer your specific questions re included Contexts and Dialplans:

  • My previous setup used to send you information did not have any Contexts included in any other Contexts. For this setup, following your instructions, I included to-extern (Outcall) Context in the Internal context and no other included Contexts in any other Context.
  • The results of ’ asterisk -rx “dialplan show realnumber@StokeInternalContext” ’ were different, based on the number being dialed, which is at is should have been since I setup a very tight routing (_519XXXXXXX) for a number to area code 519 and a very open routing (_X.) for calls to any other area code (North American). So the dialplan when calling 5195749401 was two-stage (rollover to second route after first route failed) but the dialplan when calling 4162262143 was single stage, as they both should have been. The actual outputs were:

dialplan show 5195749401@StokeInternalContext
[ Included context ‘StokeOutcallContext’ created by ‘pbx_config’ ]
‘_519XXXXXXX’ => 1. Set(XIVO_BASE_CONTEXT={CONTEXT}) [exec.1578160382615053.140137411409664:75] 2. Set(XIVO_BASE_EXTEN={EXTEN}) [exec.1578160382615053.140137411409664:76]
3. GoSub(outcall,s,1(2,)) [exec.1578160382615053.140137411409664:77]
‘_X.’ => 1. Set(XIVO_BASE_CONTEXT={CONTEXT}) [exec.1578160382615053.140137411409664:79] 2. Set(XIVO_BASE_EXTEN={EXTEN}) [exec.1578160382615053.140137411409664:80]
3. GoSub(outcall,s,1(3,)) [exec.1578160382615053.140137411409664:81]

-= 2 extensions (6 priorities) in 1 context. =-

dialplan show 4162262143@StokeInternalContext
[ Included context ‘StokeOutcallContext’ created by ‘pbx_config’ ]
‘_X.’ => 1. Set(XIVO_BASE_CONTEXT={CONTEXT}) [exec.1578160382615053.140137411409664:79] 2. Set(XIVO_BASE_EXTEN={EXTEN}) [exec.1578160382615053.140137411409664:80]
3. GoSub(outcall,s,1(3,)) [exec.1578160382615053.140137411409664:81]

-= 1 extension (3 priorities) in 1 context. =-

However, neither call resulted in in a call getting to the number. A more detailed asterisk log result is shown below.

Just to show you that the trunks are registering, the output of ’ asterisk -rx “pjsip show registrations” ’ showed both trunks registered

pjsip show registrations

<Registration/ServerURI…> <Auth…> <Status…>

reg_4162269542@sip02.unlimitel.ca/sip:sip02.unlimitel. auth_reg_4162269542@sip02.unlimitel.ca Registered
reg_5198803610@sip06.unlimitel.ca/sip:sip06.unlimitel. auth_reg_5198803610@sip06.unlimitel.ca Registered

Objects found: 2

and the outlput of ’ asteris -rx “pjsip show contacts” ’ showed all Contacts working

pjsip show contacts

Contact: <Aor/ContactUri…> <Hash…> <RTT(ms)…>

Contact: 11002/sip:11002@192.168.1.149:51071;rinstance= 3c508ac860 Avail 107.378
Contact: 4162269542/sip:4162269542@192.168.1.201:5060 decfb63d0d Avail 0.439
Contact: 5198803610/sip:5198803610@192.168.1.201:5060 6896e5edf6 Avail 0.897
Contact: mcoffice-home/sip:mcoffice-home@192.168.1.153: 40c100a50d Avail 29.426
Contact: mcoffice_ayuda/sip:mcoffice_ayuda@192.168.1.15 4bcbb4e4bd Avail 32.791
Contact: rcoffice_ayuda/sip:rcoffice_ayuda@192.168.1.19 26c3534de7 Avail 29.337
Contact: rcoffice_home/sip:rcoffice_home@192.168.1.192: 23405089e5 Avail 30.200

Objects found: 7

and the output of ’ asterisk -rx “pjsip show endpoints” ’ showed the endpoints all available, excpet one endpoint that was not created by me (at least not intentionally …)

pjsip show endpoints

Endpoint: <Endpoint/CID…> <State…> <Channels.>
I/OAuth: <AuthId/UserName…>
Aor: <Aor…>
Contact: <Aor/ContactUri…> <Hash…> <RTT(ms)…>
Transport: <TransportId…> <BindAddress…>
Identify: <Identify/Endpoint…>
Match: <criteria…>
Channel: <ChannelId…> <State…> <Time…>
Exten: <DialedExten…> CLCID: <ConnectedLineCID…>

Endpoint: 11002/5195551212 Not in use 0 of inf
InAuth: 11002/11002
Aor: 11002 1
Contact: 11002/sip:11002@192.168.1.149:51071;rinsta 3c508ac860 Avail 107.378
Transport: transport-udp udp 0 0 0.0.0.0:5060

Endpoint: 4162269542 Not in use 0 of inf
OutAuth: 4162269542/4162269542
Aor: 4162269542 0
Contact: 4162269542/sip:4162269542@192.168.1.201:50 decfb63d0d Avail 0.482
Transport: transport-udp udp 0 0 0.0.0.0:5060
Identify: 4162269542/4162269542
Match: 192.168.1.201/32

Endpoint: 5198803610 Not in use 0 of inf
OutAuth: 5198803610/5198803610
InAuth: 5198803610/5198803610
Aor: 5198803610 0
Contact: 5198803610/sip:5198803610@192.168.1.201:50 6896e5edf6 Avail 0.897
Transport: transport-udp udp 0 0 0.0.0.0:5060
Identify: 5198803610/5198803610
Match: 192.168.1.201/32

Endpoint: apn23RVVX8 Unavailable 0 of inf
InAuth: apn23RVVX8-auth/apn23RVVX8
Aor: apn23RVVX8 100
Transport: transport-udp udp 0 0 0.0.0.0:5060

Endpoint: mcoffice-home/5195710413 Not in use 0 of inf
InAuth: mcoffice-home/mcoffice-home
Aor: mcoffice-home 1
Contact: mcoffice-home/sip:mcoffice-home@192.168.1. 40c100a50d Avail 30.010
Transport: transport-udp udp 0 0 0.0.0.0:5060

Endpoint: mcoffice_ayuda/5199572414 Not in use 0 of inf
InAuth: mcoffice_ayuda/mcoffice_ayuda
Aor: mcoffice_ayuda 1
Contact: mcoffice_ayuda/sip:mcoffice_ayuda@192.168. 4bcbb4e4bd Avail 31.914
Transport: transport-udp udp 0 0 0.0.0.0:5060

Endpoint: rcoffice_ayuda/5199572414 Not in use 0 of inf
InAuth: rcoffice_ayuda/rcoffice_ayuda
Aor: rcoffice_ayuda 1
Contact: rcoffice_ayuda/sip:rcoffice_ayuda@192.168. 26c3534de7 Avail 29.307
Transport: transport-udp udp 0 0 0.0.0.0:5060

Endpoint: rcoffice_home/5195710413 Not in use 0 of inf
InAuth: rcoffice_home/rcoffice_home
Aor: rcoffice_home 1
Contact: rcoffice_home/sip:rcoffice_home@192.168.1. 23405089e5 Avail 30.342
Transport: transport-udp udp 0 0 0.0.0.0:5060

Objects found: 8

so, this is where I currently sit:

  • I have 2 devices and one softphone setup and working perfectly as long as I stay inside my LAN. They can call back and forth to each other.
  • I have two trunks that are connected to a provider and registered.
  • I have two Incall routes setup and two Outcall routes setup but I cannot receive calls or call out, event though the inbound calls are getting to the server and the outbound calls do appear to be caught properly by the established routes (Extensions).

Now here comes the lengthy part (as if the above was short) :frowning: (sorry)

=========================================================

My setup

Setup - everything SIP

Set Sequence (shown differently below to help clarity):
Provisioning
Devices
Users
Lines
Trunks
Incalls
Outcalls

System setup
(More to come once I get it working)
Room 1 - RC Office with Device 1 having 2 lines: 1 for home and 1 for business
Room 2 - MC Office with Device 2 having 2 lines: 1 for home and 1 for business
PC - Soft Phone with no Device and 1 line for whatever is needed

Contexts

Context StokeInternal = Internal
Included Context = to-extern
Range: 10000 to 99999

Context StokeIncall = from-extern
Included Context = none
Range: 2010000000 to 9999999999

Context StokeOutcall = to-extern
Included Context = none

Trunks
All trunks with Host = {server IP Address = 192.168.1.201}

Trunk 1
Context = from-extern
Host = Static => {server IP Address = 192.168.1.201}
Number associated = 5198803610
Options = as assigned by default by Wazo

Trunk 2
Context = from-extern
Host = Static => {server IP Address = 192.168.1.201}
Number associated = 4162269542
Options = As defined by default with Wazo plus custom for provider

Lines
(All Lines with Host = Dynamic)

Line 1
Softphone

Line 2 - rcoffice-home
Device A - Line 1

Line # - rcoffice-ayuda
Device A - Line 2

Line 4 - mcoffice-home
Device B - Line 1

Line 5 - mcoffice-ayuda
Device B - Line 2

Devices

Device 1
Aastra
Line 1 = rcoffice-home
Line 3 = rcoffice-ayuda

Device 2
Aastra
Line 1 = mcoffice-home
Line 3 - mcoffice-ayuda

Users

User 1 - Softphone

User 2 - StokeHome
Device A Line 1
Device B - Line 1

User 3 - StokeAyuda
Device A - Line 2
Device B - Line 2

Incalls

5198803610 -> User StokeHome = Lines 2 and 4
4162269542 -> User SoftPhone = Line 1

Outcalls

_519XXXXXXX for Trunk 1
_X. for Trunk 2

=========================================================

Outputs from asterisk queries - added in seperate replay (character count exceeded for one reply)

Reply 2 of 2 - showing responses to asterisk queries

When called out from device to 5195749401 which tries trunk 1 (519 = basic config) due to exact matching pattern, fails, then tries trunk 2 (416 = full config) with fully open pattern

[Jan 4 13:30:29] == Manager ‘xivo_munin_user’ logged on from 127.0.0.1
[Jan 4 13:30:29] == Manager ‘xivo_munin_user’ logged off from 127.0.0.1
[Jan 4 13:30:30] == Manager ‘xivo_munin_user’ logged on from 127.0.0.1
[Jan 4 13:30:34] == Setting global variable ‘SIPDOMAIN’ to ‘192.168.1.201’
[Jan 4 13:30:34] – Executing [5195749401@StokeInternalContext:1] Set(“PJSIP/rcoffice_home-0000000d”, “XIVO_BASE_CONTEXT=StokeInternalContext”) in new stack
[Jan 4 13:30:34] – Executing [5195749401@StokeInternalContext:2] Set(“PJSIP/rcoffice_home-0000000d”, “XIVO_BASE_EXTEN=5195749401”) in new stack
[Jan 4 13:30:34] – Executing [5195749401@StokeInternalContext:3] Gosub(“PJSIP/rcoffice_home-0000000d”, “outcall,s,1(2,)”) in new stack
[Jan 4 13:30:34] – Executing [s@outcall:1] Set(“PJSIP/rcoffice_home-0000000d”, “XIVO_DSTID=2”) in new stack
[Jan 4 13:30:34] – Executing [s@outcall:2] Set(“PJSIP/rcoffice_home-0000000d”, “XIVO_PRESUBR_GLOBAL_NAME=OUTCALL”) in new stack
[Jan 4 13:30:34] – Executing [s@outcall:3] Set(“PJSIP/rcoffice_home-0000000d”, “XIVO_SRCNUM=5195710413”) in new stack
[Jan 4 13:30:34] – Executing [s@outcall:4] Set(“PJSIP/rcoffice_home-0000000d”, “XIVO_DSTNUM=5195749401”) in new stack
[Jan 4 13:30:34] – Executing [s@outcall:5] Set(“PJSIP/rcoffice_home-0000000d”, “XIVO_CONTEXT=StokeInternalContext”) in new stack
[Jan 4 13:30:34] – Executing [s@outcall:6] Set(“PJSIP/rcoffice_home-0000000d”, “WAZO_CHANNEL_DIRECTION=to-wazo”) in new stack
[Jan 4 13:30:34] – Executing [s@outcall:7] Gosub(“PJSIP/rcoffice_home-0000000d”, “originate-caller-id,s,1”) in new stack
[Jan 4 13:30:34] – Executing [s@originate-caller-id:1] GotoIf(“PJSIP/rcoffice_home-0000000d”, “0?:name”) in new stack
[Jan 4 13:30:34] – Goto (originate-caller-id,s,3)
[Jan 4 13:30:34] – Executing [s@originate-caller-id:3] GotoIf(“PJSIP/rcoffice_home-0000000d”, “0?:fix”) in new stack
[Jan 4 13:30:34] – Goto (originate-caller-id,s,5)
[Jan 4 13:30:34] – Executing [s@originate-caller-id:5] GotoIf(“PJSIP/rcoffice_home-0000000d”, “?:end”) in new stack
[Jan 4 13:30:34] – Goto (originate-caller-id,s,9)
[Jan 4 13:30:34] – Executing [s@originate-caller-id:9] Return(“PJSIP/rcoffice_home-0000000d”, “”) in new stack
[Jan 4 13:30:34] – Executing [s@outcall:8] AGI(“PJSIP/rcoffice_home-0000000d”, “agi://localhost/outgoing_user_set_features”) in new stack
[Jan 4 13:30:34] agi://localhost/outgoing_user_set_features: AGI handler ‘outgoing_user_set_features’ successfully executed
[Jan 4 13:30:34] – <PJSIP/rcoffice_home-0000000d>AGI Script agi://localhost/outgoing_user_set_features completed, returning 0
[Jan 4 13:30:34] – Executing [s@outcall:9] Gosub(“PJSIP/rcoffice_home-0000000d”, “wazo-setup-userevent-dial-echo,s,1”) in new stack
[Jan 4 13:30:34] – Executing [s@wazo-setup-userevent-dial-echo:1] GotoIf(“PJSIP/rcoffice_home-0000000d”, “0?:return”) in new stack
[Jan 4 13:30:34] – Goto (wazo-setup-userevent-dial-echo,s,3)
[Jan 4 13:30:34] – Executing [s@wazo-setup-userevent-dial-echo:3] Return(“PJSIP/rcoffice_home-0000000d”, “”) in new stack
[Jan 4 13:30:34] – Executing [s@outcall:10] Gosub(“PJSIP/rcoffice_home-0000000d”, “xivo-subroutine,s,1()”) in new stack
[Jan 4 13:30:34] – Executing [s@xivo-subroutine:1] GotoIf(“PJSIP/rcoffice_home-0000000d”, “?:nosubroutine”) in new stack
[Jan 4 13:30:34] – Goto (xivo-subroutine,s,4)
[Jan 4 13:30:34] – Executing [s@xivo-subroutine:4] Return(“PJSIP/rcoffice_home-0000000d”, “”) in new stack
[Jan 4 13:30:34] – Executing [s@outcall:11] Gosub(“PJSIP/rcoffice_home-0000000d”, “xivo-user_rights_check,s,1”) in new stack
[Jan 4 13:30:34] – Executing [s@xivo-user_rights_check:1] AGI(“PJSIP/rcoffice_home-0000000d”, “agi://localhost/user_set_call_rights”) in new stack
[Jan 4 13:30:34] agi://localhost/user_set_call_rights: AGI handler ‘user_set_call_rights’ successfully executed
[Jan 4 13:30:34] – <PJSIP/rcoffice_home-0000000d>AGI Script agi://localhost/user_set_call_rights completed, returning 0
[Jan 4 13:30:34] – Executing [s@xivo-user_rights_check:2] GotoIf(“PJSIP/rcoffice_home-0000000d”, “ALLOW?:error,1”) in new stack
[Jan 4 13:30:34] – Executing [s@xivo-user_rights_check:3] GotoIf(“PJSIP/rcoffice_home-0000000d”, “1?allow,1”) in new stack
[Jan 4 13:30:34] – Goto (xivo-user_rights_check,allow,1)
[Jan 4 13:30:34] – Executing [allow@xivo-user_rights_check:1] NoOp(“PJSIP/rcoffice_home-0000000d”, “User allowed to make call”) in new stack
[Jan 4 13:30:34] – Executing [allow@xivo-user_rights_check:2] Return(“PJSIP/rcoffice_home-0000000d”, “”) in new stack
[Jan 4 13:30:34] – Executing [s@outcall:12] AGI(“PJSIP/rcoffice_home-0000000d”, “agi://localhost/check_schedule”) in new stack
[Jan 4 13:30:34] agi://localhost/check_schedule: AGI handler ‘check_schedule’ successfully executed
[Jan 4 13:30:34] – <PJSIP/rcoffice_home-0000000d>AGI Script agi://localhost/check_schedule completed, returning 0
[Jan 4 13:30:34] – Executing [s@outcall:13] GotoIf(“PJSIP/rcoffice_home-0000000d”, “0?CLOSED,1”) in new stack
[Jan 4 13:30:34] – Executing [s@outcall:14] GotoIf(“PJSIP/rcoffice_home-0000000d”, “?:16”) in new stack
[Jan 4 13:30:34] – Goto (outcall,s,16)
[Jan 4 13:30:34] – Executing [s@outcall:16] GotoIf(“PJSIP/rcoffice_home-0000000d”, “PJSIP?:error,1”) in new stack
[Jan 4 13:30:34] – Executing [s@outcall:17] Set(“PJSIP/rcoffice_home-0000000d”, “TRUNKINDEX=0”) in new stack
[Jan 4 13:30:34] – Executing [s@outcall:18] Goto(“PJSIP/rcoffice_home-0000000d”, “dial,1”) in new stack
[Jan 4 13:30:34] – Goto (outcall,dial,1)
[Jan 4 13:30:34] – Executing [dial@outcall:1] Set(“PJSIP/rcoffice_home-0000000d”, “INTERFACE=PJSIP”) in new stack
[Jan 4 13:30:34] – Executing [dial@outcall:2] Set(“PJSIP/rcoffice_home-0000000d”, “TRUNKEXTEN=5195749401@5198803610”) in new stack
[Jan 4 13:30:34] – Executing [dial@outcall:3] Set(“PJSIP/rcoffice_home-0000000d”, “TRUNKSUFFIX=”) in new stack
[Jan 4 13:30:34] – Executing [dial@outcall:4] Gosub(“PJSIP/rcoffice_home-0000000d”, “xivo-global-subroutine,s,1”) in new stack
[Jan 4 13:30:34] – Executing [s@xivo-global-subroutine:1] GotoIf(“PJSIP/rcoffice_home-0000000d”, “1?:return”) in new stack
[Jan 4 13:30:34] – Executing [s@xivo-global-subroutine:2] GotoIf(“PJSIP/rcoffice_home-0000000d”, “OUTCALL?:return”) in new stack
[Jan 4 13:30:34] – Executing [s@xivo-global-subroutine:3] GotoIf(“PJSIP/rcoffice_home-0000000d”, “xivo-subrgbl-outcall?:return”) in new stack
[Jan 4 13:30:34] – Executing [s@xivo-global-subroutine:4] GotoIf(“PJSIP/rcoffice_home-0000000d”, “0?:return”) in new stack
[Jan 4 13:30:34] – Goto (xivo-global-subroutine,s,6)
[Jan 4 13:30:34] – Executing [s@xivo-global-subroutine:6] Return(“PJSIP/rcoffice_home-0000000d”, “”) in new stack
[Jan 4 13:30:34] – Executing [dial@outcall:5] CELGenUserEvent(“PJSIP/rcoffice_home-0000000d”, “XIVO_OUTCALL”) in new stack
[Jan 4 13:30:34] – Executing [dial@outcall:6] Set(“PJSIP/rcoffice_home-0000000d”, “CONNECTEDLINE(num,i)=5195749401”) in new stack
[Jan 4 13:30:34] – Executing [dial@outcall:7] Dial(“PJSIP/rcoffice_home-0000000d”, “PJSIP/5195749401@5198803610,o(5195749401)”) in new stack
[Jan 4 13:30:34] – Called PJSIP/5195749401@5198803610
[2020-01-04 13:30:34.2083] NOTICE[10444]: res_pjsip_session.c:3057 new_invite: Call from ‘4162269542’ (UDP:192.168.1.201:5060) to extension ‘5195749401’ rejected because extension not found in context ‘StokeIncallContext’.
[Jan 4 13:30:34] == Everyone is busy/congested at this time (1:0/0/1)
[Jan 4 13:30:34] – Executing [dial@outcall:8] Goto(“PJSIP/rcoffice_home-0000000d”, “CHANUNAVAIL,1”) in new stack
[Jan 4 13:30:34] – Goto (outcall,CHANUNAVAIL,1)
[Jan 4 13:30:34] – Executing [CHANUNAVAIL@outcall:1] Goto(“PJSIP/rcoffice_home-0000000d”, “redial,1”) in new stack
[Jan 4 13:30:34] – Goto (outcall,redial,1)
[Jan 4 13:30:34] – Executing [redial@outcall:1] Set(“PJSIP/rcoffice_home-0000000d”, “TRUNKINDEX=1”) in new stack
[Jan 4 13:30:34] – Executing [redial@outcall:2] GotoIf(“PJSIP/rcoffice_home-0000000d”, “?dial,1”) in new stack
[Jan 4 13:30:34] – Executing [redial@outcall:3] Playback(“PJSIP/rcoffice_home-0000000d”, “congestion-call”) in new stack
[Jan 4 13:30:34] > 0x7f741c006a20 – Strict RTP learning after remote address set to: 192.168.1.192:10002
[Jan 4 13:30:34] > 0x7f741c006a20 – Strict RTP switching to RTP target address 192.168.1.192:10002 as source
[Jan 4 13:30:34] – <PJSIP/rcoffice_home-0000000d> Playing ‘congestion-call.slin’ (language ‘en_US’)
[Jan 4 13:30:40] == Manager ‘xivo_munin_user’ logged off from 127.0.0.1

When called out from device to 4162262143 which uses trunk 2 only (with extra confgs for provider)

[Jan 4 13:30:40] == Manager ‘xivo_munin_user’ logged off from 127.0.0.1
[Jan 4 13:34:17] == Setting global variable ‘SIPDOMAIN’ to ‘192.168.1.201’
[Jan 4 13:34:17] – Executing [4162262143@StokeInternalContext:1] Set(“PJSIP/rcoffice_home-0000000f”, “XIVO_BASE_CONTEXT=StokeInternalContext”) in new stack
[Jan 4 13:34:17] – Executing [4162262143@StokeInternalContext:2] Set(“PJSIP/rcoffice_home-0000000f”, “XIVO_BASE_EXTEN=4162262143”) in new stack
[Jan 4 13:34:17] – Executing [4162262143@StokeInternalContext:3] Gosub(“PJSIP/rcoffice_home-0000000f”, “outcall,s,1(3,)”) in new stack
[Jan 4 13:34:17] – Executing [s@outcall:1] Set(“PJSIP/rcoffice_home-0000000f”, “XIVO_DSTID=3”) in new stack
[Jan 4 13:34:17] – Executing [s@outcall:2] Set(“PJSIP/rcoffice_home-0000000f”, “XIVO_PRESUBR_GLOBAL_NAME=OUTCALL”) in new stack
[Jan 4 13:34:17] – Executing [s@outcall:3] Set(“PJSIP/rcoffice_home-0000000f”, “XIVO_SRCNUM=5195710413”) in new stack
[Jan 4 13:34:17] – Executing [s@outcall:4] Set(“PJSIP/rcoffice_home-0000000f”, “XIVO_DSTNUM=4162262143”) in new stack
[Jan 4 13:34:17] – Executing [s@outcall:5] Set(“PJSIP/rcoffice_home-0000000f”, “XIVO_CONTEXT=StokeInternalContext”) in new stack
[Jan 4 13:34:17] – Executing [s@outcall:6] Set(“PJSIP/rcoffice_home-0000000f”, “WAZO_CHANNEL_DIRECTION=to-wazo”) in new stack
[Jan 4 13:34:17] – Executing [s@outcall:7] Gosub(“PJSIP/rcoffice_home-0000000f”, “originate-caller-id,s,1”) in new stack
[Jan 4 13:34:17] – Executing [s@originate-caller-id:1] GotoIf(“PJSIP/rcoffice_home-0000000f”, “0?:name”) in new stack
[Jan 4 13:34:17] – Goto (originate-caller-id,s,3)
[Jan 4 13:34:17] – Executing [s@originate-caller-id:3] GotoIf(“PJSIP/rcoffice_home-0000000f”, “0?:fix”) in new stack
[Jan 4 13:34:17] – Goto (originate-caller-id,s,5)
[Jan 4 13:34:17] – Executing [s@originate-caller-id:5] GotoIf(“PJSIP/rcoffice_home-0000000f”, “?:end”) in new stack
[Jan 4 13:34:17] – Goto (originate-caller-id,s,9)
[Jan 4 13:34:17] – Executing [s@originate-caller-id:9] Return(“PJSIP/rcoffice_home-0000000f”, “”) in new stack
[Jan 4 13:34:17] – Executing [s@outcall:8] AGI(“PJSIP/rcoffice_home-0000000f”, “agi://localhost/outgoing_user_set_features”) in new stack
[Jan 4 13:34:17] agi://localhost/outgoing_user_set_features: AGI handler ‘outgoing_user_set_features’ successfully executed
[Jan 4 13:34:17] – <PJSIP/rcoffice_home-0000000f>AGI Script agi://localhost/outgoing_user_set_features completed, returning 0
[Jan 4 13:34:17] – Executing [s@outcall:9] Gosub(“PJSIP/rcoffice_home-0000000f”, “wazo-setup-userevent-dial-echo,s,1”) in new stack
[Jan 4 13:34:17] – Executing [s@wazo-setup-userevent-dial-echo:1] GotoIf(“PJSIP/rcoffice_home-0000000f”, “0?:return”) in new stack
[Jan 4 13:34:17] – Goto (wazo-setup-userevent-dial-echo,s,3)
[Jan 4 13:34:17] – Executing [s@wazo-setup-userevent-dial-echo:3] Return(“PJSIP/rcoffice_home-0000000f”, “”) in new stack
[Jan 4 13:34:17] – Executing [s@outcall:10] Gosub(“PJSIP/rcoffice_home-0000000f”, “xivo-subroutine,s,1()”) in new stack
[Jan 4 13:34:17] – Executing [s@xivo-subroutine:1] GotoIf(“PJSIP/rcoffice_home-0000000f”, “?:nosubroutine”) in new stack
[Jan 4 13:34:17] – Goto (xivo-subroutine,s,4)
[Jan 4 13:34:17] – Executing [s@xivo-subroutine:4] Return(“PJSIP/rcoffice_home-0000000f”, “”) in new stack
[Jan 4 13:34:17] – Executing [s@outcall:11] Gosub(“PJSIP/rcoffice_home-0000000f”, “xivo-user_rights_check,s,1”) in new stack
[Jan 4 13:34:17] – Executing [s@xivo-user_rights_check:1] AGI(“PJSIP/rcoffice_home-0000000f”, “agi://localhost/user_set_call_rights”) in new stack
[Jan 4 13:34:17] agi://localhost/user_set_call_rights: AGI handler ‘user_set_call_rights’ successfully executed
[Jan 4 13:34:17] – <PJSIP/rcoffice_home-0000000f>AGI Script agi://localhost/user_set_call_rights completed, returning 0
[Jan 4 13:34:17] – Executing [s@xivo-user_rights_check:2] GotoIf(“PJSIP/rcoffice_home-0000000f”, “ALLOW?:error,1”) in new stack
[Jan 4 13:34:17] – Executing [s@xivo-user_rights_check:3] GotoIf(“PJSIP/rcoffice_home-0000000f”, “1?allow,1”) in new stack
[Jan 4 13:34:17] – Goto (xivo-user_rights_check,allow,1)
[Jan 4 13:34:17] – Executing [allow@xivo-user_rights_check:1] NoOp(“PJSIP/rcoffice_home-0000000f”, “User allowed to make call”) in new stack
[Jan 4 13:34:17] – Executing [allow@xivo-user_rights_check:2] Return(“PJSIP/rcoffice_home-0000000f”, “”) in new stack
[Jan 4 13:34:17] – Executing [s@outcall:12] AGI(“PJSIP/rcoffice_home-0000000f”, “agi://localhost/check_schedule”) in new stack
[Jan 4 13:34:17] agi://localhost/check_schedule: AGI handler ‘check_schedule’ successfully executed
[Jan 4 13:34:17] – <PJSIP/rcoffice_home-0000000f>AGI Script agi://localhost/check_schedule completed, returning 0
[Jan 4 13:34:17] – Executing [s@outcall:13] GotoIf(“PJSIP/rcoffice_home-0000000f”, “0?CLOSED,1”) in new stack
[Jan 4 13:34:17] – Executing [s@outcall:14] GotoIf(“PJSIP/rcoffice_home-0000000f”, “?:16”) in new stack
[Jan 4 13:34:17] – Goto (outcall,s,16)
[Jan 4 13:34:17] – Executing [s@outcall:16] GotoIf(“PJSIP/rcoffice_home-0000000f”, “PJSIP?:error,1”) in new stack
[Jan 4 13:34:17] – Executing [s@outcall:17] Set(“PJSIP/rcoffice_home-0000000f”, “TRUNKINDEX=0”) in new stack
[Jan 4 13:34:17] – Executing [s@outcall:18] Goto(“PJSIP/rcoffice_home-0000000f”, “dial,1”) in new stack
[Jan 4 13:34:17] – Goto (outcall,dial,1)
[Jan 4 13:34:17] – Executing [dial@outcall:1] Set(“PJSIP/rcoffice_home-0000000f”, “INTERFACE=PJSIP”) in new stack
[Jan 4 13:34:17] – Executing [dial@outcall:2] Set(“PJSIP/rcoffice_home-0000000f”, “TRUNKEXTEN=4162262143@4162269542”) in new stack
[Jan 4 13:34:17] – Executing [dial@outcall:3] Set(“PJSIP/rcoffice_home-0000000f”, “TRUNKSUFFIX=”) in new stack
[Jan 4 13:34:17] – Executing [dial@outcall:4] Gosub(“PJSIP/rcoffice_home-0000000f”, “xivo-global-subroutine,s,1”) in new stack
[Jan 4 13:34:17] – Executing [s@xivo-global-subroutine:1] GotoIf(“PJSIP/rcoffice_home-0000000f”, “1?:return”) in new stack
[Jan 4 13:34:17] – Executing [s@xivo-global-subroutine:2] GotoIf(“PJSIP/rcoffice_home-0000000f”, “OUTCALL?:return”) in new stack
[Jan 4 13:34:17] – Executing [s@xivo-global-subroutine:3] GotoIf(“PJSIP/rcoffice_home-0000000f”, “xivo-subrgbl-outcall?:return”) in new stack
[Jan 4 13:34:17] – Executing [s@xivo-global-subroutine:4] GotoIf(“PJSIP/rcoffice_home-0000000f”, “0?:return”) in new stack
[Jan 4 13:34:17] – Goto (xivo-global-subroutine,s,6)
[Jan 4 13:34:17] – Executing [s@xivo-global-subroutine:6] Return(“PJSIP/rcoffice_home-0000000f”, “”) in new stack
[Jan 4 13:34:17] – Executing [dial@outcall:5] CELGenUserEvent(“PJSIP/rcoffice_home-0000000f”, “XIVO_OUTCALL”) in new stack
[Jan 4 13:34:17] – Executing [dial@outcall:6] Set(“PJSIP/rcoffice_home-0000000f”, “CONNECTEDLINE(num,i)=4162262143”) in new stack
[Jan 4 13:34:17] – Executing [dial@outcall:7] Dial(“PJSIP/rcoffice_home-0000000f”, “PJSIP/4162262143@4162269542,o(4162262143)”) in new stack
[Jan 4 13:34:17] – Called PJSIP/4162262143@4162269542
[2020-01-04 13:34:17.3109] NOTICE[6707]: res_pjsip_session.c:3057 new_invite: Call from ‘4162269542’ (UDP:192.168.1.201:5060) to extension ‘4162262143’ rejected because extension not found in context ‘StokeIncallContext’.
[Jan 4 13:34:17] == Everyone is busy/congested at this time (1:0/0/1)
[Jan 4 13:34:17] – Executing [dial@outcall:8] Goto(“PJSIP/rcoffice_home-0000000f”, “CHANUNAVAIL,1”) in new stack
[Jan 4 13:34:17] – Goto (outcall,CHANUNAVAIL,1)
[Jan 4 13:34:17] – Executing [CHANUNAVAIL@outcall:1] Goto(“PJSIP/rcoffice_home-0000000f”, “redial,1”) in new stack
[Jan 4 13:34:17] – Goto (outcall,redial,1)
[Jan 4 13:34:17] – Executing [redial@outcall:1] Set(“PJSIP/rcoffice_home-0000000f”, “TRUNKINDEX=1”) in new stack
[Jan 4 13:34:17] – Executing [redial@outcall:2] GotoIf(“PJSIP/rcoffice_home-0000000f”, “?dial,1”) in new stack
[Jan 4 13:34:17] – Executing [redial@outcall:3] Playback(“PJSIP/rcoffice_home-0000000f”, “congestion-call”) in new stack
[Jan 4 13:34:17] > 0x7f7460035a60 – Strict RTP learning after remote address set to: 192.168.1.192:10002
[Jan 4 13:34:17] > 0x7f7460035a60 – Strict RTP switching to RTP target address 192.168.1.192:10002 as source
[Jan 4 13:34:17] – <PJSIP/rcoffice_home-0000000f> Playing ‘congestion-call.slin’ (language ‘en_US’)
[Jan 4 13:35:01] == Manager ‘xivo_munin_user’ logged on from 127.0.0.1

Call in to 4162269542 (with extra confgs for provider) which is directed to single extension softphone (which is connected and on hook) - gets busy signal

[Jan 4 13:36:45] == Setting global variable ‘SIPDOMAIN’ to ‘192.168.1.201’
[Jan 4 13:36:45] – Executing [s@StokeIncallContext:1] NoOp(“PJSIP/4162269542-00000011”, “”) in new stack
[Jan 4 13:36:45] – Executing [s@StokeIncallContext:2] GotoIf(“PJSIP/4162269542-00000011”, “1?:not-pjsip”) in new stack
[Jan 4 13:36:45] – Executing [s@StokeIncallContext:3] GotoIf(“PJSIP/4162269542-00000011”, “1?:error-loop”) in new stack
[Jan 4 13:36:45] – Executing [s@StokeIncallContext:4] Set(“PJSIP/4162269542-00000011”, “XIVO_DID_NEXT_EXTEN=s”) in new stack
[Jan 4 13:36:45] – Executing [s@StokeIncallContext:5] Set(“PJSIP/4162269542-00000011”, “XIVO_FROM_S=1”) in new stack
[Jan 4 13:36:45] – Executing [s@StokeIncallContext:6] Goto(“PJSIP/4162269542-00000011”, “StokeIncallContext,s,1”) in new stack
[Jan 4 13:36:45] – Goto (StokeIncallContext,s,1)
[Jan 4 13:36:45] – Executing [s@StokeIncallContext:1] NoOp(“PJSIP/4162269542-00000011”, “”) in new stack
[Jan 4 13:36:45] – Executing [s@StokeIncallContext:2] GotoIf(“PJSIP/4162269542-00000011”, “1?:not-pjsip”) in new stack
[Jan 4 13:36:45] – Executing [s@StokeIncallContext:3] GotoIf(“PJSIP/4162269542-00000011”, “0?:error-loop”) in new stack
[Jan 4 13:36:45] – Goto (StokeIncallContext,s,10)
[Jan 4 13:36:45] – Executing [s@StokeIncallContext:10] NoOp(“PJSIP/4162269542-00000011”, “”) in new stack
[Jan 4 13:36:45] – Executing [s@StokeIncallContext:11] Log(“PJSIP/4162269542-00000011”, “ERROR, Dialplan loop detected. Got PJSIP header To: sip:s@192.168.1.201”) in new stack
[2020-01-04 13:36:45.9759] ERROR[19190][C-0000000b]: Ext. s:11 @ StokeIncallContext: Dialplan loop detected. Got PJSIP header To: sip:s@192.168.1.201
[Jan 4 13:36:45] – Executing [s@StokeIncallContext:12] Hangup(“PJSIP/4162269542-00000011”, “”) in new stack
[Jan 4 13:36:45] == Spawn extension (StokeIncallContext, s, 12) exited non-zero on ‘PJSIP/4162269542-00000011’

call to 5198803610 (basic config) which is directed to User which has two lines on it - gets response number not assigned

[Jan 4 13:36:45] == Setting global variable ‘SIPDOMAIN’ to ‘192.168.1.201’
[Jan 4 13:36:45] – Executing [s@StokeIncallContext:1] NoOp(“PJSIP/4162269542-00000011”, “”) in new stack
[Jan 4 13:36:45] – Executing [s@StokeIncallContext:2] GotoIf(“PJSIP/4162269542-00000011”, “1?:not-pjsip”) in new stack
[Jan 4 13:36:45] – Executing [s@StokeIncallContext:3] GotoIf(“PJSIP/4162269542-00000011”, “1?:error-loop”) in new stack
[Jan 4 13:36:45] – Executing [s@StokeIncallContext:4] Set(“PJSIP/4162269542-00000011”, “XIVO_DID_NEXT_EXTEN=s”) in new stack
[Jan 4 13:36:45] – Executing [s@StokeIncallContext:5] Set(“PJSIP/4162269542-00000011”, “XIVO_FROM_S=1”) in new stack
[Jan 4 13:36:45] – Executing [s@StokeIncallContext:6] Goto(“PJSIP/4162269542-00000011”, “StokeIncallContext,s,1”) in new stack
[Jan 4 13:36:45] – Goto (StokeIncallContext,s,1)
[Jan 4 13:36:45] – Executing [s@StokeIncallContext:1] NoOp(“PJSIP/4162269542-00000011”, “”) in new stack
[Jan 4 13:36:45] – Executing [s@StokeIncallContext:2] GotoIf(“PJSIP/4162269542-00000011”, “1?:not-pjsip”) in new stack
[Jan 4 13:36:45] – Executing [s@StokeIncallContext:3] GotoIf(“PJSIP/4162269542-00000011”, “0?:error-loop”) in new stack
[Jan 4 13:36:45] – Goto (StokeIncallContext,s,10)
[Jan 4 13:36:45] – Executing [s@StokeIncallContext:10] NoOp(“PJSIP/4162269542-00000011”, “”) in new stack
[Jan 4 13:36:45] – Executing [s@StokeIncallContext:11] Log(“PJSIP/4162269542-00000011”, “ERROR, Dialplan loop detected. Got PJSIP header To: sip:s@192.168.1.201”) in new stack
[2020-01-04 13:36:45.9759] ERROR[19190][C-0000000b]: Ext. s:11 @ StokeIncallContext: Dialplan loop detected. Got PJSIP header To: sip:s@192.168.1.201
[Jan 4 13:36:45] – Executing [s@StokeIncallContext:12] Hangup(“PJSIP/4162269542-00000011”, “”) in new stack
[Jan 4 13:36:45] == Spawn extension (StokeIncallContext, s, 12) exited non-zero on ‘PJSIP/4162269542-00000011’
[2020-01-04 13:37:29.6741] NOTICE[6707]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request ‘INVITE’ from ‘“RICHARD CANTIN” sip:5195749401@216.254.220.21’ failed for ‘216.254.220.21:5060’ (callid: 39d015d2078aa54046eb3ae3766e5ce1@216.254.220.21) - Failed to authenticate
[2020-01-04 13:37:29.6867] NOTICE[6707]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request ‘INVITE’ from ‘“RICHARD CANTIN” sip:5195749401@216.254.220.21’ failed for ‘216.254.220.21:5060’ (callid: 39d015d2078aa54046eb3ae3766e5ce1@216.254.220.21) - Failed to authenticate
[2020-01-04 13:37:29.6994] NOTICE[6707]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request ‘INVITE’ from ‘“RICHARD CANTIN” sip:5195749401@216.254.220.21’ failed for ‘216.254.220.21:5060’ (callid: 39d015d2078aa54046eb3ae3766e5ce1@216.254.220.21) - Failed to authenticate
[2020-01-04 13:37:30.1201] NOTICE[6707]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request ‘INVITE’ from ‘“RICHARD CANTIN” sip:5195749401@216.254.220.21’ failed for ‘216.254.220.21:5060’ (callid: 5489d8ce2a9094494ae7f05a25c5ffe8@216.254.220.21) - Failed to authenticate
[2020-01-04 13:37:30.1323] NOTICE[6707]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request ‘INVITE’ from ‘“RICHARD CANTIN” sip:5195749401@216.254.220.21’ failed for ‘216.254.220.21:5060’ (callid: 5489d8ce2a9094494ae7f05a25c5ffe8@216.254.220.21) - Failed to authenticate
[2020-01-04 13:37:30.1439] NOTICE[6707]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request ‘INVITE’ from ‘“RICHARD CANTIN” sip:5195749401@216.254.220.21’ failed for ‘216.254.220.21:5060’ (callid: 5489d8ce2a9094494ae7f05a25c5ffe8@216.254.220.21) - Failed to authenticate

I have edited the configuration for trunk1 to match trunk 2 so both now have all the configs required by the provider - as best as I can tell. Those extra configs for each trunk are:

buggymwi: no
nat: force_rport,comedia
insecure: port,invite
rtptimeout: 60
rtpholdtimeout: 300
allowoverlap: no
allowtransfer: no
progressinband: no
disallow: all
allow: ulaw

So both now come back with busy when called in to and “busy or unreachable” when called out.

Both are registered and both are properly triggered by the dialplan.

But neither can call out or in - just internal to internal calls work. (as before)

I added a trunk to another provider and tested it for incall and outcall.

Exactly same result.

I am willing to bet it is some simple setting/configuration I am missing (hopefully) but cannot for the life of me figure out what it is.

Any suggestions appreciated.

It has been suggested that the issue with being able to make calls out or accept calls in might have something to do with one (or combination) of:

  1. Firewall
  2. Port Forwarding
  3. NAT

Re 1), I have disabled my firewall on this, my development server, so it is not that.

Re 2) I have not forwarded any Ports through my router. I am not accepting connections from any location other than the Trunk Provider(s) and since I am reaching out to them, I did not think I needed to forward any Ports. I have the same setup now with my existing PBX and it is working fine. However, if the Wazo setup requires any Ports forwarded, can you let me know?

Re 3) I have added to the SIP General Settings the following:
nat => force_rport,comedia
externip => {my actual public IP}
localnet => 192.168.1.0/255.255.255.0

Which is in addition to the Options I added in the Trunks for the one provider as per their specs:
buggymwi: no
nat: force_rport,comedia
insecure: port,invite
rtptimeout: 60
rtpholdtimeout: 300
allowoverlap: no
allowtransfer: no
progressinband: no
disallow: all
allow: ulaw
directmedia: no

And I also connected Wazo to another Trunk provider I use without the above additonal Trunk Options

Unfortunately, no change for either Trunk povider

Internal calls work fine
Calls In or Calls out come back with error message Unreachable or Busy

Any suggestions are appreciated

I am coming to the conclusion that it might be a NAT issue but would sure appreciate some guidance.

When I activate

asterisk -r

and call out, at the end of the output are the lines

[Jan 13 09:53:05]        > 0x7fa91c007a40 -- Strict RTP learning after remote address set > to: 192.168.1.149:40006
[Jan 13 09:53:05]        > 0x7fa91c007a40 -- Strict RTP switching to RTP target address 192.168.1.149:40006 as source

Two things seem wrong with this

  1. I think the IP address should be my public ip address, not my LAN IP address
  2. I think I need rtp_symmetric , not rtpstrict but the system keeps activating rtp strict.

I am also somewhat confused with the entries in SIP General settings. When I look at
https://wiki.asterisk.org/wiki/display/AST/Migrating+from+chan_sip+to+res_pjsip
the instructions for how to configure pjsip instead of chan_sip say for nat declarations, we no longer use

nat= no or nat = force_rport,comedia or nat= auto_force_rport

but instead now use a combination of these three settings to properly setup nat

force_rport: yes
rewrite_contact: yes
rtp_symmetric: yes

but I see in SIP General Settings that we have

nat = auto_force_rport

So I am now not sure what conventions / protocols I should be using for my configuration settings.

I have a nat behind a static IP for my server.

I think i need to stop using rtpstrict.

I think I need to use pjsip configuration options.

But I need help figuring out what to do.

Any ideas?