Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Definity G3 and Asterisk via PRI 2

Status
Not open for further replies.

mkeensvc

IS-IT--Management
Mar 31, 2015
17
US
Hi all,

I'm revisiting this project after getting a great deal of help from this forum last year but not quite getting it fully functional. I've got a Definity G3 V12 with a TN464 board and an Asterisk box with a PhonicEQ E100P card. I have successfully built a DS1 circuit directly connecting the two as an E1. At this point I can successfully make calls from the Definity to extensions on the Asterisk system. I cannot, however, manage to make calls from Asterisk to Definity. For what it's worth, the "list trace tac" command on Definity shows no activity when trying to call in from Asterisk, so it seems that the issue resides on the asterisk side. The error log suggests that it may be due to the extension, but we've tried prepending the extension with the full number which still failed with the same error (cause 88). Below are the relevant conf files from Asterisk and log files for both outbound (Asterisk -> Definity Failure) and incoming (Definity -> Asterisk Success) calls.

Michael Keen
Southern Vermont College

chan_dahdi.conf
Code:
[trunkgroups]
trunkgroup=>1,16
spanmap => 1,1,1

[channels]
usecallerid=yes
inbanddisconnect=yes
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
canpark=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=yes
rxgain=0.0
txgain=0.0
group=0,16
context=internal
switchtype=national
signalling=pri_cpe
channel => 1-15, 17-31
callgroup=1
pickupgroup=1

immediate=no
callerid = asreceived
busydetect=yes
busycount=6
callprogress=yes
progzone=us
tonezone = 0 
ringtimeout=8000
pridialplan=national
prilocaldialplan=national

extensions.conf

Code:
[general]
static=yes
writeprotect=no
autofallthrough=yes
clearglobalvars=no

[global]
TRUNK=DAHDI/i1  ;Trunk Interface

[default]
include => definity
include => internal

[internal]
exten => _27xx, 1, Dial(SIP/${EXTEN})

exten => _72xx,1, Dial(SIP/${EXTEN})
exten => _72xx,n, Hangup()

[definity]
exten => _28xx, 1, Dial(DAHDI/g1/${EXTEN})

system.conf

Code:
# Autogenerated by /usr/sbin/dahdi_genconf on Tue May 31 16:14:10 2016
# If you edit this file and execute /usr/sbin/dahdi_genconf again,
# your manual changes will be LOST.
# Dahdi Configuration File
#
# This file is parsed by the Dahdi Configurator, dahdi_cfg
#
# Span 1: WCE1/0 "PhonicEQ Inc. E100P RAVEN E1/PRA Card 0" (MASTER) CCS/HDB3/CRC4 ClockSource 

span=1,1,0,ccs,hdb3,crc4
bchan=1-15
dchan=16
bchan=17-31
defaultzone=us

Outgoing log showing failure

Code:
Asterisk 13.9.1, Copyright (C) 1999 - 2014, Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 13.9.1 currently running on asterisk (pid = 6046)
asterisk*CLI> pri set debug on span 1
Enabled debugging on span 1
  == Using SIP RTP CoS mark 5
    -- Executing [2848@default:1] Dial("SIP/7201-00000002", "DAHDI/1/2848") in new stack
PRI Span: 1 -- Making new call for cref 32771
    -- Requested transfer capability: 0x00 - SPEECH
