Patton 4112 FXO behind SBC (no inbound calls.)

Status
Not open for further replies.

Andriy

Forum User
Advanced Certified
Joined
Apr 14, 2018
Messages
183
Reaction score
16
Dear community,

I know this is not supported, but several users in this forum reported this as working.

I have a landline that i would like to connect to my 3CX (cloud based) via SBC using Patton 4112 FXO.

https://www.3cx.com/voip-gateways/patton-smartnode-sn4112/

I have followed this guide, changed HOST ip address to 3CX SBC local IP and now outbound calls work just fine.
However, inbound calls do not come through to 3CX.

I have double checked Inbound rules, added 000000 and 000001 as DIDs for Patton-siptrunk-gateway and set the destination to my extension, but when i call the landline 3CX does not receive a call.

Did anyone had this problem before? Any advice where I should look for problems/solutions?
 
So as you have identified the setup with the SBC is unsupported so if you continue getting this issue I would cut your losses and simply setup a VPN.

If you still want to try with SBC confirm you have followed this guide: https://www.3cx.com/voip-gateways/patton-smartnode-sn4112/ but at the point of template download you have manually changed the IP addresses of 3CX to be that of the SBC.

Areas below {SBC IP Address} will be your local PBX IP address and will need to be changed.

registration outbound
registrar {SBC IP Address} 5060

location-service LOC_SVC_3CX_10002
domain 1 {SBC IP Address}

interface sip IF_SIP_3CX
bind context sip-gateway GW_SIP_3CX
early-disconnect
route call dest-service HG_TO_FXO
remote {SBC IP Address} 5060


This should be all that is required, however it may not be an issue with the setup and maybe related to the lines/inbound DDI's so if this still does not work for you run the following command set and PM over the logging.

enable
configure
debug ccfxo
debug fxo
debug call-control
debug call-router
debug context sip-gateway transport
debug context sip-gateway error


Replicate your issue/make a call.

no debug all is required to turn off debugging once run.
 
  • Like
Reactions: Andriy
Dear eddv123

thank you for your reply.
First, I confirm i did follow this guide: https://www.3cx.com/voip-gateways/patton-smartnode-sn4112/ and changed the IP address in the template from 3CX IP to SBC

--
I would like to try SBC - because it is already there for my phones and also because my internet connection is double NATed

Could you please let me know where do i fire these commands? on the patton? does it have a CLI iterface or SSH? of do i run those somewhere on 3CX?

enable
configure
debug ccfxo
debug fxo
debug call-control
debug call-router
debug context sip-gateway transport
debug context sip-gateway error


thank you very much for help.


PS. when i connect a phone to the phone line and make a call - the phone rings. But when i connect PATTON FXO gateway isntead, 3CX does not get the call.
 
Yes, so if you SSH into the Patton and run these commands from the terminal - the trace can run quite quickly so load the no debug all as a copy paste is my advise before starting.

There are some useful examples here if you need comparison also: https://www.patton.com/support/kb_art.asp?art=477&p=0
 
One more argument against VPN - I am not really sure how to setup VPN from my office to Amazon WS and if it is possible.
 
sorry, id could not follow you.

My steps would be
1. Login to Patton SSH using Putty, login with admin login
2. Run commands below:
enable
configure
debug ccfxo
debug fxo
debug call-control
debug call-router
debug context sip-gateway transport
debug context sip-gateway error


let you know the results, is this correct?

How do I "load the no debug all as a copy paste "?

thank you
 
SBC support for FXS devices we added in the preview of v16 Update 6
1594975868150.png
 
  • Like
Reactions: Andriy
One more argument against VPN - I am not really sure how to setup VPN from my office to Amazon WS and if it is possible.

This is always the issue for a lot of providers. First if you want to use a VPN connection you need a software firewall in front of your 3CX system (we use software Pfsense). I personally do not like the hosted 3CX public facing option.

The disadvantages are finding a provider who supports firewalls as virtual machines, the other option is spinning one up yourself however then you have to get the hosted network just right and this can be challenging.

