* You are viewing Posts Tagged ‘PSTN’

How To Manage Remote Agents With Queue


I’ve got a small install with Asterisk 11. This box is connected to PSTN through a SIP trunk.

I need to add a cellular phone as a remote agent of an existing queue.

At the moment, this queue is configured according a ringall strategy and busy agent can be dialed.

My plan is :
1- to create a remote-agent context and insert a Wait statement into it so that local agents would get dialed ahead of remote agents.
2- to avoid dialing remote agents already on call (with local phones) by hanging up calls in remote-agent context when conditions are met.
3- use local channels such as Local/123@remote-agent

My questions relate to the above point 2. Though I don’t need at the moment, which state interface can I use to tell Queue application a (SIP) remote agent is Busy or not ?


Dahdi Wait For Dial Tone

Dears, There is a PSTN line shared between 2 asterisk servers, (openvox 4FXO
The outgoing call of the one server may be conflict with the established call of the other one,

is any way to force the Asterisk or Dahdi to dial after hearing the Dial tone ?

Asterisk 11.7.0: Delayed Audio

On connection to an incoming call via PSTN where asterisk [11.7.0] is Dialing an internal extension on answering the call there is about 6-7 seconds before audio is heard on either side.

When looking at the CLI traces when I answer the incoming call that asterisk extensions were dialing, I see immediately upon answering
>0xhexnumber — Probation passed – setting RTP source address to then not until about 6 seconds later I see this
>0xhexnumber — Probation passed – setting RTP source address to and immediately hear audio

what appears to be an issue is that the RTP link(audio) setup is delayed.

Anyone have suggestions on how to fix this issue?


How To Read IRQs And Timing Slips Values


On a Asterisk 1.8.12 system working OK for months (>100k calls proceed), users are complaining for bad audio.

My setup is:
PSTN <--E1/PRI ---> Asterisk <--- E1/PRI---> Siemens HiPath <---E1/PRI
---> PSTN

asterisk -rx “dahdi show version”
DAHDI Version: SVN-trunk-r10414 Echo Canceller: HWEC

asterisk -rx “pri show version”
libpri version: 1.4.12

A quick glance at Asterisk logs shows lines like this:
[2014-01-09 17:19:34] NOTICE[26034]: chan_dahdi.c:3099
my_handle_dchan_exception: PRI got event: HDLC Abort (6) on D-channel of span 1
[2014-01-09 17:19:35] NOTICE[26035]: chan_dahdi.c:3099
my_handle_dchan_exception: PRI got event: HDLC Abort (6) on D-channel of span 2
[2014-01-09 17:19:49] NOTICE[26035]: chan_dahdi.c:3099
my_handle_dchan_exception: PRI got event: HDLC Abort (6) on D-channel of span 2

I read an old thread inviting an admin to check for shared IRQs and timing slips.

My questions are:

1. cat /proc/interrupts ‘s output is:
# cat /proc/interrupts
0: 90147 0 0 0 0
0 0 0 IO-APIC-edge timer
1: 2 0 0 0 0
0 0 0 IO-APIC-edge i8042
8: 0 0 1 0 0
0 0 0 IO-APIC-edge rtc0
9: 0 0 0 0 0
0 0 0 IO-APIC-fasteoi acpi
12: 4 0 0 0 0
0 0 0 IO-APIC-edge i8042
14: 93 0 0 0 0
0 0 0 IO-APIC-edge ata_piix
15: 0 0 0 0 0
0 0 0 IO-APIC-edge ata_piix
16: 3378646209 3378695076 3378691115 3378697362 3378691116 3378706831
3378710635 3378702358 IO-APIC-fasteoi wct2xxp

Can I positively conclude that my Dahdi PRI board IS NOT sharing IRQ (which is good) ?

2. What would you suggest reading the following output ?

cat /proc/dahdi/2
Span 2: TE2/0/2 “T2XXP (PCI) Card 0 Span 2″ (MASTER) HDB3/CCS
Timing slips: 175319

32 TE2/0/2/1 Clear (In use) (EC: VPMOCT064 – INACTIVE)
33 TE2/0/2/2 Clear (In use) (EC: VPMOCT064 – INACTIVE)
34 TE2/0/2/3 Clear (In use) (EC: VPMOCT064 – INACTIVE)
35 TE2/0/2/4 Clear (In use) (EC: VPMOCT064 – INACTIVE)
36 TE2/0/2/5 Clear (In use) (EC: VPMOCT064 – INACTIVE)
37 TE2/0/2/6 Clear (In use) (EC: VPMOCT064 – INACTIVE)
38 TE2/0/2/7 Clear (In use) (EC: VPMOCT064 – INACTIVE)
39 TE2/0/2/8 Clear (In use) (EC: VPMOCT064 – INACTIVE)
40 TE2/0/2/9 Clear (In use) (EC: VPMOCT064 – INACTIVE)
41 TE2/0/2/10 Clear (In use) (EC: VPMOCT064 – INACTIVE)
42 TE2/0/2/11 Clear (In use) (EC: VPMOCT064 – INACTIVE)
43 TE2/0/2/12 Clear (In use) (EC: VPMOCT064 – INACTIVE)
44 TE2/0/2/13 Clear (In use) (EC: VPMOCT064 – INACTIVE)
45 TE2/0/2/14 Clear (In use) (EC: VPMOCT064 – INACTIVE)
46 TE2/0/2/15 Clear (In use) (EC: VPMOCT064 – INACTIVE)
47 TE2/0/2/16 HDLCFCS (In use) (EC: VPMOCT064 – INACTIVE)
48 TE2/0/2/17 Clear (In use) (EC: VPMOCT064 – INACTIVE)
49 TE2/0/2/18 Clear (In use) (EC: VPMOCT064 – INACTIVE)
50 TE2/0/2/19 Clear (In use) (EC: VPMOCT064 – INACTIVE)
51 TE2/0/2/20 Clear (In use) (EC: VPMOCT064 – INACTIVE)
52 TE2/0/2/21 Clear (In use) (EC: VPMOCT064 – INACTIVE)
53 TE2/0/2/22 Clear (In use) (EC: VPMOCT064 – INACTIVE)
54 TE2/0/2/23 Clear (In use) (EC: VPMOCT064 – INACTIVE)
55 TE2/0/2/24 Clear (In use) (EC: VPMOCT064 – INACTIVE)
56 TE2/0/2/25 Clear (In use) (EC: VPMOCT064 – INACTIVE)
57 TE2/0/2/26 Clear (In use) (EC: VPMOCT064 – INACTIVE)
58 TE2/0/2/27 Clear (In use) (EC: VPMOCT064 – INACTIVE)
59 TE2/0/2/28 Clear (In use) (EC: VPMOCT064 – INACTIVE)
60 TE2/0/2/29 Clear (In use) (EC: VPMOCT064 – INACTIVE)
61 TE2/0/2/30 Clear (In use) (EC: VPMOCT064 – INACTIVE)
62 TE2/0/2/31 Clear (In use) (EC: VPMOCT064 – INACTIVE)

3. As shown above, my box has two connections with PSTN (same provider for both): one direct, one through an HiPath PBX. How can I double check timing slips don’t come from “inconsistency between both clock sources” ?
My first thought would be to unplug the link between Asterisk and HiPath and compare two /pro/dahddi/1 outputs. Thoughts ?


Get Data From The SDPof SIP INVITE Message


Hello, all

I’m using Asterisk 11.7, connected to PSTN using SIP trunk.

I’m looking for a way to get data from INVITE‘s SDP. Specifically, i would like to get a value of o= for incoming call from PSTN because it contains data about the operator that the call originates from.

I have googled for a solution and found this patch:
https://issues.asterisk.org/jira/browse/ASTERISK-14510 which looks like exactly what i need, but, unfortunately looks like it was abandoned or forgotten.

The patch is against older version of chan_sip and i don’t know how to apply it against the current version. I’m not enough familiar with chan_sip internals.

Is there any way to do this with the current version of Asterisk?

Thanks in advance!

How To Recognize The Telco Provider On Outgoing Calls Only By Sounds?

Dear list:

When I call an specific number on the PSTN, the provider who holds the destination number give back an specified sound just after admitting their incoming calls. Is there a way to allow Asterisk to compare sounds received to decide what is the Telco answering the call?

I’m planning to do it to select the right provider to route further calls at least cost.

In my country there are no public or accessible information on ported out numbers, so it is a way to discriminate what are the destination’s Telco and build a database.

Thanks in advance!

Elder D. Arohuanca Lima – Peru