SM4131 4 bri, outgoing call ok, incoming no

Hello,
I have the patton in object configured (I don’t think correctly of these points), from freepbx I can call without problems but when I try to receive from the asterisk cli I don’t see anything.
This is the patton running conf, do you have any idea where the problem is?

#----------------------------------------------------------------
# Patton Electronics Company
# Wizard generated config file
# Name:
#   SN5530 / SN4130 Trinity ISDN BRI Basic Setup
# Description:
#   This sets up your Trinity SN5530/SN4130 with either an IPPBX or an ITSP SIP Trunk.
#----------------------------------------------------------------
cli version 4.0

no clock local default-offset
rtp-port-range 6000 9999

profile aaa DEFAULT
  method 1 local
  method 2 none

console
  use profile aaa DEFAULT

telnet-server
  use profile aaa DEFAULT
  no shutdown

ssh-server
  use profile aaa DEFAULT
  no shutdown

snmp-server
  shutdown

web-server http
  use profile aaa DEFAULT
  no shutdown

web-server https
  use profile aaa DEFAULT
  no shutdown

system
  clock-source 1 bri 0 0
  clock-source 2 bri 0 1

  clock-source 3 bri 0 2

  clock-source 4 bri 0 3

ntp
  server 0.patton.pool.ntp.org
  server 1.patton.pool.ntp.org
  server 2.patton.pool.ntp.org
  server 3.patton.pool.ntp.org
  no shutdown

profile napt NAPT_WAN

profile dhcp-server DHCPS_LAN
  network 192.168.1.0/24
  lease 24 hours
  default-router 192.168.1.1
  domain-name-server 192.168.1.1
  include 192.168.1.10 192.168.1.99

profile tls DEFAULT
  authentication incoming
  authentication outgoing
  private-key pki:private-key/DEFAULT
  own-certificate 1 pki:own-certificate/DEFAULT

profile call-progress-tone IT_Dialtone
  play 1 200 425 -12
  pause 2 200
  play 3 600 425 -12
  pause 4 1000
  play 5 200 425 -12
  pause 6 200
  play 7 600 425 -12
  pause 8 1000
  play 9 200 425 -12
  pause 10 200

profile call-progress-tone IT_Alertingtone
  play 1 1000 425 -12
  pause 2 4000
  play 3 1000 425 -12
  pause 4 4000
  play 5 1000 425 -12
  pause 6 4000

profile call-progress-tone IT_Busytone
  play 1 500 425 -12
  pause 2 500
  play 3 500 425 -12
  pause 4 500
  play 5 500 425 -12
  pause 6 500

profile tone-set DEFAULT

profile tone-set IT
  map call-progress-tone dial-tone IT_Dialtone
  map call-progress-tone ringback-tone IT_Alertingtone
  map call-progress-tone busy-tone IT_Busytone
  map call-progress-tone release-tone IT_Busytone
  map call-progress-tone congestion-tone IT_Busyton

profile voip DEFAULT
  codec 1 g711alaw64k rx-length 20 tx-length 20
  codec 2 g711ulaw64k rx-length 20 tx-length 20
  fax transmission 1 relay t38-udp
  fax transmission 2 bypass g711alaw64k rx-length 20 tx-length 20
  fax transmission 3 bypass g711ulaw64k rx-length 20 tx-length 20
  fax bypass-method signaling
  modem transmission 1 bypass g711alaw64k rx-length 20 tx-length 20
  modem transmission 2 bypass g711ulaw64k rx-length 20 tx-length 20
  modem bypass-method signaling

profile pstn DEFAULT

profile sip DEFAULT

context ip ROUTER

  interface WAN

    ipaddress DHCP

profile ppp DEFAULT

context bridge

