Interconnection 3CX - FreeSWITCH PBX

Status
Not open for further replies.

VOPIT

Premier Customer
Joined
Jun 2, 2021
Messages
16
Reaction score
7
I'm having a bit of trouble getting a setup between our on-premise 3CX System (V16 v16.0.8.9 latest) to a new on-premise FreeSWITCH PBX.
The FreeSWITCH PBX is being used by the healthcare systems integrator, and will only be used for their intercoms, all other calls will be routed through our 3CX System.

The setup is done as follows:

Within 3CX I setup a Master Bridge, with a virtual extension, password and i had to enable the following settings for me to be able to call an intercom on the FreeSWITCH side:

1633864207201.png

From what i have found on the 3CX forums so far, is that on the FreeSWITCH side a "gateway" (SIP Trunk) is to be made, and has the following settings:
The username is the 3CX Master Bridge virtual extension number.

Code:
<include>
<gateway name="10005">
   <param name="username" value="10005"/>
   <param name="password" value="bridge password"/>
   <param name="realm" value="3cx local ip"/>
   <param name="proxy" value="3cx local ip"/>
   <param name="expire-seconds" value="800"/>
   <param name="register" value="true"/>
   <param name="register-transport" value="udp"/>
   <param name="context" value="public"/>
   <param name="caller-id-in-from" value="false"/>
   <param name="extension-in-contact" value="false"/>
   <param name="context" value="public"/>
   </gateway>
</include>

From my own 3CX extension i can call any intercom without issue, and two way audio is working.
From any intercom on the FreeSWITCH side i cannot reach any extension on the 3CX side, and i get the following error:

Code:
08/10/2021 16:17:47:285 | 11 | [CM500002]: Unidentified incoming call. Review INVITE and adjust source identification:
Invite-UNK Recv Req INVITE from Freeswitch_local_IP:5060 tid=jmrNQB8j7veDS Call-ID=5a5c14f6-a2e5-123a-6f9d-cf39e73c3998:
INVITE sip:5150@3CX_local_IP SIP/2.0
Via: SIP/2.0/UDP Freeswitch_local_IP;rport=5060;branch=z9hG4bKjmrNQB8j7veDS
Max-Forwards: 69
Contact: <sip:mod_sofia@Freeswitch_local_IP:5060>
To: <sip:5150@3CX_local_IP>
From: "IC - Icom" <sip:4204@Freeswitch_local_IP>;tag=KX34v2964me1a
Call-ID: 5a5c14f6-a2e5-123a-6f9d-cf39e73c3998
CSeq: 42297541 INVITE
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY
Content-Disposition: session
Content-Type: application/sdp
Supported: timer, path, replaces
User-Agent: FreeSWITCH-mod_sofia/1.10.1~64bit
Allow-Events: talk, hold, conference, refer
Remote-Party-ID: "IC - Icom" <sip:4204@Freeswitch_local_IP>;party=calling;screen=yes;privacy=off
X-FS-Support: update_display,send_info
Content-Length: 246

v=0
o=FreeSWITCH 1633685789 1633685790 IN IP4 Freeswitch_local_IP
s=FreeSWITCH
c=IN IP4 Freeswitch_local_IP
t=0 0
m=audio 16878 RTP/AVP 8 101 13
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=rtpmap:13 CN/8000
a=ptime:20


Level = 3
Severity = Log
Tread = 11

Code:
08/10/2021 16:17:47:382 | 11 | [CM102001]: Authentication failed for AuthFail Recv Req INVITE from Freeswitch_local_IP:5060 tid=KXHeS6rp454Zm Call-ID=5a5c14f6-a2e5-123a-6f9d-cf39e73c3998:
INVITE sip:5150@3CX_local_IP SIP/2.0
Via: SIP/2.0/UDP Freeswitch_local_IP;rport=5060;branch=z9hG4bKKXHeS6rp454Zm
Max-Forwards: 69
Contact: <sip:mod_sofia@Freeswitch_local_IP:5060>
To: <sip:5150@3CX_local_IP>
From: "IC - Icom" <sip:4204@Freeswitch_local_IP>;tag=KX34v2964me1a
Call-ID: 5a5c14f6-a2e5-123a-6f9d-cf39e73c3998
CSeq: 42297542 INVITE
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY
Content-Disposition: session
Content-Type: application/sdp
Proxy-Authorization: Digest username="10005",realm="3CXPhoneSystem",nonce="--",algorithm=MD5,uri="sip:5150@3CX_local_IP",response="08ab39484303f1f24ccbd7f80680ef1a"
Supported: timer, path, replaces
User-Agent: FreeSWITCH-mod_sofia/1.10.1~64bit
Allow-Events: talk, hold, conference, refer
Remote-Party-ID: "IC - Icom" <sip:4204@Freeswitch_local_IP>;party=calling;screen=yes;privacy=off
X-FS-Support: update_display,send_info
Content-Length: 246

