TE420 with DAHDI - Outgoing calls not working through E1 PRI

Hi All,

I have installed TE420 on Asterisk Box with DAHDI. When I dial my PRI number then I can see my call on asterisk but when I am making calls from my asterisk box then it is not working. Please help…

Open Source Asterisk-1.4.22.2
dahdi-linux-complete-2.2.0.2+2.2.0
libpri-1.4.10.1

Operating System - Red Hat Enterprise Linux Server release 5.3 (Tikanga)
Kernel - 2.6.18-128.el5
RAM - 1GB

E1 PRI working perfectly fine… get it tested with provider twice…

/etc/dahdi/system.conf

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

/etc/asterisk/chan_dahdi.conf

[trunkgroups]

[channels]
context=airtel
switchtype=euroisdn
;pridialplan=unknown
;prilocaldialplan=unknown
;overlapdial=yes
signalling=pri_cpe
;rxwink=300 ; Atlas seems to use long (250ms) winks
usecallerid=yes
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
;transfer=yes
canpark=yes
cancallforward=yes
callreturn=yes
echocancel=no
echocancelwhenbridged=no
rxgain=0.0
txgain=0.0
group=1
callgroup=1
pickupgroup=1
immediate=no
channel => 1-15,17-31

/etc/asterisk/extensions.conf

[airtel]
exten => 111,1,Answer()
exten => 111,n,Dial(DAHDI/g1/9873375720)
exten => 111,n,Hangup()
exten => s,1,Answer()
exten => s,n,StartMusicOnHold()
exten => s,n,Wait(40)
exten => s,n,StopMusicOnHold()
exten => s,n,Hangup()

/etc/asterisk/sip.conf

[general]
context=default
allowoverlap=no
bindport=5060
bindaddr=0.0.0.0
srvlookup=yes

[authentication]

[9000]
host=dynamic
nat=yes
type=friend
call-limit=4
context=airtel
username=9000
secret=9000
dtmfmode=inband
dtmf=inband
;dtmfmode=rfc2833
canreinvite=no
disallow=all
;allow=ulaw
;allow=alaw
;allow=gsm
;allow=g729
allow=all

I have registered extension 9000 on x-lite and when i make call by dialing 111 then it gave me following on CLI>

– Executing [111@airtel:1] Answer(“SIP/9000-0844e2b8”, “”) in new stack
– Executing [111@airtel:2] Dial(“SIP/9000-0844e2b8”, “DAHDI/g1/9873375720”) in new stack
– Making new call for cr 32772
– Requested transfer capability: 0x00 - SPEECH