context cs SWITCH
  no shutdown

  routing-table called-e164 RT_ISDN_TO_SIP

	route .T dest-service SER_SIP_SER

  interface isdn IF_ISDN_00
    route call dest-table RT_ISDN_TO_SIP
    call-reroute emit
    diversion emit

  interface isdn IF_ISDN_01
    route call dest-table RT_ISDN_TO_SIP
    call-reroute emit
    diversion emit

    interface isdn IF_ISDN_02
    route call dest-table RT_ISDN_TO_SIP
    call-reroute emit
    diversion emit

  interface isdn IF_ISDN_03
    route call dest-table RT_ISDN_TO_SIP
    call-reroute emit
    diversion emit

	service hunt-group SRV_HG
    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_ISDN_00
    route call 2 dest-interface IF_ISDN_01

    route call 3 dest-interface IF_ISDN_02

    route call 4 dest-interface IF_ISDN_03

  interface sip IF_SIP
    bind context sip-gateway GW_SIP
    route call dest-service SRV_HG
    local

  service sip-location-service SER_SIP_SER
    bind location-service SER_LOC

authentication-service AUTH_SRV
	realm patton
  username vigili password PYHciCqT3LgQ1iW8rLkpfg== encrypted

location-service SER_LOC
  domain 1 192.168.10.160
  match-any-domain

  identity-group DEFAULT

      authentication inbound
      authenticate 1 authentication-service AUTH_SRV username vigili

    registration inbound

  identity vigili inherits DEFAULT

context sip-gateway GW_SIP

  interface SIP
    transport-protocol udp+tcp 5060
    no transport-protocol tls
    bind ipaddress ROUTER WAN DHCP

context sip-gateway GW_SIP
  no shutdown

port ethernet 0 0
  bind interface ROUTER WAN
  no shutdown

port bri 0 0
  clock auto

  encapsulation q921

  q921
    protocol pmp
    permanent-layer2
    uni-side auto
    encapsulation q931

    q931
      protocol dss1
      uni-side net
      encapsulation cc-isdn
      bind interface SWITCH IF_ISDN_00

port bri 0 0
  no shutdown

port bri 0 1
  clock auto

  encapsulation q921

  q921
    protocol pmp
    permanent-layer2
    uni-side auto
    encapsulation q931

    q931
      protocol dss1
      uni-side net
      encapsulation cc-isdn
      bind interface SWITCH IF_ISDN_01

port bri 0 1
  no shutdown

port bri 0 2
  clock auto

  encapsulation q921

  q921
    protocol pmp
    permanent-layer2
    uni-side auto
    encapsulation q931

    q931
      protocol dss1
      uni-side net
      encapsulation cc-isdn
      bind interface SWITCH IF_ISDN_02

port bri 0 2
  no shutdown

port bri 0 3
  clock auto

  encapsulation q921

  q921
    protocol pmp
    permanent-layer2
    uni-side auto
    encapsulation q931

    q931
      protocol dss1
      uni-side net
      encapsulation cc-isdn
      bind interface SWITCH IF_ISDN_03

port bri 0 3
  no shutdown

Thanks in advance
Davide

You have provided no Asterisk related information (Asterisk logs and configuration).

Google fails to find that model number. Is it an ISDN to SIP gateway?

Hi, thaks for replay, exact model is:

SN4131/4BIS8VHP/EUI
4 BRI port connected to 4 ISDN

Asterisk 13.27.1

On asterisk CLI no logs for inbound calls, about me the calls are no routed to the asterisk

P.S:
I use FreePBX
From cli if type sip show peers i seet that is registerd on patton

Check the SIP logs for he registration, paraticularly that the Contact header is correct.

I’l check.
The registration may be right t in one way only or if it is correct it is correct for both? Because if in outgoing the calls works as expected i suppose that the registration is correct.

I cofirm, any logs (full, sip, ecc), are populated only for outbound calls, no trace about incoming calls, for me the problem is before freepbx, patton don’t send calls to freepbx, but the patton conf seems correct.

SIP does not require one to register before making outbound calls, although some systems might only accept calls from peers to whci they would send calls.

Even if they insist on registration, the Contact header in the registration may not contain and address to whcih they can route.

Ok understand, the problem may be an incorrect sip header from patton calls?

The problem may be an incorrect NAT configuration on Asterisk resulting in its supplying a local address when you need a public addrss, or v.v.

