Outbound and inbound call fail on PRI line

Hi…i am using the asterisk13+dahdi 2.10.0.1+redfone with 2 PRI lines configured.out of 2 PRI 1 PRI is working fine and able to make inbound and outbound call successfully.
But for another PRI line:
1) when i make inbound call then it get failed with ISDN cause code 1 and it always landed on ‘s’ extension or ‘_.’ extension.

2) while when i make outbound call from same PRI then then call failed with ISDN cause code 65.
i think cause code may related to data rate mismatch and analog circuit so i am confusing where the actual problem reside?is this configuration problem on asterisk side or telco side?..I am attaching the PRI debug for inbound and outbound calls and dahdi’s sytem.conf and chan_dahdi.conf as follows.
my system.conf

dynamic=ethmf,eth1/00:50:C2:65:DC:C4/0,31,0
dynamic=ethmf,eth1/00:50:C2:65:DC:C4/1,31,1
bchan=1-15
bchan=17-31
dchan=16
echocanceller=mg2,1-15,17-31
bchan=32-46
bchan=48-62
dchan=47
echocanceller=mg2,32-46,48-62
loadzone=us
defaultzone=us

chan_dahdi.conf

[trunkgroups]
;
[channels]
;# include /etc/asterisk/dahdi-channels.conf
language=en
usecallerid=yes
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
canpark=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=no
relaxdtmf=yes
rxgain=0.0
txgain=0.0
pridialplan=unknown
prilocaldialplan=private

callgroup=0
pickupgroup=0
;immediate=yes

group=0
context=from-pstn
switchtype=euroisdn
signalling=pri_cpe
channel => 1-15, 17-31

group=1
context=from-pstn
switchtype=euroisdn
signalling=pri_cpe
channel => 32-46, 48-62

pri span debug for outbound call is

PRI Span: 1 -- Making new call for cref 32773
PRI Span: 1 
PRI Span: 1 > DL-DATA request
PRI Span: 1 > Protocol Discriminator: Q.931 (8)  len=43
PRI Span: 1 > TEI=0 Call Ref: len= 2 (reference 5/0x5) (Sent from originator)
PRI Span: 1 > Message Type: SETUP (5)
PRI Span: 1 TEI=0 Transmitting N(S)=50, window is open V(A)=50 K=7
PRI Span: 1 
PRI Span: 1 > Protocol Discriminator: Q.931 (8)  len=43
PRI Span: 1 > TEI=0 Call Ref: len= 2 (reference 5/0x5) (Sent from originator)
PRI Span: 1 > Message Type: SETUP (5)
PRI Span: 1 > [04 03 80 90 a2]
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: u-Law (34)
PRI Span: 1 > [18 03 a1 83 84]
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: 4 Type: CPE]
PRI Span: 1 > [6c 0c 49 80 39 39 37 30 38 36 37 37 34 37]
PRI Span: 1 > Calling Party Number (len=14) [ Ext: 0  TON: Subscriber Number (4)  NPI: Private Numbering Plan (9)
PRI Span: 1 >                                 Presentation: Presentation allowed, User-provided, not screened (0)  '9970867747' ]
PRI Span: 1 > [70 0b 80 39 39 37 30 38 36 37 37 34 37]
PRI Span: 1 > Called Party Number (len=13) [ Ext: 1  TON: Unknown Number Type (0)  NPI: Unknown Number Plan (0)  '9970867747' ]
PRI Span: 1 > [a1]
PRI Span: 1 > Sending Complete (len= 1)
PRI Span: 1 q931.c:6350 q931_setup: Call 32773 enters state 1 (Call Initiated).  Hold state: Idle
PRI Span: 1 
PRI Span: 1 < Protocol Discriminator: Q.931 (8)  len=9
PRI Span: 1 < TEI=0 Call Ref: len= 2 (reference 5/0x5) (Sent to originator)
PRI Span: 1 < Message Type: RELEASE COMPLETE (90)
PRI Span: 1 < [08 02 82 c1]
PRI Span: 1 < Cause (len= 4) [ Ext: 1  Coding: CCITT (ITU) standard (0)  Spare: 0  Location: Public network serving the local user (2)
PRI Span: 1 <                  Ext: 1  Cause: Bearer capability not implemented (65), class = Service or Option not Implemented (4) ]
PRI Span: 1 Received message for call 0x7f259c001000 on link 0x1f81570 TEI/SAPI 0/0
PRI Span: 1 -- Processing IE 8 (cs0, Cause)
PRI Span: 1 q931.c:8959 post_handle_q931_message: Call 32773 enters state 0 (Null).  Hold state: Idle
Span 1: Processing event PRI_EVENT_HANGUP(6)
PRI Span: 1 q931.c:7151 q931_hangup: Hangup other cref:32773
PRI Span: 1 q931.c:6908 __q931_hangup: ourstate Null, peerstate Null, hold-state Idle
PRI Span: 1 Destroying call 0x7f259c001000, ourstate Null, peerstate Null, hold-state Idle
[Apr  7 16:12:02] NOTICE[19072]: pbx_spool.c:390 attempt_thread: Call failed to go through, reason (0) Call Failure (not BUSY, and not NO_ANSWER, maybe Circuit busy or down?)
[Apr  7 16:12:02] NOTICE[19072]: pbx_spool.c:393 attempt_thread: Queued call to DAHDI/4/9970867747 expired without completion after 0 attempts

