Asterisk, ISDN, and the hidden zero

tnarg.retrac

Active Member
Joined
Jun 1, 2011
Messages
63
Reaction score
1
Location
Slaapstad
Hi everyone

I am hoping that an asterisk guru can please point me in the right direction here. I have 2 BRI ISDN lines connected to a B410P card. I can make and receive calls to all numbers except the short dial codes e.g. 1023. From what I can see, the issue has to do with a hidden leading zero in the number dialled.

Looking at the logs, herewith a successful local call:
-- Executing [s@macro-dialout-trunk:19] Dial("SIP/4866-00000003", "DAHDI/g0/21XXXXXXX,300,") in new stack
-- Requested transfer capability: 0x00 - SPEECH
-- Called g0/21XXXXXXX
-- DAHDI/1-1 is proceeding passing it to SIP/4866-00000003
-- DAHDI/1-1 is ringing
-- Hungup 'DAHDI/1-1'​


and for a short code:
-- Executing [s@macro-dialout-trunk:19] Dial("SIP/4866-00000004", "DAHDI/g0/1023,300,") in new stack
-- Requested transfer capability: 0x00 - SPEECH
-- Called g0/1023
-- DAHDI/1-1 is proceeding passing it to SIP/4866-00000004
-- Channel 0/1, span 1 got hangup request, cause 28
-- Hungup 'DAHDI/1-1'
== Everyone is busy/congested at this time (1:0/0/1)​


From what I can determine, there is a leading zero that is placed in front of the dial string as DAHDI/g0/21XXXXXXX dials correctly. It would explain why DAHDI/g0/1023 fails as dialing 01023 would be an invalid number. If I configure my route/trunk to present DAHDI/g0/021XXXXXXX, the call fails in exactly the same way as the 1023 example above.

I would be happy to post any config files needed, but at this stage am looking for a few pointers of where next to look. I am using Trixbox on Asterisk 1.6.0.26.

Many thanks
Grant
 
What does your outbound route rule look like?
Any rules in the trunk?
 
What does your outbound route rule look like?
Any rules in the trunk?

Currently the outbound route rules is " 0|. " to strip off the "dial zero to get an outside line" zero :)
I have had to include a trunk rule " 0|. " to strip off the zero of the area code otherwise. If I don't do this, I get the same error as dialing 1023 above.
 
Well there's your problem.
You're stripping off the "dial 0 for an outside line" in your outbound route.
But then you're stripping the leading 0 (if it exists) off all numbers going out your trunk too.

The solution is to keep the 0|. in your outbound route, and remove the 0|. from your trunk.

Remember, in the outbound route, a rule is used to decide what number matches that route, whereas with a trunk, its processed before sending the call on to the endpoint.
 
Hi Daffy

You are right - only 1 "zero" should be stripped off the dialed number and that should be to get an outside line. The rest of the number should be presented to the ISDN interface. And herein lies my problem:

If I do as you suggest, no outbound calls can complete and I get an "all circuits are busy error message". Logs are below (actual dialed number changed for privacy):

-- Executing [s@macro-dialout-trunk:19] Dial("SIP/4866-00000004", "DAHDI/g0/0215551234,300,") in new stack
-- Requested transfer capability: 0x00 - SPEECH
-- Called g0/0215551234
-- DAHDI/1-1 is proceeding passing it to SIP/4866-00000004
-- Channel 0/1, span 1 got hangup request, cause 28
-- Hungup 'DAHDI/1-1'
== Everyone is busy/congested at this time (1:0/0/1)

But, if I only present "DAHDI/g0/215551234,300," (note the missing zero), the call completes.

What am i missing? TIA
 
Can you show me your Dahdi config for that ISDN line?
 
Code:
[trixbox dahdi]# cat /etc/dahdi/system.conf
# Autogenerated by /usr/sbin/dahdi_genconf on Fri Jul 22 17:01:04 2011
# If you edit this file and execute /usr/sbin/dahdi_genconf again,
# your manual changes will be LOST.
# Dahdi Configuration File
#
# This file is parsed by the Dahdi Configurator, dahdi_cfg
#
# Span 1: B4/0/1 "B4XXP (PCI) Card 0 Span 1" (MASTER) AMI/CCS
span=1,1,0,ccs,ami
# termtype: te
bchan=1-2
hardhdlc=3
echocanceller=mg2,1-2

# Span 2: B4/0/2 "B4XXP (PCI) Card 0 Span 2" AMI/CCS
span=2,2,0,ccs,ami
# termtype: te
bchan=4-5
hardhdlc=6
echocanceller=mg2,4-5

# Span 3: B4/0/3 "B4XXP (PCI) Card 0 Span 3" AMI/CCS RED
span=3,3,0,ccs,ami
# termtype: te
bchan=7-8
hardhdlc=9
echocanceller=mg2,7-8

# Span 4: B4/0/4 "B4XXP (PCI) Card 0 Span 4" AMI/CCS RED
span=4,4,0,ccs,ami
# termtype: te
bchan=10-11
hardhdlc=12
echocanceller=mg2,10-11

# Global data

loadzone        = za
defaultzone     = za

Code:
[trixbox asterisk]# cat dahdi-channels.conf
; Autogenerated by /usr/sbin/dahdi_genconf on Fri Jul 22 17:01:04 2011
; If you edit this file and execute /usr/sbin/dahdi_genconf again,
; your manual changes will be LOST.
; Dahdi Channels Configurations (chan_dahdi.conf)
;
; This is not intended to be a complete chan_dahdi.conf. Rather, it is intended
; to be #include-d by /etc/chan_dahdi.conf that will include the global settings
;

; Span 1: B4/0/1 "B4XXP (PCI) Card 0 Span 1" (MASTER) AMI/CCS
group=0,11
context=from-pstn
switchtype = euroisdn
signalling = bri_cpe_ptmp
channel => 1-2
group = 63

; Span 2: B4/0/2 "B4XXP (PCI) Card 0 Span 2" AMI/CCS
group=0,12
context=from-pstn
switchtype = euroisdn
signalling = bri_cpe_ptmp
channel => 4-5
group = 63

; Span 3: B4/0/3 "B4XXP (PCI) Card 0 Span 3" AMI/CCS RED
group=0,13
context=from-pstn
switchtype = euroisdn
signalling = bri_cpe_ptmp
channel => 7-8
group = 63

; Span 4: B4/0/4 "B4XXP (PCI) Card 0 Span 4" AMI/CCS RED
group=0,14
context=from-pstn
switchtype = euroisdn
signalling = bri_cpe_ptmp
channel => 10-11
group = 63

Do you need any others?
 
have you tried editing chan_dahdi.conf and setting "pridialplan=unknown" ? Alternatively, put in all the different prefixes, but it's easier to leave the prefixes blank and set the dialplan to unknown
 
Top
Sign up to the MyBroadband newsletter
X