Re: [asterisk-users] 9 becomes 99 ? And other strangeness

2006-09-15 Thread Brian Candler
On Thu, Sep 14, 2006 at 10:37:59AM -0500, Rich Adamson wrote:
 Try the above an see what the result is. If it does not address the 
 problem, at least one item has been removed from the list of 
 possibilities. ;)

OK, I can now replicate this without using outbound dialing at all, with a
tiny dialplan (attached). I've turned on dtmf logging in logger.conf, and
it's definitely a DTMF problem.

What happens if I dial 611: around 30% of the time it says I'm sorry,
that is not a valid extension, thinking I've dialled 6611. The rest of the
time it works, and I get Hello, world!

Here's what I see on the console when it fails:

   -- Starting simple switch on 'Zap/1-1'
[Sep 15 09:48:00] DTMF[5744]: channel.c:2065 __ast_read: DTMF end '6' received 
on Zap/1-1
[Sep 15 09:48:00] DTMF[5744]: channel.c:2065 __ast_read: DTMF end '6' received 
on Zap/1-1
[Sep 15 09:48:01] DTMF[5744]: channel.c:2065 __ast_read: DTMF end '1' received 
on Zap/1-1
[Sep 15 09:48:01] DTMF[5744]: channel.c:2065 __ast_read: DTMF end '1' received 
on Zap/1-1
-- Executing [EMAIL PROTECTED]:1] Answer(Zap/1-1, ) in new stack
-- Executing [EMAIL PROTECTED]:2] Playback(Zap/1-1, pbx-invalid) in new 
stack
-- Playing 'pbx-invalid' (language 'en')
-- Executing [EMAIL PROTECTED]:3] Goto(Zap/1-1, s|1) in new stack
-- Goto (internal,s,1)
[Sep 15 09:48:08] WARNING[5744]: pbx.c:2322 __ast_pbx_run: Channel 'Zap/1-1' 
sent into invalid extension 's' in context 'internal', but no invalid handler
-- Hungup 'Zap/1-1'

So my single 6 is read as 66.

Searching the web, the only tweak I can see is to set relaxdtmf=yes in
zapata.conf for each channel. I've now tried that, and if anything, it made
it worse: I got a failure rate of about 50%, and in one case 66611 instead
of 611.

So I'm a bit stuck as to what to do now. My /etc/asterisk/zapata.conf and
/etc/zaptel.conf are also attached for reference.

The only things I can think of:

(1) line level needs tweaking? Is there a way to measure the incoming level
when I dial DTMF, to see if it's too low or is clipping?

(2) I get the following error when first loading the wctdm driver, and I
don't know if it's a problem

-
[EMAIL PROTECTED] asterisk]# modprobe zaptel
[EMAIL PROTECTED] asterisk]# modprobe wctdm
Notice: Configuration file is /etc/zaptel.conf
line 0: Unable to open master device '/dev/zap/ctl'

1 error(s) detected

FATAL: Error running install command for wctdm
-

However it seems to work on second attempt:

-
[EMAIL PROTECTED] asterisk]# modprobe wctdm
[EMAIL PROTECTED] asterisk]# ztcfg -vv

Zaptel Version: SVN-trunk-r1459
Echo Canceller: MG2
Configuration
==


Channel map:

Channel 01: FXO Kewlstart (Default) (Slaves: 01)
Channel 02: FXO Kewlstart (Default) (Slaves: 02)
Channel 04: FXS Kewlstart (Default) (Slaves: 04)

3 channels configured.

Changing signalling on channel 1 from Unused to FXO Kewlstart
Changing signalling on channel 2 from Unused to FXO Kewlstart
Changing signalling on channel 4 from Unused to FXS Kewlstart
-

Looking at postings on the Asterisk list, it seems that under CentOS I
should just run '/etc/rc.d/init.d/asterisk start' and it will load the
modules automatically - but that doesn't work for me.

That is: if I stop asterisk, rmmod the manuals by hand, and then do:

[EMAIL PROTECTED] asterisk]# /etc/rc.d/init.d/asterisk start
Starting asterisk: [  OK  ]
[EMAIL PROTECTED] asterisk]# lsmod | grep -i zap
[EMAIL PROTECTED] asterisk]# lsmod | grep -i wct

