[asterisk-r2] Asterisk r2 interconnection against telco

José Seabra joseseabra4 at gmail.com
Wed Feb 19 10:53:05 CST 2014


Hi there, i have an issue with asterisk open r2 and Telco pbx , my asterisk
box uses a sangoma A108 with following configurations:

################################
span connected against telco:
#################################

#================================================
# Sangoma Technologies Inc.
#================================================

[devices]
wanpipe4 = WAN_AFT_TE1, Comment

[interfaces]
w4g1 = wanpipe4, , TDM_VOICE, Comment

[wanpipe4]
CARD_TYPE = AFT
S514CPU = A
CommPort = PRI
AUTO_PCISLOT = NO
PCISLOT = 4
PCIBUS   = 2
FE_MEDIA = E1
FE_LCODE = HDB3
FE_FRAME = NCRC4
FE_LINE = 4
TE_CLOCK = NORMAL
TE_REF_CLOCK    = 0
TE_SIG_MODE     = CAS
TE_HIGHIMPEDANCE = NO
TE_RX_SLEVEL    = 430
HW_RJ45_PORT_MAP = DEFAULT
LBO = 120OH
FE_TXTRISTATE = NO
MTU = 1500
UDPPORT = 9000
TTL = 255
IGNORE_FRONT_END = NO
TDMV_SPAN = 4
TDMV_DCHAN = 16
TE_AIS_MAINTENANCE = NO         #NO: defualt  YES: Start port in AIS Blue
Alarm and keep line down
                                #wanpipemon -i w1g1 -c Ttx_ais_off to
disable AIS maintenance mode
#wanpipemon -i w1g1 -c Ttx_ais_on to enable AIS maintenance mode
TDMV_HW_DTMF = NO # YES: receive dtmf events from hardware
TDMV_HW_FAX_DETECT = NO # YES: receive fax 1100hz events from hardware
HWEC_OPERATION_MODE     = OCT_NORMAL    # OCT_NORMAL: echo cancelation
enabled with nlp (default)
# OCT_SPEECH: improves software tone detection by disabling NLP (echo
possible)
# OCT_NO_ECHO:disables echo cancelation but allows VQE/tone functions.
HWEC_DTMF_REMOVAL       = NO    # NO: default  YES: remove dtmf out of
incoming media (must have hwdtmf enabled)
HWEC_NOISE_REDUCTION    = NO    # NO: default  YES: reduces noise on the
line - could break fax
HWEC_ACUSTIC_ECHO       = NO    # NO: default  YES: enables acustic echo
cancelation
HWEC_NLP_DISABLE        = NO    # NO: default  YES: guarantees software
tone detection (possible echo)
HWEC_TX_AUTO_GAIN       = 0     # 0: disable   -40-0: default tx audio
level to be maintained (-20 default)
HWEC_RX_AUTO_GAIN       = 0     # 0: disable   -40-0: default tx audio
level to be maintained (-20 default)
HWEC_TX_GAIN            = 0 # 0: disable   -24-24: db values to be applied
to tx signal
HWEC_RX_GAIN            = 0 # 0: disable   -24-24: db values to be applied
to tx signal

[w4g1]
ACTIVE_CH = ALL
TDMV_HWEC = YES
MTU = 8


#########################
Dahdi/system.conf
#########################
span=4,0,0,cas,hdb3
cas=94-108,110-114:1101
hardhdlc=109


#############################
Asterisk configurations
############################
group=1
context=from-pstn
signalling=mfcr2
mfcr2_variant=itu
mfcr2_get_ani_first=yes

mfcr2_max_ani=10
mfcr2_max_dnis=20
mfcr2_immediate_accept=no
mfcr2_category=national_subscriber
mfcr2_call_files=yes
mfcr2_logdir=span4
mfcr2_logging=all
loglevel=error,warning,debug,notice,cas,mf
mfcr2_mfback_timeout=6000
mfcr2_metering_pulse_timeout=150000
;mfcr2_advanced_protocol_file=/etc/asterisk/r2proto.conf
channel =>94-108,110-114


##############################################

Asterisk Call Log from ANI=3564 to DNIS=2320

##############################################