PRI Span: 1
PRI Span: 1 > DL-DATA request
PRI Span: 1 > Protocol Discriminator: Q.931 (8)  len=44
PRI Span: 1 > TEI=0 Call Ref: len= 2 (reference 3/0x3) (Sent from originator)
PRI Span: 1 > Message Type: SETUP (5)
PRI Span: 1 TEI=0 Transmitting N(S)=2, window is open V(A)=2 K=7
PRI Span: 1
PRI Span: 1 > Protocol Discriminator: Q.931 (8)  len=44
PRI Span: 1 > TEI=0 Call Ref: len= 2 (reference 3/0x3) (Sent from originator)
PRI Span: 1 > Message Type: SETUP (5)
PRI Span: 1 > [04 03 80 90 a3]
PRI Span: 1 > Bearer Capability (len= 5) [ Ext: 1  Coding-Std: 0  Info transfer capability: Speech (0)
PRI Span: 1 >                              Ext: 1  Trans mode/rate: 64kbps, circuit-mode (16)
PRI Span: 1 >                                User information layer 1: A-Law (35)
PRI Span: 1 > [18 04 e1 81 83 81]
PRI Span: 1 > Channel ID (len= 6) [ Ext: 1  IntID: Explicit  Other(PRI)  Spare: 0  Preferred  Dchan: 0
PRI Span: 1 >                       ChanSel: As indicated in following octets
PRI Span: 1 >                       Ext: 1  DS1 Identifier: 1
PRI Span: 1 >                       Ext: 1  Coding: 0  Number Specified  Channel Type: 3
PRI Span: 1 >                       Ext: 1  Channel: 1 Type: CPE]
PRI Span: 1 > [1e 02 80 83]
PRI Span: 1 > Progress Indicator (len= 4) [ Ext: 1  Coding: CCITT (ITU) standard (0)  0: 0  Location: User (0)
PRI Span: 1 >                               Ext: 1  Progress Description: Calling equipment is non-ISDN. (3) ]
PRI Span: 1 > [28 07 b1 4e 6f 62 6f 64 79]
PRI Span: 1 > Display (len= 7) Charset: 31 [ Nobody ]
PRI Span: 1 > [6c 06 21 80 37 32 30 31]
PRI Span: 1 > Calling Party Number (len= 8) [ Ext: 0  TON: National Number (2)  NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1)
PRI Span: 1 >                                 Presentation: Presentation allowed, User-provided, not screened (0)  '7201' ]
PRI Span: 1 > [70 05 80 32 38 34 38]
PRI Span: 1 > Called Party Number (len= 7) [ Ext: 1  TON: Unknown Number Type (0)  NPI: Unknown Number Plan (0)  '2848' ]
PRI Span: 1 q931.c:6458 q931_setup: Call 32771 enters state 1 (Call Initiated).  Hold state: Idle
    -- Called DAHDI/1/2848
PRI Span: 1
PRI Span: 1 < Protocol Discriminator: Q.931 (8)  len=9
PRI Span: 1 < TEI=0 Call Ref: len= 2 (reference 3/0x3) (Sent to originator)
PRI Span: 1 < Message Type: RELEASE COMPLETE (90)
PRI Span: 1 < [08 02 81 d8]
PRI Span: 1 < Cause (len= 4) [ Ext: 1  Coding: CCITT (ITU) standard (0)  Spare: 0  Location: Private network serving the local user (1)
PRI Span: 1 <                  Ext: 1  Cause: Incompatible destination (88), class = Invalid message (e.g. parameter out of range) (5) ]
PRI Span: 1 Received message for call 0x7f936c006870 on link 0x26e6fa0 TEI/SAPI 0/0
PRI Span: 1 -- Processing IE 8 (cs0, Cause)
PRI Span: 1 q931.c:9131 post_handle_q931_message: Call 32771 enters state 0 (Null).  Hold state: Idle
Span 1: Processing event PRI_EVENT_HANGUP(6)
    -- Span 1: Channel 1/1 got hangup, cause 88
PRI Span: 1 q931.c:7259 q931_hangup: Hangup other cref:32771
PRI Span: 1 q931.c:7016 __q931_hangup: ourstate Null, peerstate Null, hold-state Idle
PRI Span: 1 Destroying call 0x7f936c006870, ourstate Null, peerstate Null, hold-state Idle
    -- Hungup 'DAHDI/i1/2848-3'
  == Everyone is busy/congested at this time (1:0/0/1)
    -- Auto fallthrough, channel 'SIP/7201-00000002' status is 'CHANUNAVAIL'
asterisk*CLI>