you can see that they've not been loaded.

My /etc/asterisk/modules.conf is the stock standard one and has autoload=yes
(although I guess that refers to asterisk modules, not kernel modules)

Is there any more debugging I can turn on to find out what might be
happening?

Regards,

Brian.
[internal]

exten = 611,1,Answer()
exten = 611,2,Playback(hello-world)
exten = 611,3,Hangup()
exten = _X.,1,Answer()
exten = _X.,2,Playback(pbx-invalid)
exten = _X.,3,Goto(s,1)
[trunkgroups]
; define any trunk groups

[channels]
;default
usecallerid=yes
hidecallerid=no
callwaiting=no
threewaycalling=yes
transfer=yes
echocancel=yes
echotraining=yes
immediate=no
answeronpolarityswitch=no

; define channels
context=internal
signalling=fxo_ks
channel = 1

context=internal
signalling=fxo_ks
channel = 2

context=incoming
signalling=fxs_ks   ; Use FXS signalling for an FXO channel
channel = 4

# Ports 1 and 2 are FXS (FXO signalling)
fxoks=1-2
# Port 4 is FXO (FXS signalling)
fxsks=4

loadzone=uk
defaultzone=uk
___
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   

Re: [asterisk-users] 9 becomes 99 ? And other strangeness

2006-09-15 Thread Brian Candler
On Thu, Sep 14, 2006 at 08:33:43PM -0500, Eric ManxPower Wieling wrote:
 Turn off relaxdtmf in zapata.conf if that does not help play with the 
 rxgain, if that does not help, play with the txgain.  If the volume is 
 too loud or too soft on zap channels, Asterisk can sometimes miss or see 
 double DTMF.

That's the pointer I needed.

With lots of experimentation, it was clear that double DTMF only occurred on
the first digit - and this is while the dial tone is being played, of
course.

Setting txgain=-6.0 seemes to have solved this.

Many thanks,

Brian.
___
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] 9 becomes 99 ? And other strangeness

2006-09-15 Thread Andrew Kohlsmith
On Friday 15 September 2006 04:20, Brian Candler wrote:
 it worse: I got a failure rate of about 50%, and in one case 66611 instead
 of 611.

It's clear your system is possessed.  Please contact your local clergyman for 
help with these issues.

-A.

(seriously though, I've had this particular problem on one box.  Properly 
tuning the tx/rx gains for zapata helped eliminate this problem.)

Interestingly enough, I tuned my rxgain for 14844, but my *transmit* audio 
levels had to be around half that before the echo cancellers were AT ALL 
happy.

-A.
___
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] 9 becomes 99 ? And other strangeness

2006-09-14 Thread Brian Candler
I'm getting a strange situation with the first digit being doubled on
outbound dialling, and other oddities. I think something strange is going on
in my dialplan, rather than a DTMF decoding issue, but see what you think.

The platform is CentOS 4.4 plus Asterisk SVN trunk as of yesterday, and a
TDM400P with 2 x FXS and 1 x FXO.

Here's my extensions.conf, based heavily on the simple examples from the
O'Reilly Starfish book:

---

[incoming]
; incoming calls from the FXO port are directed to this context from zapata.conf
include = extensions

exten = s,1,Answer()
exten = s,n,Wait(1)
exten = s,n,Background(enter-ext-of-person)
exten = i,1,Playback(pbx-invalid)
exten = i,n,Goto(incoming,s,1)
exten = t,1,Playback(vm-goodbye)
exten = t,n,Hangup()

[extensions]
exten = 101,1,Dial(Zap/1,10)
exten = 101,2,Playback(vm-nobodyavail)
exten = 101,3,Hangup()
exten = 101,102,Playback(tt-allbusy)
exten = 101,103,Hangup()

exten = 102,1,Dial(Zap/2,10)
exten = 102,2,Playback(vm-nobodyavail)
exten = 102,3,Hangup()
exten = 102,102,Playback(tt-allbusy)
exten = 102,103,Hangup()

[outbound]
exten = _9.,1,Dial(Zap/4/${EXTEN:1})  NOTE HERE
exten = _9.,2,Congestion()
exten = _9.,102,Congestion()

