* You are viewing Posts Tagged ‘PRI’

AGI Variables Being Wrong

Greetings!

I have the following line in features.conf:

parse => *9,peer/both,AGI,/etc/asterisk/agi/map.pl

What that script does is parsing AGI variables and doing some things based on them, nothing special.

During outgoing call, those variables get messed up. Let’s look at an example: number 404 calls 2010000, it is being routed over PRI line. When ‘agi debug’ is active, one can see what parameters are being fed to script:

AGI Tx >> agi_request:/etc/asterisk/agi/map.pl
AGI Tx >> agi_channel: Zap/63-1
AGI Tx >>agi_language: en
AGI Tx >> agi_type: Zap
AGI Tx >> agi_uniqueid: 1322049810.4307
AGI Tx >> agi_callerid: 0442010000
AGI Tx >>agi_calleridname: unknown
AGI Tx >>agi_callingpres: 3
AGI Tx >>agi_callingani2: 0
AGI Tx >>agi_callington: 0
AGI Tx >>agi_callingtns: 0
AGI Tx >> agi_dnid: 481
AGI Tx >>agi_rdnis: unknown
AGI Tx >>agi_context: from_pstn
AGI Tx >> agi_extension:
AGI Tx >>agi_priority:1
AGI Tx >> agi_enhanced: 0.0
AGI Tx >> agi_accountcode:

Looking at the callerid and dnid being swapped, one can say that for some reason Asterisk sees this call as incoming from PRI (context kind of approves this). I gave it lots of thinking, and the only conclusion I could come to was – it’s because I run my application on ‘peer’. But it’s not a problem, as I could just swap them back in my script. The problem is, as you can see, our dnid is 481, however we are calling from 404. And moreover – each time I try to call, I get different dnid, like 401, 408 and so on. I thought that it could be last called number on PRI – but it is not.

If the call is really incoming (comes from PSTN) – all variables  get passed correctly, and my script is happy. When I issue ‘show channel’ command during active call, I see that variables  are incorrect in Asterisk on A-leg (i.e. SIP/404-someid), and variables are correct on B-leg (i.e. ZAP/63-1 in our example).

Is that some bug, or misconfiguration, or maybe wrong programming?

libpri error??

Hello list,

I have a client who’s taking intermittent errors on their PRI. The server is
configured with one PRI from the TELCO, and two PRI connecting to their Iwatsu
ADIX legacy system. The odd thing is, the system can run for days, weeks or
months without a reported error and then just bomb. The only thing that fixes
it is stopping and starting the services. It then runs well for a random time
period. I’ve upgraded and downgraded software, even tried new hardware and
CentOS 5.x. none of these changes have made a difference.

Now here’s the crazy thing, this system ran fine for a couple years BEFORE a
change in the local provider(from Level 3 to CenturyLink). CL claims that they
do nothing different from Level 3 but we noticed right away that we had to
adjust the pridialplan to get outbound to work. So much for that. I figured
there was a problem with the circuit. So we worked with Sangoma and the Telco
to troubleshoot the problem. After a lot of ordeal, Sangoma cleared the Telco
and said “the problem is most likely in libpri”.

I upgraded libpri to SVN release 2279 and that seemed to be the fix we needed.
We had a couple errors but figured they were in the dialplan, made some
adjustments and it ran clean. We noticed a few errors on the Telco PRI so I
upgraded to libpri 2283.

This time everything ran so clean, we thought our problems were behind us.
Unfortunately for us, this morning everything went haywire. The Iwatsu could
not make internal or outbound calls via the PRI. SIP users on the asterisk
server could not call out and I could not call in. The message was “All
circuits busy”. A quick restart and everything is back.

The TELCO swears it’s not their problem and upgrading libpri to SVN have
seemed to help. I’m hoping someone here can provide some insight.

I have an IDSN pcap from this morning and the relevant log file located here:

http://www.sayso.net/031412/8841.pcap
http://www.sayso.net/031412/asterisk.log

I just realized that debugging was not set in asterisk so this is probably not
enough information to get started. What should I set debug level to next time?
I will do that and turn on debugging on span 1. Anyway, if there’s anything
that can be done now….

Here’s my /etc/dahdi/system.conf
==================================================================
#autogenerated by /usr/sbin/wancfg_dahdi do not hand edit
#autogenrated on 2012-02-29
#Dahdi Channels Configurations
#For detailed Dahdi options, view /etc/dahdi/system.conf.bak
loadzone=us
defaultzone=us

#Sangoma A104 port 1 [slot:4 bus:9 span:1]
span=1,1,0,esf,b8zs
bchan=1-23
echocanceller=HWEC,1-23
hardhdlc=24

#Sangoma A104 port 2 [slot:4 bus:9 span:2]
span=2,2,0,esf,b8zs
bchan=25-47
echocanceller=HWEC,25-47
hardhdlc=48

#Sangoma A104 port 3 [slot:4 bus:9 span:3]
span=3,3,0,esf,b8zs
bchan=49-71
echocanceller=HWEC,49-71
hardhdlc=72

#Sangoma A104 port 4 [slot:4 bus:9 span:4]
span=4,4,0,esf,b8zs
bchan=73-95
echocanceller=HWEC,73-95
hardhdlc=96
==================================================================

/etc/asterisk/chan_dahdi.conf
==================================================================
;autogenerated by /usr/sbin/wancfg_dahdi do not hand edit
;autogenrated on 2012-02-29
;Dahdi Channels Configurations
;For detailed Dahdi options, view /etc/asterisk/chan_dahdi.conf.bak