Protocol Discriminator: Q.931 (8) len=37
Call Ref: len= 2 (reference 4/0x4) (Originator)
Message type: SETUP (5)
[04 03 80 90 a3]
Bearer Capability (len= 5) [ Ext: 1 Q.931 Std: 0 Info transfer capability: Speech (0)
Ext: 1 Trans mode/rate: 64kbps, circuit-mode (16)
User information layer 1: A-Law (35)
[18 03 a9 83 81]
Channel ID (len= 5) [ Ext: 1 IntID: Implicit PRI Spare: 0 Exclusive Dchan: 0
ChanSel: As indicated in following octets
Ext: 1 Coding: 0 Number Specified Channel Type: 3
Ext: 1 Channel: 1 ]
[6c 06 21 80 39 30 30 30]
Calling Number (len= 8) [ Ext: 0 TON: National Number (2) NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1)
Presentation: Presentation permitted, user number not screened (0) ‘9000’ ]
[70 0b a1 39 38 37 33 33 37 35 37 32 30]
Called Number (len=13) [ Ext: 1 TON: National Number (2) NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1) ‘9873375720’ ]
[a1]
Sending Complete (len= 1)
q931.c:3134 q931_setup: call 32772 on channel 1 enters state 1 (Call Initiated)
– Called g1/9873375720
< Protocol Discriminator: Q.931 (8) len=10
< Call Ref: len= 2 (reference 4/0x4) (Terminator)
< Message type: CALL PROCEEDING (2)
< [18 03 a9 83 81]
< Channel ID (len= 5) [ Ext: 1 IntID: Implicit PRI Spare: 0 Exclusive Dchan: 0
< ChanSel: As indicated in following octets
< Ext: 1 Coding: 0 Number Specified Channel Type: 3
< Ext: 1 Channel: 1 ]
– Processing IE 24 (cs0, Channel Identification)
q931.c:3683 q931_receive: call 32772 on channel 1 enters state 3 (Outgoing call Proceeding)
– DAHDI/1-1 is proceeding passing it to SIP/9000-0844e2b8
< Protocol Discriminator: Q.931 (8) len=34
< Call Ref: len= 2 (reference 4/0x4) (Terminator)
< Message type: DISCONNECT (69)
< [08 02 82 9f]
< Cause (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) Spare: 0 Location: Public network serving the local user (2)
< Ext: 1 Cause: Normal, unspecified (31), class = Normal Event (1) ]
< [1c 0f 91 a1 0c 02 02 02 a8 06 06 04 00 87 69 01 07]
< Facility (len=17, codeset=0) [ 0x91, 0xA1, 0x0C, 0x02, 0x02, 0x02, 0xA8, 0x06, 0x06, 0x04, 0x00, 0x87, ‘i’, 0x01, 0x07 ]
PROTOCOL 11
A1 000C (CONTEXT SPECIFIC [1])
02 0002 02 A8 (INTEGER: 680)
06 0006 04 00 87 69 01 07 (OBJECTIDENTIFIER: 04 00 87 69 01 07)
< [1e 02 82 88]
< Progress Indicator (len= 4) [ 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) ]
< [1e 02 82 82]
< Progress Indicator (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) 0: 0 Location: Public network serving the local user (2)
< Ext: 1 Progress Description: Called equipment is non-ISDN. (2) ]
– Processing IE 8 (cs0, Cause)
– Processing IE 28 (cs0, Facility)
Handle Q.932 ROSE Invoke component
– Processing IE 30 (cs0, Progress Indicator)
– Processing IE 30 (cs0, Progress Indicator)
q931.c:3826 q931_receive: call 32772 on channel 1 enters state 12 (Disconnect Indication)
– Channel 0/1, span 1 got hangup request, cause 31
NEW_HANGUP DEBUG: Calling q931_hangup, ourstate Disconnect Indication, peerstate Disconnect Request
q931.c:2967 q931_release: call 32772 on channel 1 enters state 19 (Release Request)
Protocol Discriminator: Q.931 (8) len=9
Call Ref: len= 2 (reference 4/0x4) (Originator)
Message type: RELEASE (77)
[08 02 81 9f]
Cause (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) Spare: 0 Location: Private network serving the local user (1)
Ext: 1 Cause: Normal, unspecified (31), class = Normal Event (1) ]
– Hungup ‘DAHDI/1-1’
== Everyone is busy/congested at this time (1:0/0/1)
– Executing [111@airtel:3] Hangup(“SIP/9000-0844e2b8”, “”) in new stack
== Spawn extension (airtel, 111, 3) exited non-zero on 'SIP/9000-0844e2b8’
cdr_odbc: Query Successful!
< Protocol Discriminator: Q.931 (8) len=5
< Call Ref: len= 2 (reference 4/0x4) (Terminator)
< Message type: RELEASE COMPLETE (90)
q931.c:3766 q931_receive: call 32772 on channel 1 enters state 0 (Null)
NEW_HANGUP DEBUG: Calling q931_hangup, ourstate Null, peerstate Null
NEW_HANGUP DEBUG: Destroying the call, ourstate Null, peerstate Null
Really destroying SIP dialog ‘ZDdjY2FhM2Q4ZTgzNWQxZmExZjAzMDY2ZGNiMzg2Mzc.’ Method: ACK

If i do pri show span then i get the following =>