[internal]
include = extensions
include = outbound

exten = 611,1,Answer()
exten = 611,2,Playback(hello-world)
exten = 611,3,Hangup()

---

As you can see, the two FXS ports are given extensions 101 and 102; they can
dial each other, or dial out onto the PSTN by prefixing with 9 (see NOTE
HERE). The FXO port accepts incoming calls and allows the extensions to be
dialled. I factored out the 101/102 extensions into a separate context so it
could be included into both [internal] and [incoming]; that's the only
vaguely clever thing I've done.

Initially, the problem is when dialling out to the PSTN.

If I carefully dial 9 followed my own mobile phone number, which is
07974XX, sometimes it works and sometimes it doesn't. Looking at the
logs, sometimes asterisk sees 907974XX, and sometimes 9907974XX

*CLI -- Starting simple switch on 'Zap/1-1'
-- Executing [EMAIL PROTECTED]:1] Dial(Zap/1-1, Zap/4/07974XX) in 
new stack
-- Called 4/07974XX
-- Zap/4-1 answered Zap/1-1
-- Native bridging Zap/1-1 and Zap/4-1
-- Hungup 'Zap/4-1'
  == Spawn extension (internal, 907974XX, 1) exited non-zero on 'Zap/1-1'
-- Hungup 'Zap/1-1'
-- Starting simple switch on 'Zap/1-1'
-- Executing [EMAIL PROTECTED]:1] Dial(Zap/1-1, Zap/4/07974XX) in 
new stack
-- Called 4/07974XX
-- Hungup 'Zap/4-1'
  == Spawn extension (internal, 907974XX, 1) exited non-zero on 'Zap/1-1'
-- Hungup 'Zap/1-1'
-- Starting simple switch on 'Zap/1-1'
-- Executing [EMAIL PROTECTED]:1] Dial(Zap/1-1, Zap/4/07974XX) in 
new stack
-- Called 4/07974XX
-- Zap/4-1 answered Zap/1-1
-- Native bridging Zap/1-1 and Zap/4-1
-- Hungup 'Zap/4-1'
  == Spawn extension (internal, 907974XX, 1) exited non-zero on 'Zap/1-1'
-- Hungup 'Zap/1-1'
-- Starting simple switch on 'Zap/1-1'
-- Executing [EMAIL PROTECTED]:1] Dial(Zap/1-1, Zap/4/907974XX) in 
new stack
-- Called 4/907974XX
-- Zap/4-1 answered Zap/1-1
-- Native bridging Zap/1-1 and Zap/4-1
-- Hungup 'Zap/4-1'
  == Spawn extension (internal, 9907974XX, 1) exited non-zero on 'Zap/1-1'
-- Hungup 'Zap/1-1'
-- Starting simple switch on 'Zap/1-1'
-- Executing [EMAIL PROTECTED]:1] Dial(Zap/1-1, Zap/4/907974XX) in 
new stack
-- Called 4/907974XX
-- Zap/4-1 answered Zap/1-1
-- Native bridging Zap/1-1 and Zap/4-1
-- Hungup 'Zap/4-1'
  == Spawn extension (internal, 9907974XX, 1) exited non-zero on 'Zap/1-1'
-- Hungup 'Zap/1-1'
-- Starting simple switch on 'Zap/1-1'
-- Executing [EMAIL PROTECTED]:1] Dial(Zap/1-1, Zap/4/07974XX) in 
new stack
-- Called 4/07974XX
-- Zap/4-1 answered Zap/1-1
-- Native bridging Zap/1-1 and Zap/4-1
-- Hungup 'Zap/4-1'
  == Spawn extension (internal, 907974XX, 1) exited non-zero on 'Zap/1-1'
-- Hungup 'Zap/1-1'
-- Starting simple switch on 'Zap/1-1'
-- Executing [EMAIL PROTECTED]:1] Dial(Zap/1-1, Zap/4/907974XX) in 
new stack
-- Called 4/907974XX
-- Zap/4-1 answered Zap/1-1
-- Native bridging Zap/1-1 and Zap/4-1
-- Hungup 'Zap/4-1'
  == Spawn extension (internal, 9907974XX, 1) exited non-zero on 'Zap/1-1'