How do I "load the no debug all as a copy paste "?

I do this manually, however I am used to the commands now, possibly do a line each or use the tab key.
 
  • Like
Reactions: Andriy
Dear eddv123

I am so sorry, seems like "load the no debug all as a copy paste " is very obvious to you and not at all to me.
could you please let me know how to do that manually?
is it a command in SSH or a setting i have to enable somewhere or an argument i have to add to the command? i am really lost with this one.
 
SBC support for FXS devices we added in the preview of v16 Update 6

@StefanW this is good news! can you confirm if this is across all brands and models ? and just FXS you say ? I will load up a test system (obviously beta should not be uploaded on live systems/sites) and take a look today since this is a feature of interest for me.

If just FXS then is this also all FXS devices (phones, FAX machines) my thoughts are that any other device other than analogue phones (includes franking and PDQ machines) would be too sensitive to delay and conversions in such scenarios.

I had heard rumour that gateways across SBC's would be included at some point but was not sure how long this would take to implement.
 
@Andriy perhaps a visual will help:

Please note however that these commands are being done on a Trinity based (FXS) Patton gateway so will differ slightly to your Smartware based device.
 
  • Like
Reactions: Andriy
Only FXS devices (Patton or GS) will be supported, POT or ISDN gateways no. Those shall be replaced in a cloud setup with a SIP trunk. Franking and PDQ do use modem protocols which we do not support (regardless of SBC or not). Fax is a time-sensitive case and the performance in T.38 will outperform any PCMA transmission if there is any delay.
 
So Patton 4112 FXO is supported.
Thank you. Then I will try it as soon as possible,

thank you

@eddv123 Thank you for the video - i will try that first thing on Monday
 
Franking and PDQ do use modem protocols which we do not support (regardless of SBC or not).

Agreed, I would not touch these with a barge pole if asked to implement them with a gateway and 3CX.

FAX both in T.38 and G711 I have had plenty of success with (albeit being supported by 3CX anyway) however would only use with a local 3CX system or locally routed subnet/VPN scenario.
 
@eddv123

Thank you very much for guiding me through Terminal command thing.
I have ran the commands you suggested from Putty

When making call i am getting these messages repeatedly:

Code:
06:29:32  FXO   > [0 0] Driver: Line reversal
06:29:32  FXO   > [fxo 0 0 0/fxo 0] Dispatching event 'PortLineReversal' in state 'OnHook'
06:29:32  FXO   > [fxo 0 0 0/fxo 0] Action 'Line-Reversal'
06:29:32  FXO   > [fxo 0 0 0/fxo 0] Event 'PortLineReversal' handled in state 'OnHook'
06:29:32  CFXO  > [EP IF_FXO_0] State IDLE, event BATTERY REVERSAL

So it seems like Patton is seeing the call, just not sending it properly to the 3CX tunnel....
Here is full output of my Putty screen
Code:
=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2020.07.20 15:22:56 =~=~=~=~=~=~=~=~=~=~=~=
login as: administrator
[email protected]'s password:
Welcome!
192.168.1.182>ebabledcsdf
%              ^ Keyword mismatch
192.168.1.182>enable
192.168.1.182#show running-config
#----------------------------------------------------------------#
#                                                                #
# SN4112/JO/EUI                                                  #
# R6.11 2019-07-02 H323 SIP FXS FXO                              #
# 2020-07-20T06:25:11                                            #
# SN/00A0BA0B9131                                                #
# Generated configuration file                                   #
#                                                                #
#----------------------------------------------------------------#

cli version 3.20
clock local default-offset +00:00
webserver port 80 language en

system

  ic voice 0
    low-bitrate-codec g729

profile ppp default

profile call-progress-tone defaultDialtone
  play 1 1000 400 -6

profile call-progress-tone defaultAlertingtone
  play 1 1000 400 -13
  pause 2 2000

profile call-progress-tone defaultBusytone
  play 1 500 400 -7
  pause 2 500