Primary D-channel: 16
Status: Provisioned, Up, Active
Switchtype: EuroISDN
Type: CPE
Window Length: 0/7
Sentrej: 0
SolicitFbit: 1
Retrans: 0
Busy: 0
Overlap Dial: 0
Logical Channel Mapping: 0
T200 Timer: 1000
T203 Timer: 10000
T305 Timer: 30000
T308 Timer: 4000
T309 Timer: -1
T313 Timer: 4000
N200 Counter: 3

If I do dahdi show status then it gave following =>

Description Alarms IRQ bpviol CRC4
T4XXP (PCI) Card 0 Span 1 OK 0 0 0
T4XXP (PCI) Card 0 Span 2 UNCONFIGUR 0 0 0
T4XXP (PCI) Card 0 Span 3 UNCONFIGUR 0 0 0
T4XXP (PCI) Card 0 Span 4 UNCONFIGUR 0 0 0

Any help will be highly appreciated…

pridialplan=unknown ? change to local or national to try.

Thanks James for your interest.

I tried that but that didn’t help…

but i found my one mistake that i was sending wrong calling number and I corrected that but still it is not working…

First Message Type I got is Setup then Processing and then Disconnect from Q.931 with Cause 31…

I don’t understand why I am getting this…

Any help will be appreciated…!

Hi All,

regarding this issue I talked with my provider and they said they are not getting digits at their end and they said there is some issue at our and i am also getting “Unable to forward voice or dtmf”

Here are the asterisk cli logs while making calls…

– Executing [9873375720@airtel:1] Answer(“SIP/5000-b750ce88”, “”) in new stack
– Executing [9873375720@airtel:2] Wait(“SIP/5000-b750ce88”, “1”) in new stack
– Executing [9873375720@airtel:3] Set(“SIP/5000-b750ce88”, “CALLERID(number)=1204036500”) in new stack
– Executing [9873375720@airtel:4] Dial(“SIP/5000-b750ce88”, “DAHDI/g1/9873375720”) in new stack
– Making new call for cr 32791
– Requested transfer capability: 0x00 - SPEECH