-- Hungup 'Zap/1-1'

In every case I'm leaving a one-second gap after dialing the first '9'.

If asterisk sees two '9's then clearly it fails, because I'm only stripping
off one '9' before passing the call to the PSTN.

However, dialing '102' from extension 101 never seems to have this problem.
This makes me think it might be a dialplan issue (in particular the _9.
pattern) rather than a DTMF issue.

OK, so to 

Re: [asterisk-users] 9 becomes 99 ? And other strangeness

2006-09-14 Thread Rich Adamson

Brian Candler wrote:

I'm getting a strange situation with the first digit being doubled on
outbound dialling, and other oddities. I think something strange is going on
in my dialplan, rather than a DTMF decoding issue, but see what you think.

The platform is CentOS 4.4 plus Asterisk SVN trunk as of yesterday, and a
TDM400P with 2 x FXS and 1 x FXO.

Here's my extensions.conf, based heavily on the simple examples from the
O'Reilly Starfish book:

---



[outbound]
exten = _9.,1,Dial(Zap/4/${EXTEN:1})  NOTE HERE
exten = _9.,2,Congestion()
exten = _9.,102,Congestion()



Try replacing the first step above with:
 exten = _9.,1,Dial(Zap/4/w${EXTEN:1})

Note the w in the above means wait for about a 1/4 second before 
sending the number to the central office.


Some central offices are not ready to receive digits as quickly as 
asterisk sends them out. In fact, some users have to use multiple w's 
(as in Zap/4/www${EXTEN:1} to wait for the equipment to settle down.


Give that a try and let us know if it corrected the problem.

___
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] 9 becomes 99 ? And other strangeness

2006-09-14 Thread Brian Candler
On Thu, Sep 14, 2006 at 09:00:57AM -0500, Rich Adamson wrote:
 [outbound]
 exten = _9.,1,Dial(Zap/4/${EXTEN:1})  NOTE HERE
 exten = _9.,2,Congestion()
 exten = _9.,102,Congestion()
 
 
 Try replacing the first step above with:
  exten = _9.,1,Dial(Zap/4/w${EXTEN:1})
 
 Note the w in the above means wait for about a 1/4 second before 
 sending the number to the central office.
 
 Some central offices are not ready to receive digits as quickly as 
 asterisk sends them out.

Interesting feature, thank you, but I don't think that's the problem.

Notice that Asterisk's own log shows that it thinks the number called is
99X and therefore dials out to 9X, where in fact I only dialled
9X and so it should be dialling X.

Console:

-- Starting simple switch on 'Zap/1-1'
-- Executing [EMAIL PROTECTED]:1] Dial(Zap/1-1,Zap/4/907974XX) in 
new stack
-- Called 4/907974XX
-- Zap/4-1 answered Zap/1-1
-- Native bridging Zap/1-1 and Zap/4-1
-- Hungup 'Zap/4-1'
  == Spawn extension (internal, 9907974XX, 1) exited non-zero on 'Zap/1-1'
-- Hungup 'Zap/1-1'

If this were consistent I could use ${EXTEN:2} to strip off the two 9's, but
it isn't.

Regards,

Brian.
___
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] 9 becomes 99 ? And other strangeness

2006-09-14 Thread Rich Adamson

Brian Candler wrote:

On Thu, Sep 14, 2006 at 09:00:57AM -0500, Rich Adamson wrote:

[outbound]
exten = _9.,1,Dial(Zap/4/${EXTEN:1})  NOTE HERE
exten = _9.,2,Congestion()
exten = _9.,102,Congestion()


Try replacing the first step above with:
 exten = _9.,1,Dial(Zap/4/w${EXTEN:1})

Note the w in the above means wait for about a 1/4 second before 
sending the number to the central office.


Some central offices are not ready to receive digits as quickly as 
asterisk sends them out.


Interesting feature, thank you, but I don't think that's the problem.

Notice that Asterisk's own log shows that it thinks the number called is
99X and therefore dials out to 9X, where in fact I only dialled
9X and so it should be dialling X.

Console:

