[asterisk-dev] chan_dahdi channels locking.

Hamstr hamstr at mail.ru
Wed Jan 11 07:42:56 CST 2012


Hi, All.
I discovered an issue with chan_dahdi.
I tryed to use patch from 
http://lists.digium.com/pipermail/asterisk-commits/2011-January/047635.html
because i realy need this feature. But it seems that i missed something 
important.
It looks like all is OK, but in a moment some channels appeared to be 
Loked like channel 13 (near)
Maybe anyone could point me to the Right solution? I just need to save 
Type Of Number that i was reseiving from channel.

CentOs 6 2.6.35.6-45.fc14.i686

asterisk  1.8.7.1
libpri  1.4.12
DAHDI Version: 2.5.0.2 Echo Canceller: HWEC, MG2
[from-g1] ; from Local Station

exten => _X.,1,MixMonitor(${UNIQUEID}.wav,,/usr/local/bin/2mp3 
${UNIQUEID}.wav)
exten => _X.,n,Dial(DAHDI/g1/${EXTEN})
exten => _X.,n,Macro(hangupcall)
exten => h,1,Macro(hangupcall)

[macro-hangupcall]
exten => s,1,ResetCDR(w)
exten => s,n,NoCDR()

in chan_dahdi.conf

pridialplan=from_channel
prilocaldialplan=from_channel
pricpndialplan=from_channel

voipgate*CLI> pri show channels

PRI       B    Chan Call       PRI  Channel
Span Chan Chan Idle Level      Call Name
    1    1 Yes  No   Alerting   Yes  DAHDI/i1/89262422101-52a
    1    2 Yes  No   Connect    Yes  DAHDI/i1/89262422101-4e6
    1    3 Yes  No   Connect    Yes  DAHDI/i1/9693718-51c
    1    4 Yes  Yes  Idle       No
    1    5 Yes  No   Proceeding Yes  DAHDI/i1/89262422004-52c
    1    6 Yes  No   Connect    Yes  DAHDI/i1/4952800289-4e5
    1    7 Yes  No   Connect    Yes  DAHDI/i1/89262422216-528
    1    8 Yes  No   Connect    Yes  DAHDI/i1/89854105469-520
    1    9 Yes  Yes  Idle       No
    1   10 Yes  Yes  Idle       No
    1   11 Yes  Yes  Idle       No
    1   12 Yes  Yes  Idle       No
    1   13 Yes  No   Idle       Yes
    1   14 Yes  Yes  Idle       No
    1   15 Yes  Yes  Idle       No
    1   17 Yes  Yes  Idle       No
    1   18 Yes  No   Alerting   Yes  DAHDI/i1/316-529
    1   19 Yes  Yes  Idle       No
    1   20 Yes  Yes  Idle       No
    1   21 Yes  Yes  Idle       No
    1   22 Yes  Yes  Idle       No
    1   23 Yes  Yes  Idle       No
    1   24 Yes  No   Connect    Yes  DAHDI/i1/9262422252-51f
    1   25 Yes  Yes  Idle       No
    1   26 Yes  Yes  Idle       No
    1   27 Yes  No   Connect    Yes  DAHDI/i1/347-527
    1   28 Yes  Yes  Idle       No
    1   29 Yes  No   Connect    Yes  DAHDI/i1/9262422864-51b
    1   30 Yes  No   Proceeding Yes  DAHDI/i1/9165552871-52b
    1   31 Yes  Yes  Idle       No
voipgate*CLI>

This causes a problem : Requested channel not available

