[Asterisk-Users] truncated extensions

Kevin Johnson kjj at johnsonpigs.com
Mon Aug 9 22:27:50 MST 2004


Greg Hill wrote:

> On Sun, 8 Aug 2004, Kevin Johnson wrote:
> 
> 
>>I'm having a problem with extensions.
>>
>>Any extension longer than 6 characters gets truncated to 6 characters.
>>
>>For example,
>>   exten => _7XXXXXX,3,NoOp("call for"${EXTEN})
>>results in
>>   call for 712345
>>when given
>>   7123456
> 
> 
> that's ${EXTEN}, not ${EXTEN:1}, right (I mean what's actually in your
> extensions.conf file)? And you don't have any other extensions with the
> '.' wildcard in them which might be getting matched instead? Next step:
> mention which version you're running and maybe include extensions.conf.

Correct, ${EXTEN}.
I'm using CVS-HEAD-08/08/04-07:50:38

I've attached an extensions.conf file that exhibits the problem for me. 
  Sorry for the extra stuff in the file, but that's what I'm running, 
minus some global variables not suitable for public consumption.

When dialing 8437624, I get the following output:
     -- Executing NoOp("SIP/office1-b727", ""call for "843762" "43762" 
"6") in new stack

on the following line:
exten => _8.,3,NoOp("call for "${EXTEN}" "${EXTEN:1}" "${LEN(${EXTEN})})

... missing the final 4 in the dialed number.
I included a call to LEN, just to make sure I wasn't seeing things...

Oddly enough, the _4XXXXX dialplan doesn't exhibit the problem.

Any pointers would be greatly appreciated.

-------------- next part --------------
[general]
static=yes
writeprotect=yes

[globals]

OFFICE=sip/office1
KJJLAPTOP=iax2/kjjlaptop2

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[default]
exten => s,1,Playback(all-your-base)
exten => s,2,Hangup
;include => thejohnsonpigs

[mainmenu]
exten => s,1,Wait,1
exten => s,2,Wait,1	; wait 2 seconds to allow receipt of caller-id data
exten => s,3,Answer
exten => s,4,Playback(moo2)
exten => s,5,DigitTimeout,5
exten => s,6,ResponseTimeout,10
exten => s,7,Background(enter-ext-of-person)
exten => t,1,Playback(i-grow-bored)
exten => t,2,Hangup
exten => i,1,Playback(invalid)
exten => i,2,Goto(s,5)			; loop on reprompting for extension
exten => 1,1,Macro(stdexten,1001,${OFFICE})
exten => 2,1,Macro(stdexten,1002,${KJJLAPTOP})

[voicemail]
exten => 4242,1,VoicemailMain
exten => 4242,2,Hangup

[thejohnsonpigs]
exten => 1001,1,Playback(transfer,skip)
exten => 1001,2,Macro(stdexten,1001,sip/office1)
exten => 1001,3,Congestion

exten => 1002,1,Playback(transfer,skip)
exten => 1002,2,Macro(stdexten,1002,IAX2/kjjlaptop2)
exten => 1002,3,Congestion

[outbound-to-iaxfwd-test]
exten => _4XXXXX,1,SetCallerId,${FWDNUM}
exten => _4XXXXX,2,SetCIDName,${FWDCIDNAME}
exten => _4XXXXX,3,NoOp("call for "${EXTEN}" "${EXTEN:1}" "${LEN(${EXTEN})})
exten => _4XXXXX,4,Dial(IAX2/${FWDLOGIN}@iax2.fwdnet.net/${EXTEN},60,r)
exten => _4XXXXX,5,Playback(invalid)
exten => _4XXXXX,6,Hangup
exten => _4XXXXX,7,Congestion

exten => _8.,1,SetCallerId,${FWDNUM}
exten => _8.,2,SetCIDName,${FWDCIDNAME}
exten => _8.,3,NoOp("call for "${EXTEN}" "${EXTEN:1}" "${LEN(${EXTEN})})
;exten => _8.,4,Dial(IAX2/${FWDLOGIN}@iax2.fwdnet.net/${EXTEN:1},60,r)
exten => _8.,4,NoOp("arf")
exten => _8.,5,Playback(invalid)
exten => _8.,6,Hangup
exten => _8.,7,Congestion

[inbound]
include => mainmenu
exten => _.,1,Goto(mainmenu,s,1)
exten => _.,2,Hangup

[inbound-from-sip]
include => default

[inbound-from-iax]
include => default

[inbound-from-iaxfwd]
include => inbound

[house]
;include => default
;include => thejohnsonpigs
include => outbound-to-iaxfwd-test
include => voicemail

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[macro-stdexten]
exten => s,1,Background(one-moment-please)
exten => s,2,Dial(${ARG2},10)
exten => s,3,Voicemail(u${ARG1})
exten => s,4,Goto(default,s,1)		; If they press #, return to start
exten => s,103,Voicemail(b${ARG1})
exten => s,104,Goto(default,s,1)	; If they press #, return to start

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


More information about the asterisk-users mailing list