Incoming log showing success
Code:
PRI Span: 1
PRI Span: 1 < Protocol Discriminator: Q.931 (8)  len=71
PRI Span: 1 < TEI=0 Call Ref: len= 2 (reference 20734/0x50FE) (Sent from originator)
PRI Span: 1 < Message Type: SETUP (5)
PRI Span: 1 < [04 03 90 90 a2]
PRI Span: 1 < Bearer Capability (len= 5) [ Ext: 1  Coding-Std: 0  Info transfer capability: 3.1kHz audio (16)
PRI Span: 1 <                              Ext: 1  Trans mode/rate: 64kbps, circuit-mode (16)
PRI Span: 1 <                                User information layer 1: u-Law (34)
PRI Span: 1 < [18 03 a1 83 9f]
PRI Span: 1 < Channel ID (len= 5) [ Ext: 1  IntID: Implicit  Other(PRI)  Spare: 0  Preferred  Dchan: 0
PRI Span: 1 <                       ChanSel: As indicated in following octets
PRI Span: 1 <                       Ext: 1  Coding: 0  Number Specified  Channel Type: 3
PRI Span: 1 <                       Ext: 1  Channel: 31 Type: CPE]
PRI Span: 1 < [1c 1e 9f 8b 01 00 a1 18 02 02 0c ff 02 01 00 80 0f 4b 65 6c 6c 65 79 2c 20 4c 65 6f 6e 61 72 64]
PRI Span: 1 < Facility (len=32, codeset=0) [ 0x9F, 0x8B, 0x01, 0x00, 0xA1, 0x18, 0x02, 0x02, 0x0C, 0xFF, 0x02, 0x01, 0x00, 0x80, 0x0F, 'Test, Test' ]
PRI Span: 1 < [1e 02 81 83]
PRI Span: 1 < Progress Indicator (len= 4) [ Ext: 1  Coding: CCITT (ITU) standard (0)  0: 0  Location: Private network serving the local user (1)
PRI Span: 1 <                               Ext: 1  Progress Description: Calling equipment is non-ISDN. (3) ]
PRI Span: 1 < [6c 0b a1 38 30 32 36 38 31 32 38 38 34]
PRI Span: 1 < Calling Party Number (len=13) [ Ext: 1  TON: National Number (2)  NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1)
PRI Span: 1 <                                 Presentation: Presentation allowed, User-provided, not screened (0)  '8026812883' ]
PRI Span: 1 < [70 05 a1 37 32 30 31]
PRI Span: 1 < Called Party Number (len= 7) [ Ext: 1  TON: National Number (2)  NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1)  '7201' ]
PRI Span: 1 -- Making new call for cref 20734
PRI Span: 1 Received message for call 0x7f9380002830 on link 0x26e6fa0 TEI/SAPI 0/0
PRI Span: 1 -- Processing Q.931 Call Setup
PRI Span: 1 -- Processing IE 4 (cs0, Bearer Capability)
PRI Span: 1 -- Processing IE 24 (cs0, Channel ID)
PRI Span: 1 -- Processing IE 28 (cs0, Facility)
PRI Span: 1 -- Processing IE 30 (cs0, Progress Indicator)
PRI Span: 1 -- Processing IE 108 (cs0, Calling Party Number)
PRI Span: 1 -- Processing IE 112 (cs0, Called Party Number)
PRI Span: 1 -- Delayed processing IE 28 (cs0, Facility)
PRI Span: 1 ASN.1 dump
PRI Span: 1   Context Specific [11 0x0B] <8B> Len:1 <01>
PRI Span: 1     <00> - "~"
PRI Span: 1   Context Specific/C [1 0x01] <A1> Len:24 <18>
PRI Span: 1     Integer(2 0x02) <02> Len:2 <02>
PRI Span: 1       <0C FF> - "~~"
PRI Span: 1     Integer(2 0x02) <02> Len:1 <01>
PRI Span: 1       <00> - "~"
PRI Span: 1     Context Specific [0 0x00] <80> Len:15 <0F>
PRI Span: 1       <4B 65 6C 6C 65 79 2C 20-4C 65 6F 6E 61 72 64> - "Test, Test"
PRI Span: 1 ASN.1 end
PRI Span: 1   interpretation Context Specific [11 0x0B] = 0 0x0000
PRI Span: 1 INVOKE Component Context Specific/C [1 0x01]
PRI Span: 1   invokeId Integer(2 0x02) = 3327 0x0CFF
PRI Span: 1   operationValue Integer(2 0x02) = 0 0x0000
PRI Span: 1   operationValue = ROSE_QSIG_CallingName
PRI Span: 1   callingName Name
PRI Span: 1   namePresentationAllowedSimple Context Specific [0 0x00] =
PRI Span: 1     <4B 65 6C 6C 65 79 2C 20-4C 65 6F 6E 61 72 64> - "Test, Test"
PRI Span: 1 q931.c:8821 post_handle_q931_message: Call 20734 enters state 6 (Call Present).  Hold state: Idle
Span 1: Processing event PRI_EVENT_RING(5)
PRI Span: 1 q931.c:5808 q931_call_proceeding: Call 20734 enters state 9 (Incoming Call Proceeding).  Hold state: Idle
PRI Span: 1
PRI Span: 1 > DL-DATA request
PRI Span: 1 > Protocol Discriminator: Q.931 (8)  len=11
PRI Span: 1 > TEI=0 Call Ref: len= 2 (reference 20734/0x50FE) (Sent to originator)
PRI Span: 1 > Message Type: CALL PROCEEDING (2)
PRI Span: 1 TEI=0 Transmitting N(S)=3, window is open V(A)=3 K=7
PRI Span: 1
PRI Span: 1 > Protocol Discriminator: Q.931 (8)  len=11
PRI Span: 1 > TEI=0 Call Ref: len= 2 (reference 20734/0x50FE) (Sent to originator)
PRI Span: 1 > Message Type: CALL PROCEEDING (2)
PRI Span: 1 > [18 04 e9 81 83 9f]
PRI Span: 1 > Channel ID (len= 6) [ Ext: 1  IntID: Explicit  Other(PRI)  Spare: 0  Exclusive  Dchan: 0
PRI Span: 1 >                       ChanSel: As indicated in following octets
PRI Span: 1 >                       Ext: 1  DS1 Identifier: 1
PRI Span: 1 >                       Ext: 1  Coding: 0  Number Specified  Channel Type: 3
PRI Span: 1 >                       Ext: 1  Channel: 31 Type: CPE]
    -- Accepting call from '8026812883' to '7201' on channel 1/31, span 1
    -- Executing [7201@internal:1] Dial("DAHDI/i1/8026812883-4", "SIP/7201") in new stack
  == Using SIP RTP CoS mark 5
    -- Called SIP/7201
    -- SIP/7201-00000003 is ringing