v=0
o=FreeSWITCH 1633685789 1633685790 IN IP4 Freeswitch_local_IP
s=FreeSWITCH
c=IN IP4 Freeswitch_local_IP
t=0 0
m=audio 16878 RTP/AVP 8 101 13
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=rtpmap:13 CN/8000
a=ptime:20
; Reason: Credentials don't match, check that authorization-ID and password match the ones in extension settings

Level = 2
Severity = Warning
Tread = 11

So all calls from any intercom or app from the FreeSWITCH PBX side stumbles upon the same error.
I'm hoping someone has encountered this before with a FreeSWITCH setup or if applicable the same error messages regarding credentials and unidentified incoming call.

Kind regards
 
I'm having a bit of trouble getting a setup between our on-premise 3CX System (V16 v16.0.8.9 latest) to a new on-premise FreeSWITCH PBX.
The FreeSWITCH PBX is being used by the healthcare systems integrator, and will only be used for their intercoms, all other calls will be routed through our 3CX System.

The setup is done as follows:

Within 3CX I setup a Master Bridge, with a virtual extension, password and i had to enable the following settings for me to be able to call an intercom on the FreeSWITCH side:

View attachment 25034

From what i have found on the 3CX forums so far, is that on the FreeSWITCH side a "gateway" (SIP Trunk) is to be made, and has the following settings:
The username is the 3CX Master Bridge virtual extension number.

Code:
<include>
<gateway name="10005">
   <param name="username" value="10005"/>
   <param name="password" value="bridge password"/>
   <param name="realm" value="3cx local ip"/>
   <param name="proxy" value="3cx local ip"/>
   <param name="expire-seconds" value="800"/>
   <param name="register" value="true"/>
   <param name="register-transport" value="udp"/>
   <param name="context" value="public"/>
   <param name="caller-id-in-from" value="false"/>
   <param name="extension-in-contact" value="false"/>
   <param name="context" value="public"/>
   </gateway>
</include>

From my own 3CX extension i can call any intercom without issue, and two way audio is working.
From any intercom on the FreeSWITCH side i cannot reach any extension on the 3CX side, and i get the following error:

Code:
08/10/2021 16:17:47:285 | 11 | [CM500002]: Unidentified incoming call. Review INVITE and adjust source identification:
Invite-UNK Recv Req INVITE from Freeswitch_local_IP:5060 tid=jmrNQB8j7veDS Call-ID=5a5c14f6-a2e5-123a-6f9d-cf39e73c3998:
INVITE sip:5150@3CX_local_IP SIP/2.0
Via: SIP/2.0/UDP Freeswitch_local_IP;rport=5060;branch=z9hG4bKjmrNQB8j7veDS
Max-Forwards: 69
Contact: <sip:mod_sofia@Freeswitch_local_IP:5060>
To: <sip:5150@3CX_local_IP>
From: "IC - Icom" <sip:4204@Freeswitch_local_IP>;tag=KX34v2964me1a
Call-ID: 5a5c14f6-a2e5-123a-6f9d-cf39e73c3998
CSeq: 42297541 INVITE
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY
Content-Disposition: session
Content-Type: application/sdp
Supported: timer, path, replaces
User-Agent: FreeSWITCH-mod_sofia/1.10.1~64bit
Allow-Events: talk, hold, conference, refer
Remote-Party-ID: "IC - Icom" <sip:4204@Freeswitch_local_IP>;party=calling;screen=yes;privacy=off
X-FS-Support: update_display,send_info
Content-Length: 246

v=0
o=FreeSWITCH 1633685789 1633685790 IN IP4 Freeswitch_local_IP
s=FreeSWITCH
c=IN IP4 Freeswitch_local_IP
t=0 0
m=audio 16878 RTP/AVP 8 101 13
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=rtpmap:13 CN/8000
a=ptime:20


Level = 3
Severity = Log
Tread = 11

