Sé que cualquiera diría que la configuración de un enlace ISDN PRI de Telmex es muy trivial, y estoy de acuerdo, sin embargo me encontre con un pequeño problema; al poner el enlace al PBX solo podía recibir llamadas de la PSTN, pero no podía generar llamadas desde el PBX hacia la PSTN(nunca me había sucedido), recibía una causa de congestion ’0′.
rodman*CLI> console dial 04455XXXXXXXX@rodman
== Console is full duplex
— Executing [04455XXXXXXXX@rodman:1] Dial(“Console/dsp”, “DAHDI/1/04455XXXXXXXX”) in new stack
— Requested transfer capability: 0×00 – SPEECH
— Called DAHDI/1/04455XXXXXXXX
— DAHDI/i1/04455XXXXXXXXX-f is proceeding passing it to Console/dsp
— Span 1: Channel 0/1 got hangup request, cause 0
— Hungup ‘DAHDI/i1/04455XXXXXXXX-f’
== Everyone is busy/congested at this time (1:0/0/1)
— Auto fallthrough, channel ‘Console/dsp’ status is ‘CHANUNAVAIL’
rodman*CLI>
Esto era muy raro ya que con Dahdi 2.3 y Asterisk 1.4 (Elastix 1.6) no sucedía, obvio revise que mis configuraciones fueran las correctas, una vez que valide esto, que se me ocurre hablar al COR del Carrier para solicitar una traza del enlace al intentar enlazar una llamada… comentaron que ellos no veían ningun intento de llamada, ¡pufff!, habilite el debug del span para ver con más detalle si existía un problema; aquí el comando:
pri set debug on span 1
Una vez hablitado el debug el CLI mostraba lo siguiente:
rodman*CLI> console dial 53259000@rodman
== Console is full duplex
— Executing [53259000@rodman:1] Dial(“Console/dsp”, “DAHDI/g0/53259000″) in new stack
PRI Span: 1 — Making new call for cref 32770
— Requested transfer capability: 0×00 – SPEECH
PRI Span: 1
PRI Span: 1 > DL-DATA request
PRI Span: 1 > Protocol Discriminator: Q.931 (8) len=31
PRI Span: 1 > TEI=0 Call Ref: len= 2 (reference 2/0×2) (Sent from originator)
PRI Span: 1 > Message Type: SETUP (5)
PRI Span: 1 TEI=0 Transmitting N(S)=0, window is open V(A)=0 K=7
PRI Span: 1
PRI Span: 1 > TEI: 0 State 7(Multi-frame established)
PRI Span: 1 > V(A)=0, V(S)=0, V(R)=0
PRI Span: 1 > K=7, RC=0, l3_initiated=1, reject_except=0, ack_pend=0
PRI Span: 1 > T200_id=0, N200=3, T203_id=8192
PRI Span: 1 > [ 00 01 00 00 08 02 00 02 05 04 03 80 90 a3 18 03 a1 83 81 6c 02 21 80 70 09 80 35 37 33 35 33 39 39 30 a1 ]
PRI Span: 1 > Informational frame:
PRI Span: 1 > SAPI: 00 C/R: 0 EA: 0
PRI Span: 1 > TEI: 000 EA: 1
PRI Span: 1 > N(S): 000 0: 0
PRI Span: 1 > N(R): 000 P: 0
PRI Span: 1 > 31 bytes of data
PRI Span: 1 > Protocol Discriminator: Q.931 (8) len=31
PRI Span: 1 > TEI=0 Call Ref: len= 2 (reference 2/0×2) (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 03 a1 83 81]
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: 1 Type: CPE]
PRI Span: 1 > [6c 02 21 80]
PRI Span: 1 > Calling Number (len= 4) [ Ext: 0 TON: National Number (2) NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1)
PRI Span: 1 > Presentation: Presentation permitted, user number not screened (0) '' ]
PRI Span: 1 > [70 09 80 35 37 33 35 33 39 39 30]
PRI Span: 1 > Called Number (len=11) [ Ext: 1 TON: Unknown Number Type (0) NPI: Unknown Number Plan (0) '53259000 ]
PRI Span: 1 > [a1]
PRI Span: 1 > Sending Complete (len= 1)
PRI Span: 1 — Stopping T203 timer
PRI Span: 1 — Starting T200 timer
PRI Span: 1 q931.c:6036 q931_setup: Call 32770 enters state 1 (Call Initiated). Hold state: Idle
— Called DAHDI/g0/53259000
PRI Span: 1
PRI Span: 1 < TEI: 0 State 7(Multi-frame established)
PRI Span: 1 < V(A)=0, V(S)=1, V(R)=0
PRI Span: 1 < K=7, RC=0, l3_initiated=1, reject_except=0, ack_pend=0
PRI Span: 1 < T200_id=8192, N200=3, T203_id=0
PRI Span: 1 < [ 00 01 01 02 ]
PRI Span: 1 < Supervisory frame:
PRI Span: 1 < SAPI: 00 C/R: 0 EA: 0
PRI Span: 1 < TEI: 000 EA: 1
PRI Span: 1 < Zero: 0 S: 0 01: 1 [ RR (receive ready) ]
PRI Span: 1 < N(R): 001 P/F: 0
PRI Span: 1 < 0 bytes of data
PRI Span: 1 — Got ACK for N(S)=0 to (but not including) N(S)=1
PRI Span: 1 — ACKing N(S)=0, tx_queue head is N(S)=-1 (-1 is empty, -2 is not transmitted)
PRI Span: 1 — Stopping T200 timer
PRI Span: 1 — Starting T203 timer
PRI Span: 1 Done handling message for SAPI/TEI=0/0
PRI Span: 1
PRI Span: 1 < TEI: 0 State 7(Multi-frame established)
PRI Span: 1 < V(A)=1, V(S)=1, V(R)=0
PRI Span: 1 < K=7, RC=0, l3_initiated=1, reject_except=0, ack_pend=0
PRI Span: 1 < T200_id=0, N200=3, T203_id=8192
PRI Span: 1 < [ 02 01 00 02 08 02 80 02 02 18 03 a9 83 81 ]
PRI Span: 1 < Informational frame:
PRI Span: 1 < SAPI: 00 C/R: 1 EA: 0
PRI Span: 1 < TEI: 000 EA: 1
PRI Span: 1 < N(S): 000 0: 0
PRI Span: 1 < N(R): 001 P: 0
PRI Span: 1 < 10 bytes of data
PRI Span: 1 < Protocol Discriminator: Q.931 (8) len=10
PRI Span: 1 < TEI=0 Call Ref: len= 2 (reference 2/0×2) (Sent to originator)
PRI Span: 1 < Message Type: CALL PROCEEDING (2)
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 — Got ACK for N(S)=1 to (but not including) N(S)=1
PRI Span: 1 — T200 requested to stop when not started
PRI Span: 1 T203 requested to start without stopping first
PRI Span: 1 — Starting T203 timer
PRI Span: 1 Received message for call 0x88c92d0 on link 0x85cd9ec TEI/SAPI 0/0
PRI Span: 1 — Processing IE 24 (cs0, Channel Identification)
PRI Span: 1 q931.c:8454 post_handle_q931_message: Call 32770 enters state 3 (Outgoing Call Proceeding). Hold state: Idle
PRI Span: 1
PRI Span: 1 > TEI: 0 State 7(Multi-frame established)
PRI Span: 1 > V(A)=1, V(S)=1, V(R)=1
PRI Span: 1 > K=7, RC=0, l3_initiated=1, reject_except=0, ack_pend=0
PRI Span: 1 > T200_id=0, N200=3, T203_id=8192
PRI Span: 1 > [ 02 01 01 02 ]
PRI Span: 1 > Supervisory frame:
PRI Span: 1 > SAPI: 00 C/R: 1 EA: 0
PRI Span: 1 > TEI: 000 EA: 1
PRI Span: 1 > Zero: 0 S: 0 01: 1 [ RR (receive ready) ]
PRI Span: 1 > N(R): 001 P/F: 0
PRI Span: 1 > 0 bytes of data
PRI Span: 1 Done handling message for SAPI/TEI=0/0
Span: 1 Processing event: PRI_EVENT_PROCEEDING
— DAHDI/i1/53259000-2 is proceeding passing it to Console/dsp
PRI Span: 1
PRI Span: 1 < TEI: 0 State 7(Multi-frame established)
PRI Span: 1 < V(A)=1, V(S)=1, V(R)=1
PRI Span: 1 < K=7, RC=0, l3_initiated=1, reject_except=0, ack_pend=0
PRI Span: 1 < T200_id=0, N200=3, T203_id=8192
PRI Span: 1 < [ 02 01 02 02 08 02 80 02 45 08 03 02 80 9c 1e 02 82 88 ]
PRI Span: 1 < Informational frame:
PRI Span: 1 < SAPI: 00 C/R: 1 EA: 0
PRI Span: 1 < TEI: 000 EA: 1
PRI Span: 1 < N(S): 001 0: 0
PRI Span: 1 < N(R): 001 P: 0
PRI Span: 1 < 14 bytes of data
PRI Span: 1 < Protocol Discriminator: Q.931 (8) len=14
PRI Span: 1 < TEI=0 Call Ref: len= 2 (reference 2/0×2) (Sent to originator)
PRI Span: 1 < Message Type: DISCONNECT (69)
PRI Span: 1 < [08 03 02 80 9c]
PRI Span: 1 < Cause (len= 5) [ Ext: 0 Coding: CCITT (ITU) standard (0) Spare: 0 Location: Public network serving the local user (2)
PRI Span: 1 < Ext: 1 Cause: Unknown (0), class = Normal Event (0) ]
PRI Span: 1 < Cause data 1: 9c (156)
PRI Span: 1 < [1e 02 82 88]
PRI Span: 1 < Progress Indicator (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) 0: 0 Location: Public network serving the local user (2)
PRI Span: 1 < Ext: 1 Progress Description: Inband information or appropriate pattern now available. (8) ]
PRI Span: 1 — Got ACK for N(S)=1 to (but not including) N(S)=1
PRI Span: 1 — T200 requested to stop when not started
PRI Span: 1 T203 requested to start without stopping first
PRI Span: 1 — Starting T203 timer
PRI Span: 1 Received message for call 0x88c92d0 on link 0x85cd9ec TEI/SAPI 0/0
PRI Span: 1 — Processing IE 8 (cs0, Cause)
PRI Span: 1 — Processing IE 30 (cs0, Progress Indicator)
PRI Span: 1 — Found active call: 0x88c92d0 cref:32770
PRI Span: 1 q931.c:8707 post_handle_q931_message: Call 32770 enters state 12 (Disconnect Indication). Hold state: Idle
PRI Span: 1
PRI Span: 1 > TEI: 0 State 7(Multi-frame established)
PRI Span: 1 > V(A)=1, V(S)=1, V(R)=2
PRI Span: 1 > K=7, RC=0, l3_initiated=1, reject_except=0, ack_pend=0
PRI Span: 1 > T200_id=0, N200=3, T203_id=8192
PRI Span: 1 > [ 02 01 01 04 ]
PRI Span: 1 > Supervisory frame:
PRI Span: 1 > SAPI: 00 C/R: 1 EA: 0
PRI Span: 1 > TEI: 000 EA: 1
PRI Span: 1 > Zero: 0 S: 0 01: 1 [ RR (receive ready) ]
PRI Span: 1 > N(R): 002 P/F: 0
PRI Span: 1 > 0 bytes of data
PRI Span: 1 Done handling message for SAPI/TEI=0/0
Span: 1 Processing event: PRI_EVENT_HANGUP_REQ
— Span 1: Channel 0/1 got hangup request, cause 0
PRI Span: 1 q931.c:6837 q931_hangup: Hangup other cref:32770
PRI Span: 1 q931.c:6594 __q931_hangup: ourstate Disconnect Indication, peerstate Disconnect Request, hold-state Idle
PRI Span: 1 q931.c:5703 q931_release: Call 32770 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 2/0×2) (Sent from originator)
PRI Span: 1 > Message Type: RELEASE (77)
PRI Span: 1 TEI=0 Transmitting N(S)=1, window is open V(A)=1 K=7
PRI Span: 1
PRI Span: 1 > TEI: 0 State 7(Multi-frame established)
PRI Span: 1 > V(A)=1, V(S)=1, V(R)=2
PRI Span: 1 > K=7, RC=0, l3_initiated=1, reject_except=0, ack_pend=0
PRI Span: 1 > T200_id=0, N200=3, T203_id=8192
PRI Span: 1 > [ 00 01 02 04 08 02 00 02 4d 08 02 81 90 ]
PRI Span: 1 > Informational frame:
PRI Span: 1 > SAPI: 00 C/R: 0 EA: 0
PRI Span: 1 > TEI: 000 EA: 1
PRI Span: 1 > N(S): 001 0: 0
PRI Span: 1 > N(R): 002 P: 0
PRI Span: 1 > 9 bytes of data
PRI Span: 1 > Protocol Discriminator: Q.931 (8) len=9
PRI Span: 1 > TEI=0 Call Ref: len= 2 (reference 2/0×2) (Sent from 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) ]
PRI Span: 1 — Stopping T203 timer
PRI Span: 1 — Starting T200 timer
Con el debug note que el Carrier no sabía o no identificaba la marcación que yo le estaba envíando por lo que solo agregue la siguiente línea en chan_dahdi.conf:
pridialplan=local
Una vez con esto en el CLI vemos que la llamada ya se establece:
rodman*CLI> console dial 53259000@rodman
== Console is full duplex
— Executing [53259000@rodman:1] Dial(“Console/dsp”, “DAHDI/g0/53259000″) in new stack
— Requested transfer capability: 0×00 – SPEECH
— Called DAHDI/g0/53259000
— DAHDI/i1/53259000-1 is proceeding passing it to Console/dsp
— DAHDI/i1/53259000-1 is ringing
— DAHDI/i1/53259000-1 is making progress passing it to Console/dsp
rodman*CLI> con
config console
rodman*CLI> console hangup
— Hungup ‘DAHDI/i1/53259000-1′
== Spawn extension (rodman, 53259000, 1) exited non-zero on ‘Console/dsp’
<< Hangup on console >>
Les dejo los archivos de configuración.
——————- CHAN_DAHDI.CONF ————————
[trunkgroups]
[channels]
context=default
usecallerid=yes
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
canpark=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=yes
relaxdtmf=yes
rxgain=0.0
txgain=0.0
group=0
callgroup=1
pickupgroup=1
immediate=no
;Sangoma A101 port 1 [slot:4 bus:4 span:1] <wanpipe1>
switchtype=euroisdn
context=from-pstn
group=0
echocancel=yes
signalling=pri_cpe
prilocaldialplan=unknown
pridialplan=local
channel =>1-10
——————- SYSTEM.CONF ————————
loadzone=us
defaultzone=us
#Sangoma A101 port 1 [slot:4 bus:4 span:1] <wanpipe1>
span=1,1,0,ccs,hdb3
bchan=1-10
echocanceller=mg2,1-10
hardhdlc=16
——————- WANPIPE1.CONF ————————
[devices]
wanpipe1 = WAN_AFT_TE1, Comment
[interfaces]
w1g1 = wanpipe1, , TDM_VOICE, Comment
[wanpipe1]
CARD_TYPE = AFT
S514CPU = A
CommPort = PRI
AUTO_PCISLOT = NO
PCISLOT = 4
PCIBUS = 4
FE_MEDIA = E1
FE_LCODE = HDB3
FE_FRAME = NCRC4
FE_LINE = 1
TE_CLOCK = NORMAL
TE_REF_CLOCK = 0
TE_SIG_MODE = CCS
TE_HIGHIMPEDANCE = NO
TE_RX_SLEVEL = 430
LBO = 120OH
FE_TXTRISTATE = NO
MTU = 1500
UDPPORT = 9000
TTL = 255
IGNORE_FRONT_END = NO
TDMV_SPAN = 1
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
[w1g1]
ACTIVE_CH = ALL
TDMV_HWEC = NO
MTU = 8
Versiones utilizadas:
- Elastix 2.2
- Asterisk 1.8.7.0
- DAHDI Version: 2.4.1.2
- WANPIPE Release: 3.5.23
Referencia:
http://lists.digium.com/pipermail/asterisk-users/2005-May/102837.html
Espero les sirva.
@rodman1942