-- Executing [s at macro-dialout-trunk:30] Dial("Local/2320 at outrt-34-4652;2",
"DAHDI/g1/2320,300,") in new stack
[Feb 19 16:45:41] DEBUG[7937]: chan_dahdi.c:4120 dahdi_r2_write_log: Chan
94 - Requested to make call (ANI=3564, DNIS=2320, category=National
Subscriber)
[Feb 19 16:45:41] DEBUG[7937]: chan_dahdi.c:4120 dahdi_r2_write_log: Chan
94 - Call started at Wed Feb 19 16:45:41 2014 on chan 94 [openr2 version
1.3.3, revision (release)]
[Feb 19 16:45:41] DEBUG[7937]: chan_dahdi.c:4120 dahdi_r2_write_log: Chan
94 - Outgoing call proceeding: ANI=3564, DNIS=2320, Category=National
Subscriber
[Feb 19 16:45:41] DEBUG[7937]: chan_dahdi.c:4120 dahdi_r2_write_log: Chan
94 - CAS Tx >> [SEIZE] 0x00
[Feb 19 16:45:41] DEBUG[7937]: chan_dahdi.c:4120 dahdi_r2_write_log: Chan
94 - CAS Raw Tx >> 0x01
    -- Called DAHDI/g1/2320
[Feb 19 16:45:41] DEBUG[7937]: chan_dahdi.c:7931 dahdi_handle_event: bits
changed in chan 94
[Feb 19 16:45:41] DEBUG[7937]: chan_dahdi.c:4120 dahdi_r2_write_log: Chan
94 - Bits changed from 0x08 to 0x0C
[Feb 19 16:45:41] DEBUG[7937]: chan_dahdi.c:4120 dahdi_r2_write_log: Chan
94 - CAS Persistence check is enabled, waiting 500 ms
    -- Remote UNIX connection
    -- Remote UNIX connection disconnected
