about Patton configuration

Status
Not open for further replies.

maxisvk

Bronze Partner
Basic Certified
Joined
Sep 2, 2019
Messages
5
Reaction score
0
hi, i have a Patton SN4554, works perfect with 3cx configuration file, only problem is that local incoming call have double zero insted of only one, mobile call is right

this is Patton cfg, im not sure how to edit MAP_LEADING_ZERO to solve this... thanks!

Code:
#########################################################
#
# For Patton 1-8 BRI ISDN SmartNodes SN4120 SN463X SN4660
# Supported firmware versions R6.x
#
# Author: Tommaso Missoni
# Support Contact: [email protected]
#
#########################################################

webserver port 80 language en

system

  ic voice 0
    low-bitrate-codec g729
    pcm law-select aLaw

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
  clock-source 5 bri 0 4
  clock-source 6 bri 0 5
  clock-source 7 bri 0 6
  clock-source 8 bri 0 7
 
 
 sntp-client

sntp-client server primary pool.ntp.org

profile ppp default


profile call-progress-tone defaultDialtone
  flush-play-list
  play 1 200 425 0
  pause 2 200
  play 3 600 425 0
  pause 4 1000

profile call-progress-tone defaultAlertingtone
  flush-play-list
  play 1 1000 425 -7
  pause 2 4000

profile call-progress-tone defaultBusytone
  flush-play-list
  play 1 200 425 -7
  pause 2 200

profile call-progress-tone defaultReleasetone
  flush-play-list
  play 1 250 425 -7
  pause 2 250

profile call-progress-tone defaultCongestiontone
  flush-play-list
  play 1 250 425 -7
  pause 2 250
 

profile tone-set default

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
  fax redundancy low-speed 2 high-speed 1

profile pstn default

profile sip default

profile aaa default
  method 1 local
  method 2 none

context ip router

  interface IF_IP_LAN
    ipaddress 192.168.0.41 255.255.255.0
    tcp adjust-mss rx mtu
    tcp adjust-mss tx mtu
    
  interface IF_IP_WAN
    ipaddress dhcp
    tcp adjust-mss rx mtu
    tcp adjust-mss tx mtu


context cs switch
 
  mapping-table calling-pi to calling-e164 MAP_REMOVE_BLANK_CALLERID
    map restricted to ""

  mapping-table calling-e164 to calling-e164 MAP_LEADING_ZERO
    
        map (3.%)-(.%)-(.%)-(.%)-(.%) to \1\2\3\4\5
        map (3.%)-(.%)-(.%)-(.%) to \1\2\3\4
        map (3.%)-(.%)-(.%) to \1\2\3
        map (3.%)-(.%) to \1\2
        map (3.%) to \1
        map (.%)-(.%)-(.%)-(.%)-(.%) to 0\1\2\3\4\5
        map (.%)-(.%)-(.%)-(.%) to 0\1\2\3\4
        map (.%)-(.%)-(.%) to 0\1\2\3
        map (.%)-(.%) to 0\1\2
        map (.%) to 0\1
            
 
  mapping-table calling-e164 to calling-name MAP_CID_TO_CNAME
    map (.%) to \1

  complex-function MAPPING_INCOMING_CALLS
    execute 1 MAP_REMOVE_BLANK_CALLERID
    execute 2 MAP_LEADING_ZERO

  complex-function MAPPING_INCOMING_CALLS_WITH_CNAME
    execute 1 MAP_REMOVE_BLANK_CALLERID
    execute 2 MAP_LEADING_ZERO
    execute 3 MAP_CID_TO_CNAME
    
  mapping-table calling-e164 to calling-e164 SET_CNPN
    map 0(.%) to \1

  mapping-table calling-type-of-number to calling-type-of-number TYPE
    map default to national

  mapping-table calling-numbering-plan to calling-numbering-plan PLAN
    map default to isdn-telephony

  complex-function OUTBOUND
    execute 1 PLAN
    execute 2 SET_CNPN
    execute 3 TYPE
    
  routing-table calling-name SET_CNAME
    route ^$ dest-interface IF_SIP MAPPING_INCOMING_CALLS_WITH_CNAME
    route default dest-interface IF_SIP MAPPING_INCOMING_CALLS
 
  routing-table called-e164 RT_ISDN_TO_SIP
    route T2 dest-table SET_CNAME
    
  routing-table called-e164 RT_SIP_TO_ISDN
    route default dest-service HG_TO_ISDN
    
    
    service hunt-group HG_TO_ISDN
    
    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_0
        route call 2 dest-interface IF_ISDN_1   
            
        
    
        
         interface isdn IF_ISDN_0
            route call dest-table RT_ISDN_TO_SIP
            call-reroute emit
            diversion emit
            user-side-ringback-tone
            call-hold disable
            caller-name   
            
        interface isdn IF_ISDN_1
            route call dest-table RT_ISDN_TO_SIP
            call-reroute emit
            diversion emit
            user-side-ringback-tone
            call-hold disable
            caller-name   
            
        
    

    interface sip IF_SIP
    bind context sip-gateway GW_SIP
    early-disconnect
    route call dest-table RT_SIP_TO_ISDN
    remote 192.168.0.40 5060
    call-reroute accept
    trust remote
    address-translation outgoing-call request-uri user-part fix 10000 host-part to-header target-param none
    address-translation incoming-call called-e164 request-uri



