[asterisk-users] Dialtone when automatically picking up.
Peter Hessler
phessler at theapt.org
Wed Jul 25 16:05:34 CDT 2007
I'm in the process of setting up a 'phone tree', and are running into
some problems. My goal is for users to dial a phone number, the
asterisk system picks it up, plays the greeting, and users can type
whatever they want into the system.
What actually happens is users dial the phone number, asterisk picks up
and additionally goes off-hook on another line, plays the greeting and
the dialtone over the incoming channel, drops some keypresses (seems to
only acknowledge the 2nd digit of any length key press), plays
'invalid', loops back to the beginning (re-plays the message, etc) and
now behaves normally (no dial tone, accepts all keypresses, etc). When
you use a local phone to dial out-in, you can call 3 digit numbers
(which are dialed 'underneath' asterisk), but if you aren't using a local
SIP client, then the system does not send the keypresses to the outside
line. If the dialplan is to Dial() a number, everything works the way I
expect.
I essentially copied my dialplan out of the Asterisk: TFOT book, and
everything seems sane. I've included the relevant parts of my config,
and a verbose watch of the call below. More information is available,
please let me know.
The hardware is a Sangoma Remora+Shark card, with inbound POTS/PSTN
analog lines connected to FXO cards. My testing methodology is both
using a SIP client to dial the inbound line (therefore going outbound
to the Phone Company, then back in), and by using a cell phone to dial
in.
Asterisk 1.2.22 on CentOS 5.0. kernel 2.6.18-8.el5. Zaptel drivers are
at 1.4.4, WANPIPE drivers are at 2.3.4-12.
==== configs and debug ====
$ cat zapata.conf
;autogenerated by /usr/local/sbin/config-zaptel do not hand edit
;Zaptel Channels Configurations (zapata.conf)
;
;For detailed zapata options, view /etc/asterisk/zapata.conf.orig
[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
rxgain=0.0
txgain=0.0
group=1
callgroup=1
pickupgroup=1
immediate=no
;Sangoma A200 [slot:6 bus:1 span:1]
context=from-zaptel
group=0
signalling = fxs_ks
channel => 3
context=from-zaptel
group=0
signalling = fxs_ks
channel => 4
context=from-zaptel
group=0
signalling = fxs_ks
channel => 5
context=from-zaptel
group=0
signalling = fxs_ks
channel => 6
context=from-zaptel
group=0
signalling = fxs_ks
channel => 7
context=from-zaptel
group=0
signalling = fxs_ks
channel => 8
; this is the fax line, take it out of the regular pool
context=from-fax-line
group=1
signalling = fxs_ks
channel => 9
context=from-zaptel
group=0
signalling = fxs_ks
channel => 10
context=from-zaptel
group=0
signalling = fxs_ks
channel => 11
context=from-zaptel
group=0
signalling = fxs_ks
channel => 12
=== end of zapata.conf ===
$ cat extensions.conf
[globals]
PHESSLER=SIP/phessler
FAXMACHINE=SIP/faxmachine
OUTBOUNDTRUNK=Zap/g0
;; inbound faxes
[from-fax-line]
exten => s,1,Dial(${FAXMACHINE},20)
exten => s,n,Hangup()
;; define a macro to handle everyone the same
;; this way we only have to update one place
;; call it with 'Macro(user,${USERNAME})
[macro-user]
exten => s,1,Dial(${ARG1},20,r)
exten => s,n,Playback(vm-nobodyavail)
exten => s,n,Hangup()
[user-phone-tree]
exten => 305,1,Macro(user,${PHESSLER})
;; from POTS/PSTN
[from-zaptel]
exten => s,1,Answer()
exten => s,n,NoOp(DID is ${DID})
exten => s,n,Background(enter-ext-of-person)
exten => s,n,WaitExten(10)
;; let someone from the outside dial our extension directly
include => user-phone-tree
;; invalid entrys
exten => i,1,Playback(pbx-invalid)
exten => i,2,Goto(from-zaptel,s,1)
exten => t,1,Playback(vm-goodbye)
exten => t,2,Hangup()
=== end of extensions.conf ===
$ asterisk -r
asterisk1*CLI> set verbose 12
Verbosity is at least 12
asterisk1*CLI>
-- Starting simple switch on 'Zap/10-1'
-- Executing Answer("Zap/10-1", "") in new stack
-- Executing NoOp("Zap/10-1", "DID is ") in new stack
-- Executing BackGround("Zap/10-1", "enter-ext-of-person") in new stack
-- Playing 'enter-ext-of-person' (language 'en')
-- Executing WaitExten("Zap/10-1", "10") in new stack
;; dialed '305' from the calling phone
-- Invalid extension '0' in context 'from-zaptel' on Zap/10-1
== CDR updated on Zap/10-1
-- Executing Playback("Zap/10-1", "pbx-invalid") in new stack
-- Playing 'pbx-invalid' (language 'en')
-- Executing Goto("Zap/10-1", "from-zaptel|s|1") in new stack
-- Goto (from-zaptel,s,1)
-- Executing NoOp("Zap/10-1", "DID is ") in new stack
-- Executing BackGround("Zap/10-1", "enter-ext-of-person") in new stack
-- Playing 'enter-ext-of-person' (language 'en')
-- Executing WaitExten("Zap/10-1", "10") in new stack
-- Hungup 'Zap/10-1'
asterisk1*CLI>
--
"Cleveland? Yes, I spent a week there one day."
More information about the asterisk-users
mailing list