profile call-progress-tone defaultReleasetone
  play 1 500 400 -7
  pause 2 500

profile call-progress-tone defaultCongestiontone
  play 1 500 400 -7
  pause 2 500

profile tone-set default

profile voip default
  codec 1 g711ulaw64k rx-length 20 tx-length 20 silence-suppression
  codec 2 g711alaw64k rx-length 20 tx-length 20 silence-suppression
  codec 3 g729 rx-length 20 tx-length 20 silence-suppression
  fax transmission 1 relay t38-udp

profile pstn default
  echo-canceler-hybrid-loss 0
  echo-canceler-nlp silence

profile sip default
  no autonomous-transitioning

profile aaa default
  method 1 local
  method 2 none

context ip router

  interface IF_IP_WAN
    ipaddress dhcp
    tcp adjust-mss rx mtu
    tcp adjust-mss tx mtu

  interface IF_IP_LAN
    ipaddress 192.168.1.182 255.255.255.0
    tcp adjust-mss rx mtu
    tcp adjust-mss tx mtu

context cs switch

  routing-table called-e164 RT_SIP_TO_FXO
    route .% dest-service HG_TO_FXO

  routing-table called-e164 RT_FXO_00_TO_SIP
    route default dest-interface IF_SIP MT_CALL_ID_00

  routing-table called-e164 RT_FXO_01_TO_SIP
    route default dest-interface IF_SIP MT_CALL_ID_01

  routing-table called-e164 RT_FXO_02_TO_SIP
    route default dest-interface IF_SIP MT_CALL_ID_02

  routing-table called-e164 RT_FXO_03_TO_SIP
    route default dest-interface IF_SIP MT_CALL_ID_03

  mapping-table called-e164 to called-e164 MT_CALL_ID_00
    map .% to 000000

  mapping-table called-e164 to called-e164 MT_CALL_ID_01
    map .% to 000001

  mapping-table called-e164 to called-e164 MT_CALL_ID_02
    map .% to 000002

  mapping-table called-e164 to called-e164 MT_CALL_ID_03
    map .% to 000003

  interface sip IF_SIP
    bind context sip-gateway GW_SIP
    route call dest-table RT_SIP_TO_FXO
    remote 192.168.1.249 5060
    early-disconnect
    address-translation outgoing-call request-uri user-part fix 10004 host-part to-header target-param none
    trust remote

  interface fxo IF_FXO_0
    route call dest-table RT_FXO_00_TO_SIP
    loop-break-duration min 60 max 1000
    disconnect-signal loop-break
    disconnect-signal busy-tone
    ring-number on-caller-id
    mute-dialing

  interface fxo IF_FXO_1
    route call dest-table RT_FXO_01_TO_SIP
    loop-break-duration min 60 max 1000
    disconnect-signal loop-break
    disconnect-signal busy-tone
    ring-number on-caller-id
    mute-dialing

  interface fxo IF_FXO_2
    route call dest-table RT_FXO_02_TO_SIP
    loop-break-duration min 60 max 1000
    disconnect-signal loop-break
    disconnect-signal busy-tone
    ring-number on-caller-id
    mute-dialing

  interface fxo IF_FXO_3
    route call dest-table RT_FXO_03_TO_SIP
    loop-break-duration min 60 max 1000
    disconnect-signal loop-break
    disconnect-signal busy-tone
    ring-number on-caller-id
    mute-dialing

  service hunt-group HG_TO_FXO
    drop-cause destination-out-of-order
    drop-cause user-busy
    drop-cause normal-unspecified
    drop-cause no-circuit-channel-available
    drop-cause network-out-of-order
    drop-cause temporary-failure
    drop-cause switching-equipment-congestion
    drop-cause access-info-discarded
    drop-cause circuit-channel-not-available
    drop-cause resources-unavailable
    route call 1 dest-interface IF_FXO_0
    route call 2 dest-interface IF_FXO_1

context cs switch
  no shutdown