-- Starting simple switch on 'Zap/1-1'
-- Executing [EMAIL PROTECTED]:1] Dial(Zap/1-1,Zap/4/907974XX) in 
new stack
-- Called 4/907974XX
-- Zap/4-1 answered Zap/1-1
-- Native bridging Zap/1-1 and Zap/4-1
-- Hungup 'Zap/4-1'
  == Spawn extension (internal, 9907974XX, 1) exited non-zero on 'Zap/1-1'
-- Hungup 'Zap/1-1'

If this were consistent I could use ${EXTEN:2} to strip off the two 9's, but
it isn't.



Try the above an see what the result is. If it does not address the 
problem, at least one item has been removed from the list of 
possibilities. ;)


___
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


RE: [asterisk-users] 9 becomes 99 ? And other strangeness

2006-09-14 Thread Steven Totaro

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:asterisk-users-
 [EMAIL PROTECTED] On Behalf Of Brian Candler
 Sent: Thursday, September 14, 2006 10:44 AM
 To: [EMAIL PROTECTED]; Asterisk Users Mailing List - Non-Commercial
 Discussion
 Subject: Re: [asterisk-users] 9 becomes 99 ? And other strangeness
 
 On Thu, Sep 14, 2006 at 09:00:57AM -0500, Rich Adamson wrote:
  [outbound]
  exten = _9.,1,Dial(Zap/4/${EXTEN:1})  NOTE HERE
  exten = _9.,2,Congestion()
  exten = _9.,102,Congestion()
  
 
  Try replacing the first step above with:
   exten = _9.,1,Dial(Zap/4/w${EXTEN:1})
 
  Note the w in the above means wait for about a 1/4 second before
  sending the number to the central office.
 
  Some central offices are not ready to receive digits as quickly as
  asterisk sends them out.
 
 Interesting feature, thank you, but I don't think that's the problem.
 
 Notice that Asterisk's own log shows that it thinks the number called
is
 99X and therefore dials out to 9X, where in fact I only
dialled
 9X and so it should be dialling X.
 
 Console:
 
 -- Starting simple switch on 'Zap/1-1'
 -- Executing [EMAIL PROTECTED]:1] Dial(Zap/1-
 1,Zap/4/907974XX) in new stack
 -- Called 4/907974XX
 -- Zap/4-1 answered Zap/1-1
 -- Native bridging Zap/1-1 and Zap/4-1
 -- Hungup 'Zap/4-1'
   == Spawn extension (internal, 9907974XX, 1) exited non-zero on
 'Zap/1-1'
 -- Hungup 'Zap/1-1'
 
 If this were consistent I could use ${EXTEN:2} to strip off the two
9's,
 but
 it isn't.
 
 Regards,
 
 Brian.

Are you dialing from a sip phone?  How is DTMF configured in asterisk?
How is configured on the phone?  What kind of phone are you using?

Thanks,
Steve
___
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] 9 becomes 99 ? And other strangeness

2006-09-14 Thread Brian Candler
On Thu, Sep 14, 2006 at 10:37:59AM -0500, Rich Adamson wrote:
 Brian Candler wrote:
 On Thu, Sep 14, 2006 at 09:00:57AM -0500, Rich Adamson wrote:
 [outbound]
 exten = _9.,1,Dial(Zap/4/${EXTEN:1})  NOTE HERE
 exten = _9.,2,Congestion()
 exten = _9.,102,Congestion()
 
 Try replacing the first step above with:
  exten = _9.,1,Dial(Zap/4/w${EXTEN:1})
 
 Note the w in the above means wait for about a 1/4 second before 
 sending the number to the central office.
 
 Some central offices are not ready to receive digits as quickly as 
 asterisk sends them out.
 
 Interesting feature, thank you, but I don't think that's the problem.
 
 Notice that Asterisk's own log shows that it thinks the number called is
 99X and therefore dials out to 9X, where in fact I only dialled
 9X and so it should be dialling X.
 
 Console:
 
 -- Starting simple switch on 'Zap/1-1'
 -- Executing [EMAIL PROTECTED]:1] 
 Dial(Zap/1-1,Zap/4/907974XX) in new stack
 -- Called 4/907974XX
 -- Zap/4-1 answered Zap/1-1
 -- Native bridging Zap/1-1 and Zap/4-1
 -- Hungup 'Zap/4-1'
   == Spawn extension (internal, 9907974XX, 1) exited non-zero on 
   'Zap/1-1'
 -- Hungup 'Zap/1-1'
 
 If this were consistent I could use ${EXTEN:2} to strip off the two 9's, 
 but
 it isn't.
 
 
 Try the above an see what the result is. If it does not address the 
 problem, at least one item has been removed from the list of 
 possibilities. ;)