voipgate*CLI> pri set debug 1 span 1
Enabled debugging on span 1
PRI Span: 1
PRI Span: 1 < Protocol Discriminator: Q.931 (8)  len=37
PRI Span: 1 < TEI=0 Call Ref: len= 2 (reference 578/0x242) (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 8d]
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: 13 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 < [6c 05 61 81 33 31 31]
PRI Span: 1 < Calling Number (len= 7) [ Ext: 0  TON: Abbreviated number 
(6)  NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1)
PRI Span: 1 <                           Presentation: Presentation 
permitted, user number passed network screening (1)  '311' ]
PRI Span: 1 < [70 08 81 37 38 37 35 36 30 39]
PRI Span: 1 < Called Number (len=10) [ Ext: 1  TON: Unknown Number Type 
(0)  NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1)  '7875609' ]
PRI Span: 1 -- Making new call for cref 578
PRI Span: 1 Received message for call 0x85e1f70 on link 0x85c5d74 
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 Identification)
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 q931.c:8281 post_handle_q931_message: Call 578 enters state 
6 (Call Present).  Hold state: Idle
Span: 1 Processing event: PRI_EVENT_RING
PRI Span: 1 q931.c:6837 q931_hangup: Hangup other cref:578
PRI Span: 1 q931.c:6594 __q931_hangup: ourstate Call Present, peerstate 
Call Initiated, hold-state Idle
PRI Span: 1 q931.c:6085 q931_release_complete: Call 578 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 578/0x242) (Sent to 
originator)
PRI Span: 1 > Message Type: RELEASE COMPLETE (90)
PRI Span: 1 TEI=0 Transmitting N(S)=77, window is open V(A)=77 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 578/0x242) (Sent to 
originator)
PRI Span: 1 > Message Type: RELEASE COMPLETE (90)
PRI Span: 1 > [08 02 81 ac]
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: Requested channel not 
available (44), class = Network Congestion (resource unavailable) (2) ]
PRI Span: 1 q931.c:6837 q931_hangup: Hangup other cref:578
PRI Span: 1 q931.c:6594 __q931_hangup: ourstate Null, peerstate Null, 
hold-state Idle
PRI Span: 1 Destroying call 0x85e1f70, ourstate Null, peerstate Null, 
hold-state Idle
PRI Span: 1
PRI Span: 1 < Protocol Discriminator: Q.931 (8)  len=37
PRI Span: 1 < TEI=0 Call Ref: len= 2 (reference 579/0x243) (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 8d]
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: 13 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 < [6c 05 61 81 33 31 31]
PRI Span: 1 < Calling Number (len= 7) [ Ext: 0  TON: Abbreviated number 
(6)  NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1)
PRI Span: 1 <                           Presentation: Presentation 
permitted, user number passed network screening (1)  '311' ]
PRI Span: 1 < [70 08 81 37 38 37 35 36 30 39]
PRI Span: 1 < Called Number (len=10) [ Ext: 1  TON: Unknown Number Type 
(0)  NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1)  '7875609' ]
PRI Span: 1 -- Making new call for cref 579
PRI Span: 1 Received message for call 0x85e1f70 on link 0x85c5d74 
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 Identification)
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 q931.c:8281 post_handle_q931_message: Call 579 enters state 
6 (Call Present).  Hold state: Idle
Span: 1 Processing event: PRI_EVENT_RING
PRI Span: 1 q931.c:6837 q931_hangup: Hangup other cref:579
PRI Span: 1 q931.c:6594 __q931_hangup: ourstate Call Present, peerstate 
Call Initiated, hold-state Idle
PRI Span: 1 q931.c:6085 q931_release_complete: Call 579 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 579/0x243) (Sent to 
originator)
PRI Span: 1 > Message Type: RELEASE COMPLETE (90)
PRI Span: 1 TEI=0 Transmitting N(S)=78, window is open V(A)=78 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 579/0x243) (Sent to 
originator)
PRI Span: 1 > Message Type: RELEASE COMPLETE (90)
PRI Span: 1 > [08 02 81 ac]
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: Requested channel not 
available (44), class = Network Congestion (resource unavailable) (2) ]
PRI Span: 1 q931.c:6837 q931_hangup: Hangup other cref:579
PRI Span: 1 q931.c:6594 __q931_hangup: ourstate Null, peerstate Null, 
hold-state Idle
PRI Span: 1 Destroying call 0x85e1f70, ourstate Null, peerstate Null, 
hold-state Idle
voipgate*CLI> pri set debug off span 1
Disabled debugging on span 1
voipgate*CLI>

It seems to be unclearly free previous call?


-- 
---------------------------------------------------
КагДила?
(\___/)
(=":"=)
(")_(")



More information about the asterisk-dev mailing list