[Asterisk-Users] Get new PRI working

Adam Goryachev
Sat, 14 Feb 2004 22:07:38 -0000

Hi all,

I received my shiny new TE405P on Friday, and after much fiddling and
assistance from the irc channel, I got a OK status (telco reversed the TX/RX
and I wired it wrong).

Anyway, currently it works for inbound calls, but I can't seem to dialout on
it. Here is the config from zaptel.conf:
span=1,1,0,ccs,hdb3,crc4
bchan=1-10
unused=11-15,17-31
dchan=16

and zapata.conf
switchtype => euroisdn
callgroup => 1
group => 2
busydetect => no
immediate => yes
context => remote
signalling => pri_cpe
;stripmsd => 1
callprogress => no
channel => 1-10

and here is the debug from asterisk:
    -- Executing Dial("IAX2[home@10.0.10.2:4569]/3",
"Zap/2/93454395||rT")
in new stack
Feb 15 15:58:27 DEBUG[20497]: app_dial.c:400 dial_exec: SIMPLE DIAL (NO URL)
-- Making new call for cr 32774
> Protocol Discriminator: Q.931 (8)  len=43
> Call Ref: len= 2 (reference 6/0x6) (Originator)
> Message type: SETUP (5)
> Bearer Capability (len= 3) [ Ext: 1  Q.931 Std: 0  Info transfer
capability: Speech (0)
>                              Ext: 1  Trans mode/rate: 64kbps, circuit-mode
(16)
>                              Ext: 1  User information layer 1: A-Law (35)
> Channel ID (len= 5) [ Ext: 1  IntID: Implicit, PRI Spare: 0, Exclusive
Dchan: 0
>                        ChanSel: Reserved
>                       Ext: 1  Coding: 0   Number Specified   Channel Type:
3
>                       Ext: 1  Channel: 2 ]
> Display (len= 7) [ > Display (len= 7) [ 1> Display (len= 7) [ 1H>
Display
(len= 7) [ 1Ho> Display (len= 7) [ 1Hom> Display (len= 7) [ 1Home>
Display
(len= 7) [ 1Home > Display (len= 7) [ 1Home 2> Display (len= 7) [ 1Home 2
]
> Calling Number (len= 7) [ Ext: 0  TON: National Number (2)  NPI:
ISDN/Telephony Numbering Plan (E.164/E.163) (1)
>                           Presentation: Presentation permitted, user
number passed network screening (1) '651' ]
> Called Number (len=11) [ Ext: 1  TON: National Number (2)  NPI:
ISDN/Telephony Numbering Plan (E.164/E.163) (1) '93454395'
]
> Sending Complete (len= 0)
    -- Called 2/93454395
< Protocol Discriminator: Q.931 (8)  len=13
< Call Ref: len= 2 (reference 32774/0x8006) (Terminator)
< Message type: STATUS (125)
< Cause (len= 3) [ Ext: 1  Coding: CCITT (ITU) standard (0) 0: 0   Location:
Public network serving the local user (2)
<                  Ext: 1  Cause: Info. element nonexist or not implemented
(99), class = Protocol Error (6) ]
<              Cause data 0: 01 (1)
< Call State (len= 1) [ Ext: 0  Coding: CCITT (ITU) standard (0) Call state:
Call Initiated (1)
-- Processing IE 8 (Cause)
-- Processing IE 20 (Call State)
< Protocol Discriminator: Q.931 (8)  len=10
< Call Ref: len= 2 (reference 32774/0x8006) (Terminator)
< Message type: CALL PROCEEDING (2)
< Channel ID (len= 5) [ Ext: 1  IntID: Implicit, PRI Spare: 0, Exclusive
Dchan: 0
<                        ChanSel: Reserved
<                       Ext: 1  Coding: 0   Number Specified   Channel Type:
3
<                       Ext: 1  Channel: 2 ]
-- Processing IE 24 (Channel Identification)
< Protocol Discriminator: Q.931 (8)  len=13
< Call Ref: len= 2 (reference 32774/0x8006) (Terminator)

< Message type: DISCONNECT (69)
< Cause (len= 2) [ Ext: 1  Coding: CCITT (ITU) standard (0) 0: 0   Location:
Public network serving the remote user (4)
<                  Ext: 1  Cause: Normal, unspecified (31), class = Normal
Event (1) ]
< Progress Indicator (len= 2) [ Ext: 1  Coding: CCITT (ITU) standard (0) 0:
0   Location: Public network serving the local user (2)
<                               Ext: 1  Progress Description: Inband
information or appropriate pattern now available. (8) ]
-- Processing IE 8 (Cause)
-- Processing IE 30 (Progress Indicator)
    -- Channel 2, span 1 got hangup
Feb 15 15:58:27 DEBUG[20497]: chan_zap.c:2185 zt_setoption: Set option AUDIO
MODE, value: ON(1) on Zap/2-1
Feb 15 15:58:27 DEBUG[20497]: chan_zap.c:1715 zt_hangup: Hangup: channel: 2
index = 0, normal = 17, callwait = -1, thirdcall = -1
NEW_HANGUP DEBUG: Calling q931_hangup, ourstate Disconnect Indication,
peerstate Disconnect Request
> Protocol Discriminator: Q.931 (8)  len=9
> Call Ref: len= 2 (reference 6/0x6) (Originator)
> Message type: RELEASE (77)
> Cause (len= 2) [ Ext: 1  Coding: CCITT (ITU) standard (0) 0: 0   Location:
Private network serving the local user (1)
>                  Ext: 1  Cause: Normal Clearing (16), class = Normal Event
(1) ]
Feb 15 15:58:27 DEBUG[20497]: chan_zap.c:1133 zt_disable_ec: disabled echo
cancellation on channel 2
Feb 15 15:58:27 DEBUG[20497]: chan_zap.c:2095 zt_setoption: Set option TDD
MODE, value: OFF(0) on Zap/2-1
Feb 15 15:58:27 DEBUG[20497]: chan_zap.c:1076 update_conf: Updated
conferencing on 2, with 0 conference usersFeb 15 15:58:27 DEBUG[20497]:
chan_zap.c:2179 zt_setoption: Set option AUDIO MODE, value: OFF(0) on Zap/2-1
Feb 15 15:58:27 DEBUG[20497]: chan_zap.c:1133 zt_disable_ec: disabled echo
cancellation on channel 2
    -- Hungup 'Zap/2-1'
  == No one is available to answer at this time
    -- Executing Playback("IAX2[home@10.0.10.2:4569]/3",
"tt-allbusy") in
new stack
Feb 15 15:58:27 DEBUG[20497]: channel.c:958 ast_settimeout: Scheduling timer
at 160 sample intervals
    -- Playing 'tt-allbusy' (language 'en')
< Protocol Discriminator: Q.931 (8)  len=5
< Call Ref: len= 2 (reference 32774/0x8006) (Terminator)
< Message type: RELEASE COMPLETE (90)
NEW_HANGUP DEBUG: Calling q931_hangup, ourstate Null, peerstate Null
NEW_HANGUP DEBUG: Destroying the call, ourstate Null, peerstate Null
Feb 15 15:58:28 WARNING[7176]: chan_iax2.c:4920 socket_read: Received mini
frame before first full voice frame
 Feb 15 15:58:28 DEBUG[7176]: chan_iax2.c:4333 socket_read: Ooh, voice
format changed to 2
Feb 15 15:58:30 DEBUG[7176]: chan_iax2.c:4513 socket_read: Immediately
destroying 3, having received hangup
Feb 15 15:58:30 DEBUG[20497]: channel.c:958 ast_settimeout: Scheduling timer
at 0 sample intervals
  == Spawn extension (macro-dialout, s, 5) exited non-zero on
'IAX2[home@10.0.10.2:4569]/3' in macro 'dialout'
  == Spawn extension (inside, s, 1) exited non-zero on
'IAX2[home@10.0.10.2:4569]/3'
Feb 15 15:58:30 DEBUG[20497]: chan_iax2.c:1924 iax2_hangup: We're hanging up
IAX2[home@10.0.10.2:4569]/3 now...
Feb 15 15:58:30 DEBUG[20497]: chan_iax2.c:1933 iax2_hangup: Really
destroying IAX2[home@10.0.10.2:4569]/3 now...
    -- Hungup 'IAX2[home@10.0.10.2:4569]/3'
Feb 15 15:59:00 DEBUG[7176]: chan_iax2.c:4513 socket_read: Immediately
destroying 1, having received hangup





Here is a working incoming call...
< Protocol Discriminator: Q.931 (8)  len=44
< Call Ref: len= 2 (reference 186/0xBA) (Originator)
< Message type: SETUP (5)
< Sending Complete (len= 4)
< Bearer Capability (len= 3) [ Ext: 1  Q.931 Std: 0  Info transfer
capability: Speech (0)
<                              Ext: 1  Trans mode/rate: 64kbps, circuit-mode
(16)
<                              Ext: 1  User information layer 1: A-Law (35)
< Channel ID (len= 5) [ Ext: 1  IntID: Implicit, PRI Spare: 0, Preferred
Dchan: 0
<                        ChanSel: Reserved
<                       Ext: 1  Coding: 0   Number Specified   Channel Type:
3
<                       Ext: 1  Channel: 1 ]
< Calling Number (len=13) [ Ext: 0  TON: National Number (2)  NPI:
ISDN/Telephony Numbering Plan (E.164/E.163) (1)
<                           Presentation: Presentation permitted, user
number passed network screening (1) '402078431' ]
< Called Number (len=11) [ Ext: 1  TON: Subscriber Number (4)  NPI:
ISDN/Telephony Numbering Plan (E.164/E.163) (1) '83040000' ]
< IE: High-layer Compatibility (len = 4)
-- Making new call for cr 186
-- Processing Q.931 Call Setup
-- Processing IE 33 (Sending Complete)
-- Processing IE 4 (Bearer Capability)
-- Processing IE 24 (Channel Identification)
-- Processing IE 108 (Calling Party Number)
-- Processing IE 112 (Called Party Number)
-- Processing IE 125 (High-layer Compatibility)
    -- Going to extension s|1 because of immediate=yes
> Protocol Discriminator: Q.931 (8)  len=10
> Call Ref: len= 2 (reference 32954/0x80BA) (Terminator)
> Message type: CALL PROCEEDING (2)
> Channel ID (len= 5) [ Ext: 1  IntID: Implicit, PRI Spare: 0, Exclusive
Dchan: 0
>                        ChanSel: Reserved
>                       Ext: 1  Coding: 0   Number Specified   Channel Type:
3
>                       Ext: 1  Channel: 1 ]
> Protocol Discriminator: Q.931 (8)  len=14
> Call Ref: len= 2 (reference 32954/0x80BA) (Terminator)
> Message type: ALERTING (1)
> Channel ID (len= 5) [ Ext: 1  IntID: Implicit, PRI Spare: 0, Exclusive
Dchan: 0
>                        ChanSel: Reserved
>                       Ext: 1  Coding: 0   Number Specified   Channel Type:
3
>                       Ext: 1  Channel: 1 ]
> Progress Indicator (len= 2) [ Ext: 1  Coding: CCITT (ITU) standard (0) 0:
0   Location: Private network serving the local user (1)
>                               Ext: 1  Progress Description: Inband
information or appropriate pattern now available. (8) ]
    -- Executing Answer("Zap/1-1", "") in new stack
    -- Accepting call from '402078431' to 's' on channel 1, span
1
Feb 15 16:00:15 DEBUG[8201]: chan_zap.c:1101 zt_enable_ec: Enabled echo
cancellation on channel 1
> Protocol Discriminator: Q.931 (8)  len=14
> Call Ref: len= 2 (reference 32954/0x80BA) (Terminator)
> Message type: CONNECT (7)
> Channel ID (len= 5) [ Ext: 1  IntID: Implicit, PRI Spare: 0, Exclusive
Dchan: 0
>                        ChanSel: Reserved
>                       Ext: 1  Coding: 0   Number Specified   Channel Type:
3
>                       Ext: 1  Channel: 1 ]
> Progress Indicator (len= 2) [ Ext: 1  Coding: CCITT (ITU) standard (0) 0:
0   Location: Private network serving the local user (1)
>                               Ext: 1  Progress Description: Called
equipment is non-ISDN. (2) ]
    -- Executing DigitTimeout("Zap/1-1", "5") in new stack
    -- Set Digit Timeout to 5
    -- Executing ResponseTimeout("Zap/1-1", "10") in new
stack
    -- Set Response Timeout to 10
    -- Executing SetMusicOnHold("Zap/1-1", "default") in new
stack
    -- Executing NoOp("Zap/1-1", "") in new stack
    -- Executing BackGround("Zap/1-1",
"local/Thanks_for_calling") in new stack
Feb 15 16:00:15 DEBUG[21521]: channel.c:958 ast_settimeout: Scheduling timer
at 160 sample intervals
    -- Playing 'local/Thanks_for_calling' (language 'en')
< Protocol Discriminator: Q.931 (8)  len=5
< Call Ref: len= 2 (reference 186/0xBA) (Originator)
< Message type: CONNECT ACKNOWLEDGE (15)
< Protocol Discriminator: Q.931 (8)  len=13
< Call Ref: len= 2 (reference 186/0xBA) (Originator)
< Message type: DISCONNECT (69)
< Cause (len= 2) [ Ext: 1  Coding: CCITT (ITU) standard (0) 0: 0   Location:
User (0)
<                  Ext: 1  Cause: Normal Clearing (16), class = Normal Event
(1) ]
< Progress Indicator (len= 2) [ Ext: 1  Coding: CCITT (ITU) standard (0) 0:
0   Location: Public network serving the local user (2)
<                               Ext: 1  Progress Description: Inband
information or appropriate pattern now available. (8) ]
-- Processing IE 8 (Cause)
-- Processing IE 30 (Progress Indicator)
    -- Channel 1, span 1 got hangup
Feb 15 16:00:18 DEBUG[21521]: channel.c:958 ast_settimeout: Scheduling timer
at 0 sample intervals
  == Spawn extension (remote, s, 6) exited non-zero on 'Zap/1-1'
Feb 15 16:00:18 DEBUG[21521]: chan_zap.c:2185 zt_setoption: Set option AUDIO
MODE, value: ON(1) on Zap/1-1
Feb 15 16:00:18 DEBUG[21521]: chan_zap.c:1715 zt_hangup: Hangup: channel: 1
index = 0, normal = 16, callwait = -1, thirdcall = -1
NEW_HANGUP DEBUG: Calling q931_hangup, ourstate Disconnect Indication,
peerstate Disconnect Request
> Protocol Discriminator: Q.931 (8)  len=9
> Call Ref: len= 2 (reference 32954/0x80BA) (Terminator)
> Message type: RELEASE (77)
> Cause (len= 2) [ Ext: 1  Coding: CCITT (ITU) standard (0) 0: 0   Location:
Private network serving the local user (1)
>                  Ext: 1  Cause: Normal Clearing (16), class = Normal Event
(1) ]
Feb 15 16:00:18 DEBUG[21521]: chan_zap.c:1133 zt_disable_ec: disabled echo
cancellation on channel 1
Feb 15 16:00:18 DEBUG[21521]: chan_zap.c:2095 zt_setoption: Set option TDD
MODE, value: OFF(0) on Zap/1-1
Feb 15 16:00:18 DEBUG[21521]: chan_zap.c:1076 update_conf: Updated
conferencing on 1, with 0 conference usersFeb 15 16:00:18 DEBUG[21521]:
chan_zap.c:2179 zt_setoption: Set option AUDIO MODE, value: OFF(0) on Zap/1-1
Feb 15 16:00:18 DEBUG[21521]: chan_zap.c:1133 zt_disable_ec: disabled echo
cancellation on channel 1
    -- Hungup 'Zap/1-1'
< Protocol Discriminator: Q.931 (8)  len=5
< Call Ref: len= 2 (reference 186/0xBA) (Originator)
< Message type: RELEASE COMPLETE (90)
NEW_HANGUP DEBUG: Calling q931_hangup, ourstate Null, peerstate Null
NEW_HANGUP DEBUG: Destroying the call, ourstate Null, peerstate Null


Any ideas would be greatly appreciated on how to get this working.

Thanks,
Adam