Without wishing to be contrary: could you explain to me how it could
possibly work?

Asterisk thinks I dialled (on the inbound leg) a number starting 99. After
it has got this wrong number, it then dials it on the outbound leg,
stripping off one of the 9's as that's what the dialplan says.

Adding a 1/4 second delay on the outbound leg won't change the fact that
it's trying to dial the wrong number in the first place.

Regards,

Brian.
___
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] 9 becomes 99 ? And other strangeness

2006-09-14 Thread Brian Candler
On Thu, Sep 14, 2006 at 11:49:14AM -0400, Steven Totaro wrote:
 Are you dialing from a sip phone?

Nope; a POTS phone plugged into an FXS port on a TDM400P.

 How is DTMF configured in asterisk?

Whatever its default are - I've not overridden anything to do with DTMF.

More precisely: I moved all the sample configs into a 'samples' directory,
and created the minimum set I needed to in /etc/asterisk/ to make things
work. I have:

$ ls /etc/asterisk/
asterisk.confextensions.conf.bug  samples
extensions.conf  modules.conf zapata.conf

(ignore extensions.conf.bug, it's an old version)

There's also /etc/zaptel.conf

 How is configured on the phone?
 What kind of phone are you using?

It's a #7.99 off-the-shelf POTS phone. It has no settings, apart from a
volume switch.

Regards,

Brian.
___
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] 9 becomes 99 ? And other strangeness

2006-09-14 Thread Eric \ManxPower\ Wieling
Turn off relaxdtmf in zapata.conf if that does not help play with the 
rxgain, if that does not help, play with the txgain.  If the volume is 
too loud or too soft on zap channels, Asterisk can sometimes miss or see 
double DTMF.


Brian Candler wrote:

On Thu, Sep 14, 2006 at 10:37:59AM -0500, Rich Adamson wrote:

Brian Candler wrote:

On Thu, Sep 14, 2006 at 09:00:57AM -0500, Rich Adamson wrote:

[outbound]
exten = _9.,1,Dial(Zap/4/${EXTEN:1})  NOTE HERE
exten = _9.,2,Congestion()
exten = _9.,102,Congestion()


Try replacing the first step above with:
exten = _9.,1,Dial(Zap/4/w${EXTEN:1})

Note the w in the above means wait for about a 1/4 second before 
sending the number to the central office.


Some central offices are not ready to receive digits as quickly as 
asterisk sends them out.

Interesting feature, thank you, but I don't think that's the problem.

Notice that Asterisk's own log shows that it thinks the number called is
99X and therefore dials out to 9X, where in fact I only dialled
9X and so it should be dialling X.

Console:

   -- Starting simple switch on 'Zap/1-1'
   -- Executing [EMAIL PROTECTED]:1] 
   Dial(Zap/1-1,Zap/4/907974XX) in new stack

   -- Called 4/907974XX
   -- Zap/4-1 answered Zap/1-1
   -- Native bridging Zap/1-1 and Zap/4-1
   -- Hungup 'Zap/4-1'
 == Spawn extension (internal, 9907974XX, 1) exited non-zero on 
 'Zap/1-1'

   -- Hungup 'Zap/1-1'

If this were consistent I could use ${EXTEN:2} to strip off the two 9's, 
but

it isn't.

Try the above an see what the result is. If it does not address the 
problem, at least one item has been removed from the list of 
possibilities. ;)


Without wishing to be contrary: could you explain to me how it could
possibly work?

Asterisk thinks I dialled (on the inbound leg) a number starting 99. After
it has got this wrong number, it then dials it on the outbound leg,
stripping off one of the 9's as that's what the dialplan says.

Adding a 1/4 second delay on the outbound leg won't change the fact that
it's trying to dial the wrong number in the first place.

Regards,

Brian.
___
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users



___
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users