I’m trying, i’ve tried with nat yes e no but on each BRI port i can only send calls but i can’t recive anything. Ive enabled sip debug but during the incoming calls (i hear the ring) but on cli nothing apper and i’ve debut set to 7

Don’t stab in the dark. Look a the logs and work out if the wong address is actually being sent. Note nat=yes is deprecated.

yes of curse, i’m using nat=force_rport
I’m in tail on the log but during incoming calls i dont see nothing…

If you have a NAT problem it is unlikely to relate to the nat= setting

Please capture the REGISTER transaction and post it here, being very careful not to lose the distinction between public and private addresses in any redaction.

SIP/2.0 200 OK
Accept: application/sdp, application/dtmf-relay, application/hook-flash, application/QSIG, application/broadsoft, application/vnd.etsi.aoc+xml
Via: SIP/2.0/UDP 192.168.10.160:5060;branch=z9hG4bK0c44fba6;rport=5060;received=192.168.10.160
From: “Unknown” sip:Unknown@192.168.10.160;tag=as0ae9b884
To: sip:192.168.10.64;tag=4145122018
Call-ID: 0cbb3e227f7c49bf502037ab785c6f3d@192.168.10.160:5060
CSeq: 102 OPTIONS
Allow: ACK, BYE, CANCEL, INVITE, NOTIFY, OPTIONS, INFO, UPDATE, REFER, REGISTER
Server: Patton SN4131/4BIS8VHP 00A0BA0FB93E 3.16.0-19083 1.8 M5T SIP Stack/4.2.28.153
Content-Length: 0

Freepbx and patton are in the same lan as te phones

That’s not a complete transaction and it isn’t a REGISTER transaction.

Also, please mark logs as preformatted text, using the </> button.

what do you mean for REGISTER transaction

In asterisk log folder ive only this log

fail2ban.log
full.log
freepbx.log

And the only REGISTER voice is what i posted before adn is in full.log

Please provide the complete sip.conf or pjsip.conf configuration affecting the gateway device.

You said “i seet that is registerd on patton”. To me that indicates that Asterisk must have initiated an, apparently, successful REGISTER transaction. I would like to see that SIP exchange that implemented that.

I cat upload attach as new user, i send it i next 2 posts

sip_additional and sip.conf

;sip_nat.conf is here for legacy support reasons and for those that upgrade
;from previous versions.  If you have this file with lines in it please make
;sure they are not duplicated in sip_general_custom.conf, if so remove them
;from sip_nat.conf as sip_general_custom.conf will have precedence.
#include sip_nat.conf

;sip_registrations_custom.conf is for any customizations you might need to do to
;the automatically generated registrations that FreePBX makes.
;
#include sip_registrations_custom.conf
#include sip_registrations.conf

; These files should all be expected to come after the [general] context
;
#include sip_custom.conf
#include sip_additional.conf

;sip_custom_post.conf If you have extra parameters that are needed for a
;extension to work to for example, those go here.  So you have extension
;1000 defined in your system you start by creating a line [1000](+) in this
;file.  Then on the next line add the extra parameter that is needed.
;When the sip.conf is loaded it will append your additions to the end of
;that extension.
;
#include sip_custom_post.conf
[root@freepbx asterisk]# vi sip_additional.conf 
;--------------------------------------------------------------------------------;
;          Do NOT edit this file as it is auto-generated by FreePBX.             ;
;--------------------------------------------------------------------------------;
; For information on adding additional paramaters to this file, please visit the ;
; FreePBX.org wiki page, or ask on IRC. This file was created by the new FreePBX ;
; BMO - Big Module Object. Any similarity in naming with BMO from Adventure Time ;
; is totally deliberate.                                                         ;
;--------------------------------------------------------------------------------;
[103]
deny=0.0.0.0/0.0.0.0
secret=1234
dtmfmode=rfc2833
canreinvite=no
context=from-internal
host=dynamic
defaultuser=
trustrpid=yes
sendrpid=pai
type=friend
session-timers=accept
nat=no
port=5060
qualify=yes
qualifyfreq=60
transport=udp
avpf=no
force_avp=no
icesupport=no
rtcp_mux=no
encryption=no
namedcallgroup=
namedpickupgroup=
dial=SIP/103
accountcode=
permit=0.0.0.0/0.0.0.0
callerid=Ufficio Viabilità <103>
recordonfeature=apprecord
recordofffeature=apprecord
callcounter=yes
faxdetect=no
cc_monitor_policy=generic