PRI Span: 1 q931.c:5844 q931_alerting: Call 20734 enters state 7 (Call Received).  Hold state: Idle
PRI Span: 1
PRI Span: 1 > DL-DATA request
PRI Span: 1 > Protocol Discriminator: Q.931 (8)  len=9
PRI Span: 1 > TEI=0 Call Ref: len= 2 (reference 20734/0x50FE) (Sent to originator)
PRI Span: 1 > Message Type: ALERTING (1)
PRI Span: 1 TEI=0 Transmitting N(S)=4, window is open V(A)=4 K=7
PRI Span: 1
PRI Span: 1 > Protocol Discriminator: Q.931 (8)  len=9
PRI Span: 1 > TEI=0 Call Ref: len= 2 (reference 20734/0x50FE) (Sent to originator)
PRI Span: 1 > Message Type: ALERTING (1)
PRI Span: 1 > [1e 02 81 88]
PRI Span: 1 > Progress Indicator (len= 4) [ Ext: 1  Coding: CCITT (ITU) standard (0)  0: 0  Location: Private network serving the local user (1)
PRI Span: 1 >                               Ext: 1  Progress Description: Inband information or appropriate pattern now available. (8) ]
PRI Span: 1
PRI Span: 1 < Protocol Discriminator: Q.931 (8)  len=9
PRI Span: 1 < TEI=0 Call Ref: len= 2 (reference 20734/0x50FE) (Sent from originator)
PRI Span: 1 < Message Type: DISCONNECT (69)
PRI Span: 1 < [08 02 81 90]
PRI Span: 1 < Cause (len= 4) [ Ext: 1  Coding: CCITT (ITU) standard (0)  Spare: 0  Location: Private network serving the local user (1)
PRI Span: 1 <                  Ext: 1  Cause: Normal Clearing (16), class = Normal Event (1) ]
PRI Span: 1 Received message for call 0x7f9380002830 on link 0x26e6fa0 TEI/SAPI 0/0
PRI Span: 1 -- Processing IE 8 (cs0, Cause)
PRI Span: 1 -- Found active call: 0x7f9380002830 cref:20734
PRI Span: 1 q931.c:9272 post_handle_q931_message: Call 20734 enters state 12 (Disconnect Indication).  Hold state: Idle
Span 1: Processing event PRI_EVENT_HANGUP_REQ(15)
    -- Span 1: Channel 1/31 got hangup request, cause 16
  == Spawn extension (internal, 7201, 1) exited non-zero on 'DAHDI/i1/8026812883-4'