authentication-service AS_ALL_LINES
  realm 1 3CXPhoneSystem
  username 10004 password HuKYZSLtV11OjnKNZrbccA== encrypted

location-service LS_10004
  domain 1 192.168.1.249

  identity-group default

    authentication outbound
      authenticate 1 authentication-service AS_ALL_LINES username 10004

  identity 10004

    authentication outbound
      authenticate 1 authentication-service AS_ALL_LINES

    authentication inbound

    registration outbound
      registrar 192.168.1.249 5060
      lifetime 300
      register auto
      retry-timeout on-system-error 10
      retry-timeout on-client-error 10
      retry-timeout on-server-error 10
      nat-traversal minimal

    registration inbound
      contact 192.168.1.249 5060 switch IF_SIP priority 1000
      lifetime default 3600 min 1 max 4294967295

context sip-gateway GW_SIP

  interface LAN
    bind interface IF_IP_LAN context router port 5060

context sip-gateway GW_SIP
  bind location-service LS_10004
  no shutdown

port ethernet 0 0
  medium auto
  encapsulation ip
  bind interface IF_IP_LAN router
  no shutdown

port fxo 0 0
  encapsulation cc-fxo
  bind interface IF_FXO_0 switch
  no shutdown

port fxo 0 1
  encapsulation cc-fxo
  bind interface IF_FXO_1 switch
  no shutdown

192.168.1.182#configure
192.168.1.182(cfg)#debug ccfxo
192.168.1.182(cfg)#debug fxo
192.168.1.182(cfg)#
192.168.1.182(cfg)#
192.168.1.182(cfg)#debug call-control
192.168.1.182(cfg)#debug call-router
192.168.1.182(cfg)#debug context sip-gateway transport
192.168.1.182(cfg)#debug context sip-gateway error
192.168.1.182(cfg)#06:26:50  SIP_TR> [STACK] > 438 Stack: to 192.168.1.249
REGISTER sip:192.168.1.249:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.182:5060;branch=z9hG4bK83b68253b11a9a79b
Max-Forwards: 70
From: <sip:[email protected]>;tag=d181dd2b2a
To: <sip:[email protected]>
Call-ID: f7875c8f44e41ba3
CSeq: 34148 REGISTER
Contact: <sip:[email protected]:5060>
Expires: 300
User-Agent: Patton SN4112 JO EUI 00A0BA0B9131 R6.11 2019-07-02 H323 SIP FXS FXO M5T SIP Stack/4.2.26.112
Content-Length: 0


06:26:50  SIP_TR> [STACK] < 415 Stack: from 192.168.1.249
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 192.168.1.182:5060;branch=z9hG4bK83b68253b11a9a79b
Proxy-Authenticate: Digest nonce="414d53595f15393924:5266378bc875aae193a07b9431c3a07b",algorithm=MD5,realm="3CXPhoneSystem"
To: <sip:[email protected]:5060>;tag=a884b378
From: <sip:[email protected]:5060>;tag=d181dd2b2a
Call-ID: f7875c8f44e41ba3
CSeq: 34148 REGISTER
Content-Length: 0


06:26:50  SIP_TR> [STACK] > 654 Stack: to 192.168.1.249
REGISTER sip:192.168.1.249:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.182:5060;branch=z9hG4bKb0301efec41e2bd6e
Proxy-Authorization: Digest username="10004",realm="3CXPhoneSystem",nonce="414d53595f15393924:5266378bc875aae193a07b9431c3a07b",uri="sip:192.168.1.249:5060",response="41d6bfe68708e8ef624aee6cd3390ad2",algorithm=MD5
Max-Forwards: 70
From: <sip:[email protected]>;tag=d181dd2b2a
To: <sip:[email protected]>
Call-ID: f7875c8f44e41ba3
CSeq: 34149 REGISTER
Contact: <sip:[email protected]:5060>
Expires: 300
User-Agent: Patton SN4112 JO EUI 00A0BA0B9131 R6.11 2019-07-02 H323 SIP FXS FXO M5T SIP Stack/4.2.26.112
Content-Length: 0


