TIPS Best PIAF Supported Dual (Or Tri) FXO Adapter For Analog Phone Lines

MichaelW

New Member
Joined
Oct 17, 2014
Messages
16
Reaction score
0
Well, the journey of automating my phone system is reaching the final turn. I finally have the system working the way I want to with Vitelity, and now I am ready to put it into production. After banging my head against my desk trying to get a pair of SPA-3102's working at all (let alone well. Half of the How-To's on the net are over 5 years old, and the half that are newer conflict with the other half ) with PIAF I am ready to buy what I probably should have purchased from day one, but the question is what should that be. Which will give me the best voice quality and easy configuration and compatibility with PIAF (preferably without breaking the bank)
In the research done and forums I have read, the Obihai seems like the best choice (or at least the most commented on), but which one and is it truly plug and play with PIAF (and reliable?) I thank in advance any and all of you who can help me to choose the best device to finally make this journey complete.

Just a quick breakdown of my equipment. I am currently running PIAF on a Thinkpad T500, and also have a Panasonic TGP550 with a base and 5 handsets. I have 2 (will probably have 3 or 4 in the near future) analog phone lines which I want to use for all incoming calls (and here is where I need the FXO ports for use with PIAF) and I will use the Vitelity SIP account for outgoing calls for now, but may also want to use the analog lines for outgoing calls as well.

If I went with the OBI202 for example, to handle (if it will at all) the 2 analog phone lines I have now, would I be able to add a second unit to handle lines 3 & 4 in the future?
 
Last edited:

Jake

Active Member
Joined
Aug 27, 2010
Messages
419
Reaction score
81
The OBI202 has two FXS ports so that won't work if you want to connect them to POTS lines. If you want FXO ports you could go with multiple OBI110's which has one FXO & one FXS or go with a Patton SN4114/JO/EUI with four FXO ports. Each solution will require some configuration but that is half the fun!
 

MichaelW

New Member
Joined
Oct 17, 2014
Messages
16
Reaction score
0
Well, I would rather have a single unit that would support up to 4 lines than a gaggel of devices, and one that is known to work (and work well) with PIAF. Does the Patton meet those requirements? Is it something that is relatively straightforward to act as an FXO gateway and not have me pull what little hair I have left out of my head trying to configure?
 

Jake

Active Member
Joined
Aug 27, 2010
Messages
419
Reaction score
81
The Patton honestly was a hair puller doing the first one. However, it has been very stable. There is the cheaper Grandstream FXO ones but I've had hit and miss luck with losing registration on those. They do seem to be somewhat easier to configure. By far the easiest is just to go all SIP.
 

MichaelW

New Member
Joined
Oct 17, 2014
Messages
16
Reaction score
0
Well, I have read some supposedly working configs on the Patton and they seem to have good support, so I will order one of them. Hopefully it deals well with PIAF. I will try to get it going on my own but will post if I run into any roadblocks. Thanks a lot!
 

Jake

Active Member
Joined
Aug 27, 2010
Messages
419
Reaction score
81
Good luck. We are here to help!
 

Asher

Member
Joined
Jan 29, 2014
Messages
89
Reaction score
14
I've good suucess with the Grandstream GXW41xx devices for FXO and the GXW40xx for FXS
 

MichaelW

New Member
Joined
Oct 17, 2014
Messages
16
Reaction score
0
The Patton honestly was a hair puller doing the first one. However, it has been very stable. There is the cheaper Grandstream FXO ones but I've had hit and miss luck with losing registration on those. They do seem to be somewhat easier to configure. By far the easiest is just to go all SIP.
Jake-
I ordered the Patton 4114, and I have a config script installed which seems to be working. If I go into PIAF I see that it is Status OK for the trunk I created (Named 001). What I next want to do is get that to answer any of the lines in the hunt group I created on the Patton and forward them to PIAF. Am I correct in that all I need to do it create an inbound route with a destination of my IVR, because when I do that I don't see anywhere to choose which trunk the route should be handling?
 

Jake

