Outbound CallerID with Patton 4960 working config

Discussion in '3CX Phone System - General' started by coolcat96, May 29, 2012.

Thread Status:
Not open for further replies.
  1. coolcat96

    Joined:
    May 29, 2012
    Messages:
    1
    Likes Received:
    0
    If you are having a problem sending outbound caller-id over a T1 PRI you need to route calls going out differently.

    Standard config with a Patton 4960

    #----------------------------------------------------------------#
    # #
    # SN4940/1E24V #
    # R5.T 2011-01-17 H323 RBS SIP #
    # 2012-04-25T18:50:15 #
    # SN/00A0BA06CF7F #
    # Generated configuration file #
    # #
    #----------------------------------------------------------------#

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

    system

    ic voice 0
    pcm law-select uLaw

    system
    clock-source 1 e1t1 0 0

    profile r2 default

    profile ppp default

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

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

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

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

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

    profile tone-set default

    profile voip default
    codec 1 g711ulaw64k rx-length 20 tx-length 20
    codec 2 g711alaw64k rx-length 20 tx-length 20
    rtp traffic-class local-default
    dejitter-mode static-data
    dejitter-max-delay 30
    fax transmission 1 bypass g711ulaw64k

    profile pstn default

    profile sip default
    no autonomous-transitioning

    profile aaa default
    method 1 local
    method 2 none

    context ip router

    interface IF_IP_LAN
    ipaddress 172.21.0.254 255.255.252.0
    tcp adjust-mss rx mtu
    tcp adjust-mss tx mtu

    context ip router
    route 0.0.0.0 0.0.0.0 172.21.0.1 2

    context cs switch

    routing-table called-e164 RT_ISDN_TO_SIP_0
    route default dest-interface IF_SIP_0 MAPPING_INCOMING_CALLS

    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 (.%)-(.%)-(.%)-(.%)-(.%) to \1\2\3\4\5
    map (.%)-(.%)-(.%)-(.%) to \1\2\3\4
    map (.%)-(.%)-(.%) to \1\2\3
    map (.%)-(.%) to \1\2

    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
    execute 3 MAP_CID_TO_CNAME

    interface isdn IF_ISDN_0
    route call dest-table RT_ISDN_TO_SIP_0
    caller-name
    user-side-ringback-tone

    interface sip IF_SIP_0
    bind context sip-gateway GW_SIP_0
    route call dest-interface IF_ISDN_0
    remote 172.21.1.1 5060
    early-connect
    early-disconnect
    address-translation outgoing-call request-uri user-part fix 10000 host-part to-header target-param none

    context cs switch
    no shutdown

    authentication-service AS_ALL_LINES
    realm 1 3CXPhoneSystem
    username 10000 password A5ICoOdB/ZCMGfO1otfZEA== encrypted

    location-service LS_10000
    domain 1 172.21.1.1

    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 172.21.1.1 5060
    lifetime 300
    register auto

    context sip-gateway GW_SIP_0

    interface LAN
    bind interface IF_IP_LAN context router port 5060

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

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

    port e1t1 0 0
    port-type t1
    clock auto
    linecode b8zs
    framing esf
    encapsulation q921

    q921
    uni-side auto
    encapsulation q931

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

    port e1t1 0 0
    no shutdown

    What you need to do is to create a routing table and two mapping-tables. You also need a complex function.

    routing-table called-e164 SIP_TO_ISDN
    route .% dest-interface IF_ISDN_0 ChangCallerID

    mapping-table calling-type-of-number to calling-type-of-number MAP-SET-National
    map unknown to national

    mapping-table calling-numbering-plan to calling-numbering-plan MAP-SET-Numbering
    map unknown to isdn-telephony

    Now your complex function.

    complex-function ChangCallerID
    execute 1 MAP-SET-National
    execute 2 MAP-SET-Numbering


    The trick is to route outgoing calls on the SIP interface.

    interface sip IF_SIP_0

    route call dest-table SIP_TO_ISDN

    I hope this helps.

    Working Config.

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

    system

    ic voice 0
    pcm law-select uLaw

    system
    clock-source 1 e1t1 0 0

    profile r2 default

    profile ppp default

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

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

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

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

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

    profile tone-set default

    profile voip default
    codec 1 g711ulaw64k rx-length 20 tx-length 20
    codec 2 g711alaw64k rx-length 20 tx-length 20
    rtp traffic-class local-default
    dejitter-mode static-data
    dejitter-max-delay 30
    fax transmission 1 bypass g711ulaw64k rx-length 10 tx-length 10

    profile pstn default

    profile sip default
    no autonomous-transitioning

    profile aaa default
    method 1 local
    method 2 none

    context ip router

    interface IF_IP_LAN
    ipaddress 172.21.0.254 255.255.252.0
    tcp adjust-mss rx mtu
    tcp adjust-mss tx mtu

    context ip router
    route 0.0.0.0 0.0.0.0 172.21.0.1 2

    context cs switch

    routing-table called-e164 RT_ISDN_TO_SIP_0
    route default dest-interface IF_SIP_0 MAPPING_INCOMING_CALLS

    routing-table called-e164 SIP_TO_ISDN
    route .% dest-interface IF_ISDN_0 ChangCallerID

    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 (.%)-(.%)-(.%)-(.%)-(.%) to \1\2\3\4\5
    map (.%)-(.%)-(.%)-(.%) to \1\2\3\4
    map (.%)-(.%)-(.%) to \1\2\3
    map (.%)-(.%) to \1\2

    mapping-table calling-e164 to calling-name MAP_CID_TO_CNAME
    map (.%) to \1

    mapping-table calling-type-of-number to calling-type-of-number MAP-SET-National
    map unknown to national

    mapping-table calling-numbering-plan to calling-numbering-plan MAP-SET-Numbering
    map unknown to isdn-telephony

    complex-function MAPPING_INCOMING_CALLS
    execute 1 MAP_REMOVE_BLANK_CALLERID
    execute 2 MAP_LEADING_ZERO
    execute 3 MAP_CID_TO_CNAME

    complex-function ChangCallerID
    execute 1 MAP-SET-National
    execute 2 MAP-SET-Numbering

    interface isdn IF_ISDN_0
    route call dest-table RT_ISDN_TO_SIP_0
    caller-name
    user-side-ringback-tone

    interface sip IF_SIP_0
    bind context sip-gateway GW_SIP_0
    route call dest-table SIP_TO_ISDN
    remote 172.21.1.1 5060
    early-connect
    early-disconnect
    address-translation outgoing-call request-uri user-part fix 10000 host-part to-he
    ader target-param none

    context cs switch
    no shutdown

    authentication-service AS_ALL_LINES
    realm 1 3CXPhoneSystem
    username 10000 password A5ICoOdB/ZCMtGO1otfZEA== encrypted

    location-service LS_10000
    domain 1 172.21.1.1

    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 172.21.1.1 5060
    lifetime 300
    register auto

    context sip-gateway GW_SIP_0

    interface LAN
    bind interface IF_IP_LAN context router port 5060

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

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

    port e1t1 0 0
    port-type t1
    clock auto
    linecode b8zs
    framing esf
    encapsulation q921

    q921
    uni-side auto
    encapsulation q931

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

    port e1t1 0 0
    no shutdown
     
  2. EuclidTech

    Joined:
    Apr 28, 2011
    Messages:
    6
    Likes Received:
    0
    Interesting. I assume this is a fix for the default template if CallerID is not working at all. I have a 4960 and a Paetec T1 with an interesting long standing problem. CallerID works for every place I've tried except local AT&T Wireless (Cleveland, OH). I tried calling various POTS lines and other cellular providers, all seemed to work fine. If I recall properly AT&T claimed their equipment was responsible but didn't explain why. I just recieve "Unknown Caller". I'd like to make this work as it is one of the most popular carriers and of course my carrier too! ;) Any ideas or potential fixes?
     
Thread Status:
Not open for further replies.