06:26:51  SIP_TR> [STACK] < 438 Stack: from 192.168.1.249
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.182:5060;branch=z9hG4bKb0301efec41e2bd6e
Record-Route: <sip:[email protected]:5060;user=proxy;tnlid=sbc.8a11e105>
Contact: <sip:[email protected]:5060>;expires=300
To: <sip:[email protected]:5060>;tag=249cb92f
From: <sip:[email protected]:5060>;tag=d181dd2b2a
Call-ID: f7875c8f44e41ba3
CSeq: 34149 REGISTER
User-Agent: 3CXPhoneSystem 16.0.5.619 (619)
Content-Length: 0


06:28:25  FXO   > [0 0] Driver: Line reversal
06:28:25  FXO   > [fxo 0 0 0/fxo 0] Dispatching event 'PortLineReversal' in state 'OnHook'
06:28:25  FXO   > [fxo 0 0 0/fxo 0] Action 'Line-Reversal'
06:28:25  FXO   > [fxo 0 0 0/fxo 0] Event 'PortLineReversal' handled in state 'OnHook'
06:28:25  CFXO  > [EP IF_FXO_0] State IDLE, event BATTERY REVERSAL
06:28:25  FXO   > [0 0] Driver: Line reversal
06:28:25  FXO   > [fxo 0 0 0/fxo 0] Dispatching event 'PortLineReversal' in state 'OnHook'
06:28:25  FXO   > [fxo 0 0 0/fxo 0] Action 'Line-Reversal'
 
And this is what i get in 3CX activity log:

Code:
07/20/2020 3:54:40 PM - Updating device Dev(2089524918):[sip:[email protected]:5060 / 10004] by message: DevUpd Recv Req REGISTER from 127.0.0.1:5080 tid=6c9a5d65057f10eff Call-ID=f7875c8f44e41ba3:
REGISTER sip:127.0.0.1:5060;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:5080;branch=z9hG4bK-524287-2---6c9a5d65057f10eff;rport=5080
Via: SIP/2.0/UDP [::ffff:53.151.161.6]:42123;branch=z9hG4bK-524287-1---tunneltid;rport;tnlid=sbc.8a11e105
Via: SIP/2.0/UDP 192.168.1.182:5060;branch=z9hG4bK6c9a5d65057f10eff
Max-Forwards: 68
Record-Route: <sip:[email protected]:5080;user=proxy;uri=sbc.8a11e105>
Record-Route: <sip:[email protected]:5060;user=proxy;tnlid=sbc.8a11e105>
Contact: <sip:[email protected]:5060>
To: <sip:[email protected]:5060>
From: <sip:[email protected]:5060>;tag=d181dd2b2a
Call-ID: f7875c8f44e41ba3
CSeq: 34171 REGISTER
Expires: 300
Proxy-Authorization: Digest username="10004",realm="3CXPhoneSystem",nonce="414d53595f153faf44:95e077dd5b3ecc613eab3ac624751f5c",uri="sip:192.168.1.249:5060",response="68ebbf7fde2e9dbdeb4ac62099d2f840",algorithm=MD5
User-Agent: Patton SN4112 JO EUI 00A0BA0B9131 R6.11 2019-07-02 H323 SIP FXS FXO M5T SIP Stack/4.2.26.112
Content-Length: 0

07/20/2020 3:54:40 PM - Line 10004 got Device: Dev(2089524918):[sip:[email protected]:5060 / 10004]
07/20/2020 3:54:40 PM - Source is identified as trunk Lc:10004(@Kadoma Patton Analog FXO to 3CX SBC[<sip:[email protected]:5060/UDP>])
 
@Andriy can you PM me the full output file from the Patton in notepad with the full call process, explain where you are calling from and the number you are calling to also (whether it is an in or outbound call).
 
Status
Not open for further replies.

Forum statistics

Threads
111,954
Messages
589,921
Members
164,851
Latest member
DrunkeMeister