context cs switch
  no shutdown

authentication-service AS_ALL_LINES
  realm 1 3CXPhoneSystem
  username 10000 password nZyDD8t5QR

location-service LS_10000
  domain 1 192.168.0.40
 
  identity-group default
    authentication outbound
      authenticate 1 authentication-service AS_ALL_LINES username 10000
 
  identity 10000
    authentication outbound
      authenticate 1 authentication-service AS_ALL_LINES

    registration outbound
      registrar 192.168.0.40 5060
      lifetime 300
      register auto

      register auto
      
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_10000
  no shutdown

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

port bri 0 0
  clock auto
  encapsulation q921

  q921
    
        protocol pp
    
    uni-side auto
    encapsulation q931

    q931
      protocol dss1
      uni-side user
      bchan-number-order ascending
      encapsulation cc-isdn
      bind interface IF_ISDN_0 switch

port bri 0 0
  no shutdown

port bri 0 1
  clock auto
  encapsulation q921

  q921
    
        protocol pp
    
    uni-side auto
    encapsulation q931

    q931
      protocol dss1
      uni-side user
      bchan-number-order ascending
      encapsulation cc-isdn
      bind interface IF_ISDN_1 switch
      
port bri 0 1
  no shutdown


port bri 0 2
  clock auto
  encapsulation q921

  q921
    
        protocol pp
    
    uni-side auto
    encapsulation q931

    q931
      protocol dss1
      uni-side user
      bchan-number-order ascending
      encapsulation cc-isdn
      bind interface IF_ISDN_2 switch
      
port bri 0 2
  no shutdown

      
port bri 0 3
  clock auto
  encapsulation q921

  q921
    
        protocol pp
    
    uni-side auto
    encapsulation q931

    q931
      protocol dss1
      uni-side user
      bchan-number-order ascending
      encapsulation cc-isdn
      bind interface IF_ISDN_3 switch
    
port bri 0 3
  no shutdown
      
port bri 0 4
  clock auto
  encapsulation q921

  q921
    
        protocol pp
    
    uni-side auto
    encapsulation q931

    q931
      protocol dss1
      uni-side user
      bchan-number-order ascending
      encapsulation cc-isdn
      bind interface IF_ISDN_4 switch
      
port bri 0 4
  no shutdown

      
port bri 0 5
  clock auto
  encapsulation q921

  q921
    
        protocol pp
    
    uni-side auto
    encapsulation q931

    q931
      protocol dss1
      uni-side user
      bchan-number-order ascending
      encapsulation cc-isdn
      bind interface IF_ISDN_5 switch
      
port bri 0 5
  no shutdown

      
port bri 0 6
  clock auto
  encapsulation q921

  q921
    
        protocol pp
    
    uni-side auto
    encapsulation q931

    q931
      protocol dss1
      uni-side user
      bchan-number-order ascending
      encapsulation cc-isdn
      bind interface IF_ISDN_6 switch
      
port bri 0 6
  no shutdown

      
port bri 0 7
  clock auto
  encapsulation q921

  q921
    
        protocol pp
    
    uni-side auto
    encapsulation q931

    q931
      protocol dss1
      uni-side user
      bchan-number-order ascending
      encapsulation cc-isdn
      bind interface IF_ISDN_7 switch

port bri 0 7
  no shutdown
 
local incoming call have double zero

Could you explain what you mean here, I guess you mean local area numbers and not internal calls ? where are you/the smartnode based ?

Do the calls actually traverse the smartnode ? can you run the below commands from the CLI and show the output:

https://www.3cx.com/docs/patton-isdn-debugging/

enable
show running‐config
debug call‐router
debug call‐control
debug ccisdn signaling
debug context sip‐gateway signaling detail 5
debug context sip‐gateway transport detail 5
debug context sip‐gateway error

Have you contacted Patton support also ? if so what did they say ?
 
hello, thanks for reply, yes i mean "local area numbers, italy " not internal call. Yes the call correctly traverse smartnode, everything works perfectly except that calls are viewed and saved with the initial double zero instead only one

i try later with telnet and post results
 
OK well perhaps you could try using the regular expression settings, this can be done on the smartnode : https://www.patton.com/support/kb_art.asp?art=479&p=0

I would ask Patton support for assistance on the smartnode.

Or on 3CX https://www.3cx.com/docs/cid-reformatting/

This forum post covers how to do it on 3CX (post covers stripping +1):
https://www.3cx.com/community/threads/strip-1-from-inbound-caller-id-number.55188/

If this looks like something that will not work for you feel free to take a trace and PM it to me (not post) if it contains any sensitive information (this is a public forum after all).
 
Status
Not open for further replies.

Forum statistics

Threads
111,933
Messages
589,812
Members
164,808
Latest member
jsbjsb