Protocol Discriminator: Q.931 (8) len=43
Call Ref: len= 2 (reference 23/0x17) (Originator)
Message type: SETUP (5)
[04 03 80 90 a3]
Bearer Capability (len= 5) [ Ext: 1 Q.931 Std: 0 Info transfer capability: Speech (0)
Ext: 1 Trans mode/rate: 64kbps, circuit-mode (16)
User information layer 1: A-Law (35)
[18 03 a9 83 83]
Channel ID (len= 5) [ Ext: 1 IntID: Implicit PRI Spare: 0 Exclusive Dchan: 0
ChanSel: As indicated in following octets
Ext: 1 Coding: 0 Number Specified Channel Type: 3
Ext: 1 Channel: 3 ]
[6c 0c 21 80 31 32 30 34 30 33 36 35 30 30]
Calling Number (len=14) [ Ext: 0 TON: National Number (2) NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1)
Presentation: Presentation permitted, user number not screened (0) ‘1204036500’ ]
[70 0b a1 39 38 37 33 33 37 35 37 32 30]
Called Number (len=13) [ Ext: 1 TON: National Number (2) NPI: ISDN/Telephony Numbering Plan (E.164/E.163) (1) ‘9873375720’ ]
[a1]sk-pri*CLI>
Sending Complete (len= 1)
q931.c:3134 q931_setup: call 32791 on channel 3 enters state 1 (Call Initiated)
– Called g1/9873375720
< Protocol Discriminator: Q.931 (8) len=10
< Call Ref: len= 2 (reference 23/0x17) (Terminator)
< Message type: CALL PROCEEDING (2)
< [18 03 a9 83 83]
< Channel ID (len= 5) [ Ext: 1 IntID: Implicit PRI Spare: 0 Exclusive Dchan: 0
< ChanSel: As indicated in following octets
< Ext: 1 Coding: 0 Number Specified Channel Type: 3
< Ext: 1 Channel: 3 ]
– Processing IE 24 (cs0, Channel Identification)
q931.c:3683 q931_receive: call 32791 on channel 3 enters state 3 (Outgoing call Proceeding)
– DAHDI/3-1 is proceeding passing it to SIP/5000-b750ce88
< Protocol Discriminator: Q.931 (8) len=34
< Call Ref: len= 2 (reference 23/0x17) (Terminator)
< Message type: DISCONNECT (69)
< [08 02 82 9f]
< Cause (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) Spare: 0 Location: Public network serving the local user (2)
< Ext: 1 Cause: Normal, unspecified (31), class = Normal Event (1) ]
< [1c 0f 91 a1 0c 02 02 03 15 06 06 04 00 87 69 01 07]
< Facility (len=17, codeset=0) [ 0x91, 0xA1, 0x0C, 0x02, 0x02, 0x03, 0x15, 0x06, 0x06, 0x04, 0x00, 0x87, ‘i’, 0x01, 0x07 ]
PROTOCOL 11
A1 000C (CONTEXT SPECIFIC [1])
02 0002 03 15 (INTEGER: 789)
06 0006 04 00 87 69 01 07 (OBJECTIDENTIFIER: 04 00 87 69 01 07)
< [1e 02 82 88]
< Progress Indicator (len= 4) [ 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) ]
< [1e 02 82 82]
< Progress Indicator (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) 0: 0 Location: Public network serving the local user (2)
< Ext: 1 Progress Description: Called equipment is non-ISDN. (2) ]
– Processing IE 8 (cs0, Cause)
– Processing IE 28 (cs0, Facility)
Handle Q.932 ROSE Invoke component
– Processing IE 30 (cs0, Progress Indicator)
– Processing IE 30 (cs0, Progress Indicator)
q931.c:3826 q931_receive: call 32791 on channel 3 enters state 12 (Disconnect Indication)
– Channel 0/3, span 1 got hangup request, cause 31
[Sep 10 13:54:30] WARNING[10074]: app_dial.c:754 wait_for_answer: Unable to forward voice or dtmf
NEW_HANGUP DEBUG: Calling q931_hangup, ourstate Disconnect Indication, peerstate Disconnect Request
q931.c:2967 q931_release: call 32791 on channel 3 enters state 19 (Release Request)
Protocol Discriminator: Q.931 (8) len=9
Call Ref: len= 2 (reference 23/0x17) (Originator)
Message type: RELEASE (77)
[08 02 81 9f]
Cause (len= 4) [ Ext: 1 Coding: CCITT (ITU) standard (0) Spare: 0 Location: Private network serving the local user (1)
Ext: 1 Cause: Normal, unspecified (31), class = Normal Event (1) ]
– Hungup ‘DAHDI/3-1’
== Everyone is busy/congested at this time (1:0/0/1)
– Executing [9873375720@airtel:5] NoOp(“SIP/5000-b750ce88”, “CHANUNAVAIL”) in new stack
– Executing [9873375720@airtel:6] NoOp(“SIP/5000-b750ce88”, “31”) in new stack
– Executing [9873375720@airtel:7] Hangup(“SIP/5000-b750ce88”, “”) in new stack
== Spawn extension (airtel, 9873375720, 7) exited non-zero on 'SIP/5000-b750ce88’
cdr_odbc: Query Successful!
< Protocol Discriminator: Q.931 (8) len=5
< Call Ref: len= 2 (reference 23/0x17) (Terminator)
< Message type: RELEASE COMPLETE (90)
q931.c:3766 q931_receive: call 32791 on channel 3 enters state 0 (Null)
NEW_HANGUP DEBUG: Calling q931_hangup, ourstate Null, peerstate Null
NEW_HANGUP DEBUG: Destroying the call, ourstate Null, peerstate Null

Any help will be highly appreciated…!

Thanks guys…

Finally I got the solution…

I had to enable inbanddisconnect=yes and stop the asterisk and start it again and everything works now… :slight_smile:

But now I have one issue.

When I make call from my SIP phone to my mobile phone. The call is going through but if I hang up the call from SIP phone then disconnection is proper but if i disconnect the call from my mobile phone not from SIP phone then I have to disconnect the call manually from my SIP phone.

That seems asterisk is not receiving disconnection from PSTN.

Is there any setting I have to make to receive proper disconnection?

Any help will be highly appreciated…!