[105]
deny=0.0.0.0/0.0.0.0
secret=1234
"sip_additional.conf" 326L, 5489C
deny=0.0.0.0/0.0.0.0
secret=1234
dtmfmode=rfc2833
canreinvite=no
context=from-internal
host=dynamic
defaultuser=
trustrpid=yes
sendrpid=pai
type=friend
session-timers=accept
nat=no
port=5060
qualify=yes
qualifyfreq=60
transport=udp
avpf=no
force_avp=no
icesupport=no
rtcp_mux=no
encryption=no
namedcallgroup=
namedpickupgroup=
dial=SIP/115
accountcode=
permit=0.0.0.0/0.0.0.0
callerid=Postazione dietro Co <115>
recordonfeature=apprecord
recordofffeature=apprecord
callcounter=yes
faxdetect=no
cc_monitor_policy=generic

[vigili]
username=vigili
type=friend
secret=2019sistemi!
qualify=yes
insecure=port,invite
host=192.168.10.64
dtmfmode=rfc2833
context=from-pstn
sendrpid=yes
nat=force_rport

sip.conf

sip_additional.conf            sip_custom_post.conf           sip_nat.conf                   sip_notify_custom.conf
sip.conf                       sip_general_additional.conf    sip_notify_additional.conf     sip_registrations.conf
sip_custom.conf                sip_general_custom.conf        sip_notify.conf                sip_registrations_custom.conf
[root@freepbx asterisk]# vi sip.conf 
;--------------------------------------------------------------------------------;
; Do NOT edit this file as it is auto-generated by FreePBX. All modifications to ;
; this file must be done via the web gui. There are alternative files to make    ;
; custom modifications.                                                          ;
;--------------------------------------------------------------------------------;
[general]

; These files will all be included in the [general] context
;
#include sip_general_additional.conf

;sip_general_custom.conf is the proper file location for placing any sip general
;options that you might need set. For example: enable and force the sip jitterbuffer.
;If these settings are desired they should be set the sip_general_custom.conf file.
;
; jbenable=yes
; jbforce=yes
;
;It is also the proper place to add the lines needed for sip nat'ing when going
;through a firewall.  For nat'ing you'd need to add the following lines:
; nat=yes , externip= , localhost= , and optionally fromdomain= .
;
#include sip_general_custom.conf

;sip_nat.conf is here for legacy support reasons and for those that upgrade
;from previous versions.  If you have this file with lines in it please make
;sure they are not duplicated in sip_general_custom.conf, if so remove them
;from sip_nat.conf as sip_general_custom.conf will have precedence.
#include sip_nat.conf

;sip_registrations_custom.conf is for any customizations you might need to do to
;the automatically generated registrations that FreePBX makes.
;
#include sip_registrations_custom.conf
#include sip_registrations.conf

; These files should all be expected to come after the [general] context
;
#include sip_custom.conf
#include sip_additional.conf

