Sip connection between two local PBX systems (Avaya & FreePBX)

I am new to FreePBX and I will be grateful for any advice that will help me to achieve required task which will be explained in the following network diagram:

I would like to create a connection between two PBX system so that extensions can call each other as if its a single system/server:
1- Avaya with extensions 4XXX
2- FreePBX with extentions 3XXX

Steps that I have tried:
1- Avaya has already been configured that when dialed number matches 3XXX to be forwarded to and I can hear FreePBX that the dialed number is out of service since no configuration has been done yet.

2- I have created a PJSIP extension (Ext: 3111, Dis name: 3111, Outbound CID: 3111).

3- Created Inbound route in FreePBX (DID: Any, Caller ID: Any, Set Destination: Extensions → 3111 )
now all calls from Avaya now is routed to a single phone (3111) but i would like all phones to be able to call each other . What is the correct configuration for Inbound routes?

4- I have created a trunk and outbound.
Trunk Settings:
Name: avaya-trunk, Allow any CID, Auth: None, Regisration: None, SIP server:, SIP Port: 5060, Context: from-internal , Extensions match: Empty

Outbound Routes Settings:
Route CID : Empty, Route Type: Intra-Company, Trunk Sequence: avaya-trunk, Dial Pattern: 4XXX

with that done phones with 3XXX were able to call phones 4XXX with no issues but once its done none inbound calls were able to go through.

My objective that 4XXX phones can call 3XXX and via versa.
Kind regards

for a quick fix try context=from-pstn

i would remove inbound routes unless you need specific routing based on incoming CID or some other treatments

i would also switch to PJSIP, leave context as default for phones and the trunk

i would also check the pjsip debug for inbound calls to see what is presented to asterisk, just to confirm everything is coming in correctly from avaya.

  • I have changed the context to “context=from-pstn”
  • removed all inbound routes
  • i am already using chan_pjsip (chan_sip is disabled)
  • have enabled the debug
    Calls from FreePBX extensions can reach to Avaya
    But calls from Avaya to FreePBX i get “The number you have dialed is not in service”

I saw this in the logs:
[2019-11-14 06:32:02] ERROR[6838][C-00000008]: pbx_functions.c:651 ast_func_read2: Function SIP_HEADER not registered
[2019-11-14 06:32:02] WARNING[6838][C-00000008]: Ext. s:3 @ from-pstn: Friendly Scanner from

something goofy going on with that error.

what ver is this freepbx? any custom programming leftover?

also make sure you got the full SIP debug with INVITE and all the replies from asterisk. also asterisk -rvvvvv to see the asterisk events related to the replies and invites

Its a fresh installation using “SNG7-FPBX-64bit-1910-2.iso” with no programming done to it yet. has FreePBX 15, Asterisk 16 on a virtualbox as a bridge adapter to test it out.

There is one thing that i have noticed that after adding new extension (chan_pjsip) and apply the changes that user cannot register unless i have rebooted the server then it can register and be connected to FreePBX.

SIP_HEADER is used with chan _sip. You need PJSIP_HEADER with chan_pjsip, although you should check that that does the right thing.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.