PRI Span: 1 q931.c:7259 q931_hangup: Hangup other cref:20734
PRI Span: 1 q931.c:7016 __q931_hangup: ourstate Disconnect Indication, peerstate Disconnect Request, hold-state Idle
PRI Span: 1 q931.c:6051 q931_release: Call 20734 enters state 19 (Release Request).  Hold state: Idle
PRI Span: 1
PRI Span: 1 > DL-DATA request
PRI Span: 1 > Protocol Discriminator: Q.931 (8)  len=9
PRI Span: 1 > TEI=0 Call Ref: len= 2 (reference 20734/0x50FE) (Sent to originator)
PRI Span: 1 > Message Type: RELEASE (77)
PRI Span: 1 TEI=0 Transmitting N(S)=5, window is open V(A)=5 K=7
PRI Span: 1
PRI Span: 1 > Protocol Discriminator: Q.931 (8)  len=9
PRI Span: 1 > TEI=0 Call Ref: len= 2 (reference 20734/0x50FE) (Sent to originator)
PRI Span: 1 > Message Type: RELEASE (77)
PRI Span: 1 > [08 02 81 90]
PRI Span: 1 > Cause (len= 4) [ Ext: 1  Coding: CCITT (ITU) standard (0)  Spare: 0  Location: Private network serving the local user (1)
PRI Span: 1 >                  Ext: 1  Cause: Normal Clearing (16), class = Normal Event (1) ]
    -- Hungup 'DAHDI/i1/8026812883-4'
PRI Span: 1
PRI Span: 1 < Protocol Discriminator: Q.931 (8)  len=5
PRI Span: 1 < TEI=0 Call Ref: len= 2 (reference 20734/0x50FE) (Sent from originator)
PRI Span: 1 < Message Type: RELEASE COMPLETE (90)
PRI Span: 1 Received message for call 0x7f9380002830 on link 0x26e6fa0 TEI/SAPI 0/0
PRI Span: 1 q931.c:9131 post_handle_q931_message: Call 20734 enters state 0 (Null).  Hold state: Idle
PRI Span: 1 q931.c:7259 q931_hangup: Hangup other cref:20734
PRI Span: 1 q931.c:7016 __q931_hangup: ourstate Null, peerstate Null, hold-state Idle
PRI Span: 1 Destroying call 0x7f9380002830, ourstate Null, peerstate Null, hold-state Idle
Span 1: Processing event PRI_EVENT_HANGUP_ACK(9)
 
Look at your bearer capabilities - on the failed one, it says a-law and the good one says u-law - why?
Also, check your DS1 config on the Avaya side and check the bearer capability. It can be 3.1KHz or speech. I think it bit me once having a mismatch.
 
Kyle, you are a lifesaver. We now have two-way calling. We had zero luck getting Asterisk to force u-law, but as soon as we switched Definity to a-law all was right with the world.

Thank you!!!

Michael Keen
Southern Vermont College
 
You're lucky Avaya's one of the few PBXs that can have Alaw and Ulaw in the same tdm bus.

I'd spend more time making the Asterisk ulaw just for mroe funky call scenarios like voicemail and calling Asterisk to the Avaya to the PSTN - I have no experience juggling different companding and where you might have other problems come up.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top