Active Member
Joined
Aug 27, 2010
Messages
419
Reaction score
81
Yes, you'll need to create an inbound route to your IVR. You don't pick a certain trunk. You use the DID that is passed from the Patton to create an inbound route rule. That DID or whatever number you put in is configured in the Patton. So you tell Asterisk to watch for the specific digits (DID) that are being sent from the Patton when a call comes in and route it to your IVR or directly to a ring group.
 

MichaelW

New Member
Joined
Oct 17, 2014
Messages
16
Reaction score
0
Jake-
Well, it looks like the trunk is NOT registering properly (according to patton) even though PIAF says OK, they have no examples for PIAF for the proper PEER details that should be in the trunk. I have been going from some of the earlier posts and using those examples, but it seems they might be either outdated or incorrect for current versions. Would you be so good to share your current configuration file in the Patton and more importantly your trunk settings (Specifically the PEER and USER detail sections that you are using that are correctly registering. Thank you!
 

Jake

Active Member
Joined
Aug 27, 2010
Messages
419
Reaction score
81
Yes. Let me lookup those settings.
 

Jake

Active Member
Joined
Aug 27, 2010
Messages
419
Reaction score
81
Here is my Patton config. I cheated and used a website that is shown in the config file to generate it.

Code:
#----------------------------------------------------------------
#
# http://www.patton-smartnode-configuration.com
# Asterweb Srl - Milan - Italy
# [email protected]
#
# Firmware 6.x
# Generated configuration file 2015-10-31 22:55:39
#
#----------------------------------------------------------------

cli version 3.20
clock local default-offset -06:00
dns-client server 8.8.8.8
dns-client server 8.8.4.4
dns-relay
webserver port 80 language en
sntp-client
sntp-client server primary 192.168.0.10 port 123 version 4
system hostname SN4114

system
  ic voice 0


profile ppp default

profile call-progress-tone US_Dialtone
  play 1 1000 350 -13 440 -13

profile call-progress-tone US_Alertingtone
  play 1 1000 440 -19 480 -19
  pause 2 3000

profile call-progress-tone US_Busytone
  play 1 500 480 -24 620 -24
  pause 2 500

profile call-progress-tone US_Releasetone
  play 1 250 480 -24 620 -24
  pause 2 250

profile tone-set default

profile tone-set US
  map call-progress-tone dial-tone US_Dialtone
  map call-progress-tone ringback-tone US_Alertingtone
  map call-progress-tone busy-tone US_Busytone
  map call-progress-tone release-tone US_Releasetone
  map call-progress-tone congestion-tone US_Busytone

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

profile pstn default

profile sip default
  no autonomous-transitioning

profile aaa default
  method 1 local
  method 2 none

context ip router
  interface LAN
    ipaddress 10.82.7.49 255.255.255.0
    tcp adjust-mss rx mtu
    tcp adjust-mss tx mtu

context ip router
  route 0.0.0.0 0.0.0.0 10.82.7.1 0

context cs switch
  digit-collection timeout 3
  no digit-collection terminating-char
  national-prefix 0
  international-prefix 00

  routing-table called-e164 INBOUND_0
    route default dest-interface IF_SIP_SERVICE_0 MAP_DID_0

  routing-table called-e164 INBOUND_1
    route default dest-interface IF_SIP_SERVICE_1 MAP_DID_1

  routing-table called-e164 INBOUND_2
    route default dest-interface IF_SIP_SERVICE_2 MAP_DID_2

  routing-table called-e164 INBOUND_3
    route default dest-interface IF_SIP_SERVICE_3 MAP_DID_3

  routing-table called-e164 OUTBOUND_0
    route default dest-service BOUND_PSTN_0

  routing-table called-e164 OUTBOUND_1
    route default dest-service BOUND_PSTN_1

  routing-table called-e164 OUTBOUND_2
    route default dest-service BOUND_PSTN_2

  routing-table called-e164 OUTBOUND_3
    route default dest-service BOUND_PSTN_3

  mapping-table called-e164 to called-e164 MAP_DID_0
    map default to 5551111

  mapping-table called-e164 to called-e164 MAP_DID_1
    map default to 5551112

  mapping-table called-e164 to called-e164 MAP_DID_2
    map default to 5551113

  mapping-table called-e164 to called-e164 MAP_DID_3
    map default to 5551114

  interface fxo IF_PSTN_0
    route call dest-table INBOUND_0
    loop-break-duration min 60 max 5000
    disconnect-signal loop-break
    disconnect-signal busy-tone
    ring-number on-caller-id
    dial-after timeout 1
    mute-dialing
    use profile tone-set US   

  interface fxo IF_PSTN_1
    route call dest-table INBOUND_1
    loop-break-duration min 60 max 5000
    disconnect-signal loop-break
    disconnect-signal busy-tone
    ring-number on-caller-id
    dial-after timeout 1
    mute-dialing
    use profile tone-set US   

  interface fxo IF_PSTN_2
    route call dest-table INBOUND_2
    loop-break-duration min 60 max 5000
    disconnect-signal loop-break
    disconnect-signal busy-tone
    ring-number on-caller-id
    dial-after timeout 1
    mute-dialing
    use profile tone-set US   

  interface fxo IF_PSTN_3
    route call dest-table INBOUND_3
    loop-break-duration min 60 max 5000
    disconnect-signal loop-break
    disconnect-signal busy-tone
    ring-number on-caller-id
    dial-after timeout 1
    mute-dialing
    use profile tone-set US   

  interface sip IF_SIP_SERVICE_0
    bind context sip-gateway GW_SIP_0
    route call dest-table OUTBOUND_0
    remote 192.168.0.10
    early-disconnect
    privacy

  interface sip IF_SIP_SERVICE_1
    bind context sip-gateway GW_SIP_1
    route call dest-table OUTBOUND_1
    remote 192.168.0.10
    early-disconnect
    privacy

  interface sip IF_SIP_SERVICE_2
    bind context sip-gateway GW_SIP_2
    route call dest-table OUTBOUND_2
    remote 192.168.0.10
    early-disconnect
    privacy

  interface sip IF_SIP_SERVICE_3
    bind context sip-gateway GW_SIP_3
    route call dest-table OUTBOUND_3
    remote 192.168.0.10
    early-disconnect
    privacy

service hunt-group BOUND_PSTN_0
    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
    drop-cause user-busy
    route call 1 dest-interface IF_PSTN_0

service hunt-group BOUND_PSTN_1
    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
    drop-cause user-busy
    route call 1 dest-interface IF_PSTN_1

service hunt-group BOUND_PSTN_2
    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
    drop-cause user-busy
    route call 1 dest-interface IF_PSTN_2

service hunt-group BOUND_PSTN_3
    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
    drop-cause user-busy
    route call 1 dest-interface IF_PSTN_3

context cs switch
  no shutdown

authentication-service AUTH_SVC
  username 001 password secret1
  username 002 password secret1
  username 003 password secret1
  username 004 password secret1

location-service LOCATION_SVC_0
  domain 1 192.168.0.10

  identity 001
    authentication outbound
      authenticate 1 authentication-service AUTH_SVC username 001

    registration outbound
      registrar 192.168.0.10
      lifetime 3600
      register auto

location-service LOCATION_SVC_1
  domain 1 192.168.0.10

  identity 002
    authentication outbound
      authenticate 1 authentication-service AUTH_SVC username 002

    registration outbound
      registrar 192.168.0.10
      lifetime 3600
      register auto

location-service LOCATION_SVC_2
  domain 1 192.168.0.10

  identity 003
    authentication outbound
      authenticate 1 authentication-service AUTH_SVC username 003

    registration outbound
      registrar 192.168.0.10
      lifetime 3600
      register auto

location-service LOCATION_SVC_3
  domain 1 192.168.0.10

  identity 004
    authentication outbound
      authenticate 1 authentication-service AUTH_SVC username 004

    registration outbound
      registrar 192.168.0.10
      lifetime 3600
      register auto


context sip-gateway GW_SIP_0
  interface IF_GW_SIP_0
    bind interface LAN context router port 5060

context sip-gateway GW_SIP_0
  bind location-service LOCATION_SVC_0
  no shutdown

context sip-gateway GW_SIP_1
  interface IF_GW_SIP_1
    bind interface LAN context router port 5061

context sip-gateway GW_SIP_1
  bind location-service LOCATION_SVC_1
  no shutdown

context sip-gateway GW_SIP_2
  interface IF_GW_SIP_2
    bind interface LAN context router port 5062

context sip-gateway GW_SIP_2
  bind location-service LOCATION_SVC_2
  no shutdown

context sip-gateway GW_SIP_3
  interface IF_GW_SIP_3
    bind interface LAN context router port 5063

context sip-gateway GW_SIP_3
  bind location-service LOCATION_SVC_3
  no shutdown

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

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

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

port fxo 0 2
  encapsulation cc-fxo
  bind interface IF_PSTN_2 switch
  no shutdown

port fxo 0 3
  encapsulation cc-fxo
  bind interface IF_PSTN_3 switch
  no shutdown
 

MichaelW

New Member
Joined
Oct 17, 2014
Messages
16
Reaction score
0
Jake- Thanks for the config file, I will modify it for the ip address differences and username changes and upload it to my patton. What settings do you have in your incoming and/or outgoing trunk entries, especially the PEER and USER detail sections because that is what I cannot figure out to get it to properly register.
 

Jake

Active Member
Joined
Aug 27, 2010
Messages
419
Reaction score
81
Here is the Peer setting for the trunk. There are no User settings. The website above will also generate these for you:

Code:
username=001
secret=secret1
type=friend
host=dynamic
port=5060
nat=no
directmedia=no
defaultip=192.168.0.10
context=from-pstn
insecure=port,invite
dtmfmode=rfc2833
qualify=yes
disallow=all
allow=alaw&ulaw

If you want each line to come in separately for routing purposes then you'd need to create a trunk for each line. Then change the username in the peer settings to 002, 003 ... for each trunk.
 

MichaelW

New Member
Joined
Oct 17, 2014
Messages
16
Reaction score
0
Jake-
Thank you very much. Unfortunately, I cannot get this to register whether trying the config that Patton sent me or trying the config that you provided (I also tried generating one on the website you pointed out) :( Did you need to tweak anything or did it just work once you uploaded the patton config and restarted everything? Also, if you go to asterisk info and then peers, does it say OK or UNKNOWN in the status column? I may have had the config wrong but once before if I left the host as dynamic it said UNKNOWN but it I plugged the patton IP into that line even though it still wouldn't register is said OK in status.

Also - If you login to your patton and go to Telephony/SIP/Status and scroll to the bottom, What does it say in SIP Registration Manager State - Registering or Registered? If you go into PIAF to Reports/Asterisk Info and then chan_sip info do you see a registration entry in the top box?
 
Last edited:

MichaelW

New Member
Joined
Oct 17, 2014
Messages
16
Reaction score
0
Here's the relevant portion of the running report, which Patton says should say "Registered" not registering.

State: Registering
Registration Inbound: disabled

SIP Registration: State: Registering
Registrar: 192.168.0.10
Used Registrar: 192.168.0.10
 

Jake

Active Member
Joined
Aug 27, 2010
Messages
419
Reaction score
81
Yes, my box shows that it is registered. Is your PIAF ip address 192.168.0.10?
 

MichaelW

New Member
Joined
Oct 17, 2014
Messages
16
Reaction score
0
Yes it is. My patton just sits at Registering. Everything else on my PIAF box is working fine, the Panasonic SIP phones, my Vitelity SIP account, I just have been unable to get any fxo adapter to work. I first started with the SPA31-2 and now this, and I cannot get anything to work :(

I am wondering if I screwed up something somewhere and should just setup another box with nothing but the patton and see if I can get it to talk to the gateway.
 
Last edited:

Jake

Active Member
Joined
Aug 27, 2010
Messages
419
Reaction score
81
I'm just surprised your PIAF box ip address is 192.168.0.10. Those config files I posted also have that IP address in the but I just picked .10 randomly.

Does it even try to register with the PIAF? What is the IP address of your Patton?
 
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top