[asterisk-users] Inbound call not dialing exten
A J Stiles
asterisk_list at earthshod.co.uk
Thu Jun 16 03:10:43 CDT 2011
On Thursday 16 Jun 2011, mahesh katta wrote:
> Hi all,
>
> I have 100 DID's which is 4578900 to 4578999 , and i have 5001 to 5099
> extensions. when incomming call come to this DID no. (4578901) that time
> 5001 extestinsion should ring.
> below my dial plan is not getting any result , inthat has any mistakes.
> please help.
>
> exten => _45789XX,1,AGI(agi://127.0.0.1:4577/call_log)
> exten => _45789XX,1,Set(Dest=2{EXTEN:-2})
> exten =>
> _45789XX,2,MixMonitor(/var/spool/asterisk/astrec/${TIMESTAMP}-${CALLERIDNUM
>}-${EXTEN}-${UNIQUEID}.gsm|av(0)V(0)) exten =>
> _45789XX,3,Dial(SIP/${Dest},,tTo)
> exten => _45789XX,4,Hangup
Firstly, you've got two "1" steps in that. Unless you are doing something
complicated with GOTOs (and if you are, then there's probably a better way
of doing it), use "1" for the first step and "n" (next) for all subsequent
steps.
If nothing else, it means you can add extra NoOp() statements to put debugging
information on the console, and later comment out or remove them without
forced renumbering (which brings its own opportunities to introduce errors).
Secondly, you're setting ${Dest} to "2" followed by the last 2 digits of the
dialled number. But what you really want is "50" followed by the last 2
digits of the dialled number. So it should be
exten => _45789XX,n,Set(Dest=50{EXTEN:-2})
--
AJS
Answers come *after* questions.
More information about the asterisk-users
mailing list