pri span debug for incoming call is

PRI Span: 1 
PRI Span: 1 < Protocol Discriminator: Q.931 (8)  len=36
PRI Span: 1 < TEI=0 Call Ref: len= 2 (reference 12696/0x3198) (Sent from originator)
PRI Span: 1 < Message Type: SETUP (5)
PRI Span: 1 < [a1]
PRI Span: 1 < Sending Complete (len= 1)
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 03 a9 83 81]
PRI Span: 1 < Channel ID (len= 5) [ Ext: 1  IntID: Implicit  Other(PRI)  Spare: 0  Exclusive  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: 1 Type: CPE]
PRI Span: 1 < [6c 0e 11 81 39 31 39 39 37 30 38 36 37 37 34 37]
PRI Span: 1 < Calling Party Number (len=16) [ Ext: 0  TON: International Number (1)  NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1)
PRI Span: 1 <                                 Presentation: Presentation allowed, User-provided, verified and passed (1)  '919970867747' ]
PRI Span: 1 < [7d 02 91 81]
PRI Span: 1 < IE: High-layer Compatibility (len = 4)
PRI Span: 1 -- Making new call for cref 12696
PRI Span: 1 Received message for call 0x7ffc100049e0 on link 0x37147d0 TEI/SAPI 0/0
PRI Span: 1 -- Processing Q.931 Call Setup
PRI Span: 1 -- Processing IE 161 (cs0, Sending Complete)
PRI Span: 1 -- Processing IE 4 (cs0, Bearer Capability)
PRI Span: 1 -- Processing IE 24 (cs0, Channel ID)
PRI Span: 1 -- Processing IE 108 (cs0, Calling Party Number)
PRI Span: 1 -- Processing IE 125 (cs0, High-layer Compatibility)
PRI Span: 1 q931.c:8661 post_handle_q931_message: Call 12696 enters state 6 (Call Present).  Hold state: Idle
Span 1: Processing event PRI_EVENT_RING(5)
PRI Span: 1 q931.c:7151 q931_hangup: Hangup other cref:12696
PRI Span: 1 q931.c:6908 __q931_hangup: ourstate Call Present, peerstate Call Initiated, hold-state Idle
PRI Span: 1 q931.c:6399 q931_release_complete: Call 12696 enters state 0 (Null).  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 12696/0x3198) (Sent to originator)
PRI Span: 1 > Message Type: RELEASE COMPLETE (90)
PRI Span: 1 TEI=0 Transmitting N(S)=1, window is open V(A)=1 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 12696/0x3198) (Sent to originator)
PRI Span: 1 > Message Type: RELEASE COMPLETE (90)
PRI Span: 1 > [08 02 81 81]
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: Unallocated (unassigned) number (1), class = Normal Event (0) ]
PRI Span: 1 q931.c:7151 q931_hangup: Hangup other cref:12696
PRI Span: 1 q931.c:6908 __q931_hangup: ourstate Null, peerstate Null, hold-state Idle
PRI Span: 1 Destroying call 0x7ffc100049e0, ourstate Null, peerstate Null, hold-state Idle

please help… waiting for response :unamused:

yes…it done :laughing: for outbound calls…i miss the PCM encoding ‘alaw=1-62’ configuration of dahdi’s system.conf…But problem still persist for the inbound call…anyone know the solution or notice any missing configuration then please let me know…thanks… waiting for your’s suggestion :unamused:

s is correct for a call with no routing digits.

_. matches s, h, etc. so should not be used.

thank you very much David55 for your reply.