[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=1
callgroup=1
pickupgroup=1
immediate=no

; Required for Embarq / CenturyTel
pridialplan=unknown
prilocaldialplan=local
priindication=outofband
priexclusive=no

;Sangoma A104 port 1 [slot:4 bus:9 span:1]
switchtype=national
context=from-pstn
group=0
echocancel=yes
signalling=pri_cpe
channel =>1-23

;Sangoma A104 port 2 [slot:4 bus:9 span:2]
switchtype=national
context=from-internal
group=1
echocancel=yes
signalling=pri_net
channel =>25-47

;Sangoma A104 port 3 [slot:4 bus:9 span:3]
switchtype=national
context=from-internal
group=2
echocancel=yes
signalling=pri_net
channel =>49-71

;Sangoma A104 port 4 [slot:4 bus:9 span:4]
switchtype=national
context=from-internal
group=3
echocancel=yes
signalling=pri_net
channel =>73-95
==================================================================

/etc/wanpipe/wanpipe1.conf
==================================================================
#================================================
# WANPIPE1 Configuration File
#================================================
#
# Date: Wed Dec 6 20:29:03 UTC 2006
#
# Note: This file was generated automatically
# by /usr/local/sbin/setup-sangoma program.
#
# If you want to edit this file, it is
# recommended that you use wancfg program
# to do so.
#================================================
# Sangoma Technologies Inc.
#================================================

[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 = 9
FE_MEDIA = T1
FE_LCODE = B8ZS
FE_FRAME = ESF
FE_LINE = 1
TE_CLOCK = NORMAL
TE_REF_CLOCK = 0

TE_HIGHIMPEDANCE = NO
TE_RX_SLEVEL = 360
HW_RJ45_PORT_MAP = DEFAULT
LBO = 0DB
FE_TXTRISTATE = NO
MTU = 1500
UDPPORT = 9000
TTL = 255
IGNORE_FRONT_END = NO
TDMV_SPAN = 1
TDMV_DCHAN = 24
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 = YES
MTU = 8
==================================================================

Installed Software
==================================================================
asterisk-1.4.43-1.C4.SC
asterisk-addons-1.4.13-1.C4.LSE
asterisk-core-sounds-en-wav-1.4.21-1.C4.SC
asterisk-devel-1.4.43-1.C4.SC
asterisk-extra-sounds-en-gsm-1.4.11-2.C4.LSE
asterisk-libpri-2283-1svn.C4.SC
asterisk-perl-1.01-1.C4.LSE
dahdi-linux-2.6.0-2.6.9_103.plus.c4.LSE.1smp_3.C4.SC
dahdi-tools-2.6.0-2.C4.SC
iaxmodem-static-1.2.0-1.C4.SC
kernel-smp-2.6.9-103.plus.c4.LSE.1
kernel-utils-2.4-23.el4
wanpipe-3.5.25-1.SC
wanpipe-modules-3.5.25-kernel.2.6.9.103.plus.c4.LSE.1smp.dahdi.2.6.0_1.SC
==================================================================

Thank you,

Installing Dahdi, libpri of different versions in one pc

Hi,

I would like to install Dahdi, libpri and Asterisk of different versions in
one machine. Lets say, Asterisk 1.6.X, Asterisk 1.8.x and Asterisk 1.4.x to
be installed in one machine, this can be done using prefix while building
configure.

For dahdi, libpri can it be done in same way? Because I need to test
telephony cards (PRI, BRI, GSM & Transcoding) with different versions of
Asterisk, libpri and Dahdi, I can’t remove and install again of each
versions since it is time consuming, sicne there are lot of versions
available.

Any comments would be appreciated.

Thanks.

DAHDISendCallreroutingFacility

Hi
I installed Asterisk 1.8.7 with CD ISO(Elastix 2.2)
I want to use DAHDISendCallreroutingFacility Application on a PRI link(LIBPRI Already installed).
according to
https://wiki.asterisk.org/wiki/display/AST/New+in+1.8
Asterisk 1.8 include this application but I cannot see it with “core show applications”
Do I need to install mISDN or other modules for using that ?

Regards
M.Shirazi

Problem with libpri / asterisk

Hi all !

We currently have an asterisk box that is rather old (runs Asterisk
1.4.21.2), and it’s connected to the PSTN with a sangoma A104d card.

Now we have a new PRI at another location, and I use that occasion to
build 2 new servers, one to replace our aging one and a new one for this new
pri.

So I downloaded the lastest libpri / asterisk / wanpipe driver, but the
previous version of dahdi (2.5), since the latest wanpipe isn’t compatible
with dahdi 2.6. All is built from source

Now, all seems to be working OK. I can connect a SIP phone to my new box,
make calls to the outside, receive calls etc.

But, I can’t seem to bridge a call. So on my new server, with the new PRI, I
got a Sangoma a104 card (no echo-canceler on this one).

In my extensions.ael, I got this :

418nxxxxx1 => {
Answer();
Wait (2);
Playback(demo-thanks);
Dial(${TRUNK}/418nxxxxx2);
};

TRUNK is DAHDI/G1

Where 418nxxxxx1 is a DID on my new PRI and 418nxxxxx2 is my cellphone
number.

When I do a call from my home phone or cell phone to my new PRI to
418nxxxxx1, I hear the demo-thanks file, and then it dials out. My cellphone
rings, but as soon as I pick up the call, the calls hangs up :