[Feb 19 16:45:42] DEBUG[7937]: chan_dahdi.c:4120 dahdi_r2_write_log: Chan
94 - calling timer 4 (cas_persistence_check) callback
[Feb 19 16:45:42] DEBUG[7937]: chan_dahdi.c:4120 dahdi_r2_write_log: Chan
94 - CAS signal 0x0C has persisted, handling ...
Chan 94 - Handling persistent pattern 0x0c
[Feb 19 16:45:42] DEBUG[7937]: chan_dahdi.c:4120 dahdi_r2_write_log: Chan
94 - CAS Rx << [SEIZE ACK] 0x0C
[Feb 19 16:45:42] DEBUG[7937]: chan_dahdi.c:4120 dahdi_r2_write_log: Chan
94 - MFC/R2 call acknowledge!
[Feb 19 16:45:42] DEBUG[7937]: chan_dahdi.c:4120 dahdi_r2_write_log: Chan
94 - Sending DNIS digit 2
[Feb 19 16:45:42] DEBUG[7937]: chan_dahdi.c:4120 dahdi_r2_write_log: Chan
94 - MF Tx >> 2 [ON]
[Feb 19 16:45:42] DEBUG[7937]: chan_dahdi.c:4120 dahdi_r2_write_log: Chan
94 - MF Rx << 1 [ON]
[Feb 19 16:45:42] DEBUG[7937]: chan_dahdi.c:4120 dahdi_r2_write_log: Chan
94 - MF Tx >> 2 [OFF]
[Feb 19 16:45:42] DEBUG[7937]: chan_dahdi.c:4120 dahdi_r2_write_log: Chan
94 - MF Rx << 1 [OFF]
[Feb 19 16:45:42] DEBUG[7937]: chan_dahdi.c:4120 dahdi_r2_write_log: Chan
94 - Sending DNIS digit 3
[Feb 19 16:45:42] DEBUG[7937]: chan_dahdi.c:4120 dahdi_r2_write_log: Chan
94 - MF Tx >> 3 [ON]
[Feb 19 16:45:42] DEBUG[7937]: chan_dahdi.c:4120 dahdi_r2_write_log: Chan
94 - Group A DNIS request handled
[Feb 19 16:45:42] DEBUG[7937]: chan_dahdi.c:4120 dahdi_r2_write_log: Chan
94 - MF Rx << 5 [ON]
[Feb 19 16:45:42] DEBUG[7937]: chan_dahdi.c:4120 dahdi_r2_write_log: Chan
94 - MF Tx >> 3 [OFF]
[Feb 19 16:45:42] DEBUG[7937]: chan_dahdi.c:4120 dahdi_r2_write_log: Chan
94 - MF Rx << 5 [OFF]
[Feb 19 16:45:42] DEBUG[7937]: chan_dahdi.c:4120 dahdi_r2_write_log: Chan
94 - Sending category National Subscriber
[Feb 19 16:45:42] DEBUG[7937]: chan_dahdi.c:4120 dahdi_r2_write_log: Chan
94 - MF Tx >> 1 [ON]
[Feb 19 16:45:43] DEBUG[7937]: chan_dahdi.c:4120 dahdi_r2_write_log: Chan
94 - MF Rx << 9 [ON]
[Feb 19 16:45:43] DEBUG[7937]: chan_dahdi.c:4120 dahdi_r2_write_log: Chan
94 - MF Tx >> 1 [OFF]
[Feb 19 16:45:43] DEBUG[7937]: chan_dahdi.c:4120 dahdi_r2_write_log: Chan
94 - MF Rx << 9 [OFF]
[Feb 19 16:45:43] ERROR[7937]: chan_dahdi.c:4113 dahdi_r2_write_log: Chan
94 - Protocol error. Reason = Invalid Multi Frequency Tone, R2 State =
Seize ACK Received, MF state = Category Transmitted, MF Group = Forward
Group I, CAS = 0x0C
DNIS = 2320, ANI = 3564, MF = 0x39
[Feb 19 16:45:43] DEBUG[7937]: chan_dahdi.c:4120 dahdi_r2_write_log: Chan
94 - CAS Tx >> [IDLE] 0x08
[Feb 19 16:45:43] DEBUG[7937]: chan_dahdi.c:4120 dahdi_r2_write_log: Chan
94 - CAS Raw Tx >> 0x09
[Feb 19 16:45:43] ERROR[7937]: chan_dahdi.c:3898
dahdi_r2_on_protocol_error: MFC/R2 protocol error on chan 94: Invalid Multi
Frequency Tone
    -- Hungup 'DAHDI/94-1'
  == Everyone is busy/congested at this time (1:0/0/1)
    -- Executing [s at macro-dialout-trunk:31] NoOp("Local/2320 at outrt-34-4652;2",
"Dial failed for some reason with DIALSTATUS = CHANUNAVAIL and HANGUPCAUSE
= 111") in new stack
    -- Executing [s at macro-dialout-trunk:32] Goto("Local/2320 at outrt-34-4652;2",
"s-CHANUNAVAIL,1") in new stack
    -- Goto (macro-dialout-trunk,s-CHANUNAVAIL,1)
    -- Executing [s-CHANUNAVAIL at macro-dialout-trunk:1]
Set("Local/2320 at outrt-34-4652;2", "RC=111") in new stack
    -- Executing [s-CHANUNAVAIL at macro-dialout-trunk:2]
Goto("Local/2320 at outrt-34-4652;2", "111,1") in new stack
    -- Goto (macro-dialout-trunk,111,1)
    -- Executing [111 at macro-dialout-trunk:1] Goto("Local/2320 at outrt-34-4652;2",
"continue,1") in new stack
    -- Goto (macro-dialout-trunk,continue,1)
    -- Executing [continue at macro-dialout-trunk:1]
GotoIf("Local/2320 at outrt-34-4652;2", "1?noreport") in new stack
    -- Goto (macro-dialout-trunk,continue,3)
    -- Executing [continue at macro-dialout-trunk:3]
NoOp("Local/2320 at outrt-34-4652;2", "TRUNK Dial failed due to CHANUNAVAIL
HANGUPCAUSE: 111 - failing through to other trunks") in new stack
    -- Executing [continue at macro-dialout-trunk:4]
ExecIf("Local/2320 at outrt-34-4652;2", "0?Set(CALLERID(number)=)") in new
stack
    -- Executing [2320 at outrt-34:7] Macro("Local/2320 at outrt-34-4652;2",
"outisbusy,") in new stack
    -- Executing [s at macro-outisbusy:1] PlayTones("Local/2320 at outrt-34-4652;2",
"congestion") in new stack
    -- Executing [s at macro-outisbusy:2] Congestion("Local/2320 at outrt-34-4652;2",
"5") in new stack
[Feb 19 16:45:43] DEBUG[7613]: chan_dahdi.c:4120 dahdi_r2_write_log: Chan
94 - Bits changed from 0x0C to 0x08
[Feb 19 16:45:43] DEBUG[7613]: chan_dahdi.c:4120 dahdi_r2_write_log: Chan
94 - CAS Persistence check is enabled, waiting 500 ms
[Feb 19 16:45:43] DEBUG[7613]: chan_dahdi.c:4120 dahdi_r2_write_log: Chan
94 - calling timer 2 (cas_persistence_check) callback
[Feb 19 16:45:43] DEBUG[7613]: chan_dahdi.c:4120 dahdi_r2_write_log: Chan
94 - CAS signal 0x08 has persisted, handling ...
Chan 94 - Handling persistent pattern 0x08
[Feb 19 16:45:43] DEBUG[7613]: chan_dahdi.c:4120 dahdi_r2_write_log: Chan
94 - CAS Rx << [IDLE] 0x08
[Feb 19 16:45:43] NOTICE[7613]: chan_dahdi.c:4144 dahdi_r2_on_line_idle:
Far end unblocked on chan 94


#####################################################
mfcr2 log file:
Call started at Wed Feb 19 09:57:52 2014 on chan 94 [openr2 version 1.3.3,
revision (release)]
[09:57:52:327] [Thread: 140319757260544] [Chan 94] - Outgoing call
proceeding: ANI=3564, DNIS=2320, Category=National Subscriber
[09:57:52:327] [Thread: 140319757260544] [Chan 94] - CAS Tx >> [SEIZE] 0x00
[09:57:52:327] [Thread: 140319757260544] [Chan 94] - CAS Raw Tx >> 0x01
[09:57:52:327] [Thread: 140319757260544] [Chan 94] - scheduled timer id 2
(r2_seize)
[09:57:52:452] [Thread: 140319757260544] [Chan 94] - Bits changed from 0x08
to 0x0C
[09:57:52:452] [Thread: 140319757260544] [Chan 94] - CAS Rx << [SEIZE ACK]
0x0C
[09:57:52:452] [Thread: 140319757260544] [Chan 94] - Attempting to cancel
timer timer 2
[09:57:52:452] [Thread: 140319757260544] [Chan 94] - timer id 2 found,
cancelling it now
[09:57:52:452] [Thread: 140319757260544] [Chan 94] - MFC/R2 call
acknowledge!
[09:57:52:452] [Thread: 140319757260544] [Chan 94] - Sending DNIS digit 2
[09:57:52:453] [Thread: 140319757260544] [Chan 94] - MF Tx >> 2 [ON]
[09:57:52:747] [Thread: 140319757260544] [Chan 94] - MF Rx << 1 [ON]
[09:57:52:747] [Thread: 140319757260544] [Chan 94] - Attempting to cancel
timer timer 0
[09:57:52:747] [Thread: 140319757260544] [Chan 94] - Cannot cancel timer 0
[09:57:52:747] [Thread: 140319757260544] [Chan 94] - MF Tx >> 2 [OFF]
[09:57:52:847] [Thread: 140319757260544] [Chan 94] - MF Rx << 1 [OFF]
[09:57:52:847] [Thread: 140319757260544] [Chan 94] - Sending DNIS digit 3
[09:57:52:847] [Thread: 140319757260544] [Chan 94] - MF Tx >> 3 [ON]
[09:57:52:847] [Thread: 140319757260544] [Chan 94] - Group A DNIS request
handled
[09:57:53:147] [Thread: 140319757260544] [Chan 94] - MF Rx << 5 [ON]
[09:57:53:147] [Thread: 140319757260544] [Chan 94] - Attempting to cancel
timer timer 0
[09:57:53:147] [Thread: 140319757260544] [Chan 94] - Cannot cancel timer 0
[09:57:53:147] [Thread: 140319757260544] [Chan 94] - MF Tx >> 3 [OFF]
[09:57:53:267] [Thread: 140319757260544] [Chan 94] - MF Rx << 5 [OFF]
[09:57:53:267] [Thread: 140319757260544] [Chan 94] - Sending category
National Subscriber
[09:57:53:267] [Thread: 140319757260544] [Chan 94] - MF Tx >> 1 [ON]
[09:57:53:607] [Thread: 140319757260544] [Chan 94] - MF Rx << 9 [ON]
[09:57:53:607] [Thread: 140319757260544] [Chan 94] - Attempting to cancel
timer timer 0
[09:57:53:607] [Thread: 140319757260544] [Chan 94] - Cannot cancel timer 0
[09:57:53:607] [Thread: 140319757260544] [Chan 94] - MF Tx >> 1 [OFF]
[09:57:53:727] [Thread: 140319757260544] [Chan 94] - MF Rx << 9 [OFF]
[09:57:53:727] [Thread: 140319757260544] [Chan 94] - Protocol error. Reason
= Invalid Multi Frequency Tone, R2 State = Seize ACK Received, MF state =
Category Transmitted, MF Group = Forward Group I, CAS = 0x0C
DNIS = 2320, ANI = 3564, MF = 0x39
[09:57:53:727] [Thread: 140319757260544] [Chan 94] - Attempting to cancel
timer timer 0
[09:57:53:727] [Thread: 140319757260544] [Chan 94] - Cannot cancel timer 0
################################################################

Anyone can help me find out the root cause of the issue, our telco says
that Variant is ITU, the same that i have configured on asterisk.

-- 
Cumprimentos
José Seabra
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-r2/attachments/20140219/f2a72aa2/attachment-0001.html>


More information about the asterisk-r2 mailing list