;sip_custom_post.conf If you have extra parameters that are needed for a
;extension to work to for example, those go here.  So you have extension
;1000 defined in your system you start by creating a line [1000](+) in this
;file.  Then on the next line add the extra parameter that is needed.
;When the sip.conf is loaded it will append your additions to the end of
;that extension.
;
#include sip_custom_post.conf
[root@freepbx asterisk]# vi sip_additional.conf 
;--------------------------------------------------------------------------------;
;          Do NOT edit this file as it is auto-generated by FreePBX.             ;
;--------------------------------------------------------------------------------;
; For information on adding additional paramaters to this file, please visit the ;
; FreePBX.org wiki page, or ask on IRC. This file was created by the new FreePBX ;
; BMO - Big Module Object. Any similarity in naming with BMO from Adventure Time ;
; is totally deliberate.                                                         ;
;--------------------------------------------------------------------------------;
[103]
deny=0.0.0.0/0.0.0.0
secret=1234
dtmfmode=rfc2833
canreinvite=no
context=from-internal
host=dynamic
defaultuser=
trustrpid=yes
sendrpid=pai
type=friend
session-timers=accept
nat=no
port=5060
qualify=yes
qualifyfreq=60
transport=udp
avpf=no
force_avp=no
icesupport=no
rtcp_mux=no
encryption=no
namedcallgroup=
namedpickupgroup=
dial=SIP/103
accountcode=
permit=0.0.0.0/0.0.0.0
callerid=Ufficio Viabilità <103>
recordonfeature=apprecord
recordofffeature=apprecord
callcounter=yes
faxdetect=no
cc_monitor_policy=generic

[105]
deny=0.0.0.0/0.0.0.0
secret=1234
"sip_additional.conf" 326L, 5489C
deny=0.0.0.0/0.0.0.0
secret=1234
dtmfmode=rfc2833
canreinvite=no
context=from-internal
host=dynamic
defaultuser=
trustrpid=yes
sendrpid=pai
type=friend
session-timers=accept
nat=no
port=5060
qualify=yes
qualifyfreq=60
transport=udp
avpf=no
force_avp=no
icesupport=no
rtcp_mux=no
encryption=no
namedcallgroup=
namedpickupgroup=
dial=SIP/115
accountcode=
permit=0.0.0.0/0.0.0.0
callerid=Postazione dietro Co <115>
recordonfeature=apprecord
recordofffeature=apprecord
callcounter=yes
faxdetect=no
cc_monitor_policy=generic

[vigili]
username=vigili
type=friend
secret=2019sistemi!
qualify=yes
insecure=port,invite
host=192.168.10.64
dtmfmode=rfc2833
context=from-pstn
sendrpid=yes
nat=force_rport

[root@freepbx asterisk]# vi sip.conf 
;--------------------------------------------------------------------------------;
; Do NOT edit this file as it is auto-generated by FreePBX. All modifications to ;
; this file must be done via the web gui. There are alternative files to make    ;
; custom modifications.                                                          ;
;--------------------------------------------------------------------------------;
[general]

; These files will all be included in the [general] context
;
#include sip_general_additional.conf

;sip_general_custom.conf is the proper file location for placing any sip general
;options that you might need set. For example: enable and force the sip jitterbuffer.
;If these settings are desired they should be set the sip_general_custom.conf file.
;
; jbenable=yes
; jbforce=yes
;
;It is also the proper place to add the lines needed for sip nat'ing when going
;through a firewall.  For nat'ing you'd need to add the following lines:
; nat=yes , externip= , localhost= , and optionally fromdomain= .
;
#include sip_general_custom.conf

;sip_nat.conf is here for legacy support reasons and for those that upgrade
;from previous versions.  If you have this file with lines in it please make
;sure they are not duplicated in sip_general_custom.conf, if so remove them
;from sip_nat.conf as sip_general_custom.conf will have precedence.
#include sip_nat.conf

;sip_registrations_custom.conf is for any customizations you might need to do to
;the automatically generated registrations that FreePBX makes.
;
#include sip_registrations_custom.conf
#include sip_registrations.conf

; These files should all be expected to come after the [general] context
;
#include sip_custom.conf
#include sip_additional.conf

;sip_custom_post.conf If you have extra parameters that are needed for a
;extension to work to for example, those go here.  So you have extension
;1000 defined in your system you start by creating a line [1000](+) in this
;file.  Then on the next line add the extra parameter that is needed.

The registration is outbound, freepbx make a registration on patton

There appears to be no registration involved. I’d say the gateway simply has no idea how to reach the Asterisk box.

The gateway may require Asterisk to register, but there is nothing in the configuration that would achieve that.