Code:
08/10/2021 16:17:47:382 | 11 | [CM102001]: Authentication failed for AuthFail Recv Req INVITE from Freeswitch_local_IP:5060 tid=KXHeS6rp454Zm Call-ID=5a5c14f6-a2e5-123a-6f9d-cf39e73c3998:
INVITE sip:5150@3CX_local_IP SIP/2.0
Via: SIP/2.0/UDP Freeswitch_local_IP;rport=5060;branch=z9hG4bKKXHeS6rp454Zm
Max-Forwards: 69
Contact: <sip:mod_sofia@Freeswitch_local_IP:5060>
To: <sip:5150@3CX_local_IP>
From: "IC - Icom" <sip:4204@Freeswitch_local_IP>;tag=KX34v2964me1a
Call-ID: 5a5c14f6-a2e5-123a-6f9d-cf39e73c3998
CSeq: 42297542 INVITE
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY
Content-Disposition: session
Content-Type: application/sdp
Proxy-Authorization: Digest username="10005",realm="3CXPhoneSystem",nonce="--",algorithm=MD5,uri="sip:5150@3CX_local_IP",response="08ab39484303f1f24ccbd7f80680ef1a"
Supported: timer, path, replaces
User-Agent: FreeSWITCH-mod_sofia/1.10.1~64bit
Allow-Events: talk, hold, conference, refer
Remote-Party-ID: "IC - Icom" <sip:4204@Freeswitch_local_IP>;party=calling;screen=yes;privacy=off
X-FS-Support: update_display,send_info
Content-Length: 246

v=0
o=FreeSWITCH 1633685789 1633685790 IN IP4 Freeswitch_local_IP
s=FreeSWITCH
c=IN IP4 Freeswitch_local_IP
t=0 0
m=audio 16878 RTP/AVP 8 101 13
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=rtpmap:13 CN/8000
a=ptime:20
; Reason: Credentials don't match, check that authorization-ID and password match the ones in extension settings

Level = 2
Severity = Warning
Tread = 11

So all calls from any intercom or app from the FreeSWITCH PBX side stumbles upon the same error.
I'm hoping someone has encountered this before with a FreeSWITCH setup or if applicable the same error messages regarding credentials and unidentified incoming call.

Kind regards
You need to adjust your bridge settings and the FreeSWITCH side also (like "CallerID in FROM" should be enabled.)

This is not a supported scenario and I don't remember seeing anyone doing it with FS. Only FreePBX or UCMs and stuff like that.
 
You need to adjust your bridge settings and the FreeSWITCH side also (like "CallerID in FROM" should be enabled.)

This is not a supported scenario and I don't remember seeing anyone doing it with FS. Only FreePBX or UCMs and stuff like that.
I have tried enabling that setting, same with the extension-in-contact parameter, i tried with both enabled and either or disabled, but same result.

What settings on the bridge side (i assume you mean the 3CX bridge) should i adjust?

This is one of the posts i found on here about connecting freeswitch, but that also didn't work for me:
https://www.3cx.com/community/threads/3cx-bridge-to-freeswitch.67565/
 
I have tried enabling that setting, same with the extension-in-contact parameter, i tried with both enabled and either or disabled, but same result.

What settings on the bridge side (i assume you mean the 3CX bridge) should i adjust?

This is one of the posts i found on here about connecting freeswitch, but that also didn't work for me:
https://www.3cx.com/community/threads/3cx-bridge-to-freeswitch.67565/
Have you tried that?

https://www.3cx.com/community/threads/3cx-bridge-to-freeswitch.67565/post-292969
 
Yes i have, i used the exact same parameters for the freeswitch, but other issues occur then, like the freeswitch not being able to register to the 3CX bridge.

Would either of those settings, like extension-in-from cause the error message that the credentials don't match?
Have you checked (by any hazard) that the Freeswitch IP isn't blacklisted?
 
Have you checked (by any hazard) that the Freeswitch IP isn't blacklisted?

Before the freeswitch started making connection requests to the 3cx bridge i added the IP to the whitelist.
 
  • Like
Reactions: Evolute IT
You need to adjust your bridge settings and the FreeSWITCH side also (like "CallerID in FROM" should be enabled.)

This is not a supported scenario and I don't remember seeing anyone doing it with FS. Only FreePBX or UCMs and stuff like that.

I adjusted the 3CX Bridge settings to only use allow inbound & outbound calls, as well as the FS side parameters to include caller-id-in-from and extension-in-contact.

Calls from 3CX are working to the FS side and all intercoms can be reached, however from the FS side i still cannot reach any extension on the 3CX side.

I keep getting the same error in FS from unallocated number, and on the 3CX side it's still the same authentication failed message.

Could it be stuck on the fact that the Contact header is showing: Contact: <sip:mod_sofia@FS_IP:5060> instead of it should be showing: Contact: <sip:FS_EXT@FS_IP:5060>?
As i mentioned earlier the extension-in-contact parameter is set to true on the gateway settings, but it's not taking it over as mentioned above in the contact header.
 
Status
Not open for further replies.

Forum statistics

Threads
111,976
Messages
590,089
Members
164,904
Latest member
gdstratton