<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.2900.2802" name=GENERATOR></HEAD>
<BODY>
<DIV>
<DIV><SPAN class=390312617-12012006><FONT face=Arial color=#0000ff size=2>Hello
all. I've been searching and can't quite find what I'm looking
for...</FONT></SPAN></DIV>
<DIV><SPAN class=390312617-12012006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=390312617-12012006><FONT face=Arial color=#0000ff size=2>I've
gotten AMP installed and up and running quite decently<SPAN
class=578291418-12012006> on an Asterisk box</SPAN> and am now in the
process of tweaking it to my needs. My company currently has around 70
employees and we are running on a complete Avaya system, but this system is no
longer going to work for us (too much money for not enough stuff). So I
have been put in charge of setting up an Asterisk PBX and get an entire test
system going on it<SPAN class=578291418-12012006> to see if Asterisk will
meet our telephone needs</SPAN>. Extensions, queues, voicemail,
stats, etc etc. Here's the problem: this Asterisk server is actually
currently running live, serving information to people calling in to it. I
need my test office setup, with AMP and this other system to work
simultaneously, but yet totally separate. As my stuff is for a test, I
would like to set it up so that when I dial in TO my Asterisk
PBX FROM a specific telephone number, it takes me to my office test section
in asterisk, otherwise, from ANY other number, it dials the info serving
section. This would allow me to call from a certain telephone number
and be able to get to my test office setup, but if anybody else calls from
any other number, they get the other stuff. Doesn't sound too bad
right?</FONT></SPAN></DIV>
<DIV><SPAN class=390312617-12012006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=390312617-12012006><FONT face=Arial color=#0000ff size=2>So how
would one do this using AMP if AMP is more of the "secondary" system? If I
understand correctly, to add additional, custom contexts to extensions.conf, it
should be entered into extensions_additional.conf and the contexts should
contain the word "custom" in them. So, first question, what if I want that
custom context to be the first context (as in possibly the default context), but
only if it's from a certain telephone number...? I assume you
would enter that custom context as the context in zapata.conf,
but how would you tell it to go back to the AMP stuff if the FROM telephone
number is my speicifc telephone number? What context would I send it to so
that it will do the regular AMP stuff? (Incidentally, I have a local
telephone number and an 888 telephone number coming into my PRI, but when
called, my Asterisk PBX views/receives them both as the local telephone
number.)</FONT></SPAN></DIV>
<DIV><SPAN class=390312617-12012006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=390312617-12012006><FONT face=Arial color=#0000ff size=2>Also,
what if my custom contexts in extensions_additional.conf call macros? Do
my macro names need to contain the word "custom" as well?</FONT></SPAN></DIV>
<DIV><SPAN class=390312617-12012006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=390312617-12012006><FONT face=Arial color=#0000ff size=2>Where
to put my nineoneone context for it to utilize the defined
globals?</FONT></SPAN></DIV>
<DIV><SPAN class=390312617-12012006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=390312617-12012006><FONT face=Arial color=#0000ff
size=2>Below is my current extensions.conf file.<SPAN
class=578291418-12012006> </SPAN><SPAN class=578291418-12012006>(My
extensions_additional.conf is currently empty.) </SPAN>The first part is
the custom stuff that I use to serve up the info<SPAN
class=578291418-12012006> when customers call in</SPAN>. I believe
this is what should be moved to the extensions_additional.conf... I didn't
post the entire extensions.conf file as the rest is the standard stuff set up by
AMP. Any suggestions?</FONT></SPAN></DIV>
<DIV><SPAN class=390312617-12012006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=390312617-12012006><FONT face=Arial color=#0000ff
size=2>Thanks,</FONT></SPAN></DIV>
<DIV><SPAN class=390312617-12012006><FONT face=Arial color=#0000ff size=2>Ben
Ferguson</FONT></SPAN></DIV>
<DIV><SPAN class=390312617-12012006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=390312617-12012006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=390312617-12012006><FONT face=Arial color=#0000ff
size=2>[general]<BR>static=yes<BR>writeprotect=yes</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=390312617-12012006><FONT face=Arial color=#0000ff
size=2>IAXINFO=guest
; IAXtel
username/password<BR>TRUNK=Zap/g1
; Trunk
interface<BR>TRUNKMSD=1
; MSD digits to strip (usually 1 or 0)<BR></FONT></SPAN></DIV>
<DIV><SPAN class=390312617-12012006><FONT face=Arial color=#0000ff
size=2>[globals]</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=390312617-12012006><FONT face=Arial color=#0000ff
size=2>EMERGENCY=0<BR>EMERGENCY_TRUNK=Zap/17<BR>; Change this for production
use:<BR>EMERGENCY_NUM=911</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=390312617-12012006><FONT face=Arial color=#0000ff
size=2>[nineoneone]<BR>exten => s,1,SetVar(SET_EMERG_FLAG=0)<BR>exten =>
s,n(checkavail),ChanIsAvail(${EMERGENCY_TRUNK})<BR>exten =>
s,n,SetGlobalVar(EMERGENCY=1)<BR>exten =>
s,n,SetVar(SET_EMERG_FLAG=1)<BR>exten =>
s,n(dial),Dial(${EMERGENCY_TRUNK}/${EMERGENCY_NUM})<BR>exten =>
s,s+2(trunkbusy),GotoIf($[${EMERGENCY} = 1]?inprogress)<BR>exten =>
s,n,SoftHangup(${EMERGENCY_TRUNK}-1)<BR>exten => s,n,Wait(12)<BR>exten =>
s,n,Goto(checkavail)<BR>exten => s,s+2(inprogress),Congestion<BR>exten =>
s,checkavail+101(notavail),Goto(trunkbusy)<BR>exten =>
h,1,GotoIf($[${SET_EMERG_FLAG} = 1]?3)<BR>exten =>
h,3,SetGlobalVar(EMERGENCY=0)<BR>exten => t,1,goto(s,1)</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><BR><FONT face=Arial color=#0000ff size=2>[local]<BR>;<BR>; Master context
for local, toll-free, and iaxtel calls only<BR>;<BR>ignorepat => 9<BR>include
=> default<BR></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2>[default]<BR>exten =>
s,1,Answer<BR>exten => s,2,Wait(1)<BR>exten =>
s,3,Background(cc_welcome)</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2>;if someone enters a tour
number<BR>exten => _XXXXXX,1,AGI(getAudioFile.php,${EXTEN})<BR>exten =>
_*XXXXXX,1,AGI(loanOfficerLogin.php,${EXTEN})</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2>;if someone enters an invalid
extension<BR>exten => i,1,Playback(cc_sorry)</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2>;timeout<BR>exten =>
t,1,goto(s,2)</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2>;incoming numbers<BR>exten
=> <SPAN class=390312617-12012006>5555551212</SPAN>,1,goto(s,1)<BR>exten
=> 888<SPAN class=390312617-12012006>5551212</SPAN>,1,goto(s,1)</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff
size=2>;*********************************<BR>;*** Message
Sections<BR>;*********************************<BR>
<BR>[macro-setPinVars]<BR>exten =>
s,1,SetGlobalVar(LAST_AUDIO=${ARG1})<BR>exten =>
s,2,SetGlobalVar(AGENT_PIN=${ARG2})<BR>exten =>
s,3,SetGlobalVar(HAS_AUDIO=${ARG3})<BR>exten =>
s,4,goto(getSponserPin,s,1)</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2>[getSponserPin]<BR>exten =>
s,1,Background(agent-pass)<BR>;exten => s,1,SayDigits(${AGENT_PIN})<BR>exten
=> ${AGENT_PIN}#,1,GotoIf($["${HAS_AUDIO}" = "yes"]?3:2)<BR>exten =>
${AGENT_PIN}#,2,goto(loRecordMessage,s,1)<BR>exten =>
${AGENT_PIN}#,3,goto(loHasMessage,s,1)</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2>exten => i,1,Wait(1)<BR>exten
=> i,2,Playback(cc_sorry)</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2>[loRecordMessage]<BR>exten =>
s,1,Background(to-compose-a-message)<BR>exten =>
s,2,Background(press-1)<BR>exten =>
s,3,Background(T-to-rtrn-to-main-menu)<BR>exten =>
s,4,Background(press-9)</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2>exten =>
1,1,Playback(vm-intro)<BR>exten =>
1,2,Record(/media/audio/cc/l${LAST_AUDIO}.gsm)<BR>exten =>
1,3,Playback(your-msg-has-been-saved)<BR>exten =>
1,4,goto(loHasMessage,s,1)</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2>exten =>
9,1,goto(default,s,1)</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2>exten =>
i,1,Playback(cc_sorry)<BR>exten => t,1,goto(s,1)</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2>[loHasMessage]<BR>exten =>
s,1,Background(press-1)<BR>exten =>
s,2,Background(to-rerecord-yr-message)<BR>exten =>
s,3,Background(press-2)<BR>exten => s,4,Background(to-listen-to-it)<BR>exten
=> s,5,Background(vm-delete)<BR>exten =>
s,6,Background(T-to-rtrn-to-main-menu)<BR>exten =>
s,7,Background(press-9)</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><BR><FONT face=Arial color=#0000ff size=2>exten =>
1,1,goto(playLoMessage,s,1)<BR>exten =>
2,1,goto(loRecordMessage,1,1)<BR>exten =>
7,1,AGI(deleteAudio.php,${LAST_AUDIO})<BR>exten =>
7,2,Playback(vm-deleted)<BR>exten => 7,3,goto(default,s,1)<BR>exten =>
9,1,goto(default,s,1)</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2>exten =>
i,1,Playback(cc_sorry)<BR>exten => t,1,goto(s,1)</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2>[playLoMessage]<BR>exten =>
s,1,Background(/media/audio/cc/l${LAST_AUDIO})<BR>exten =>
s,2,goto(loHasMessage,s,1)<BR>exten =>
X,1,goto(loHasMessage,s,1)</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff
size=2>;*********************************<BR>;*** Main
Sections<BR>;*********************************</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2>[macro-playaudio]<BR>exten =>
s,1,SetGlobalVar(LAST_AUDIO=${ARG1})<BR>exten =>
s,2,SetGlobalVar(LO_FILE=${ARG2})<BR>exten =>
s,3,MP3Player(/media/audio/a${ARG1}.mp3)<BR>exten =>
s,4,goto(playsection,s,1)</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2>[playsection]<BR>exten =>
s,1,GotoIf($["${LO_FILE}" = "no"]?3:2)<BR>exten =>
s,2,Playback(${LO_FILE})<BR>exten => s,3,Wait(1)<BR>exten =>
s,4,Background(cc_replay)</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><BR><FONT face=Arial color=#0000ff size=2>exten =>
1,1,macro(playaudio,${LAST_AUDIO},${LO_FILE})<BR>exten =>
2,1,goto(s,1)</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2>exten =>
t,1,goto(s,1)</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff
size=2>;*****************************************************************************************************<BR>;*****************************************************************************************************<BR>;*****************************************************************************************************<BR>;*****************************************************************************************************</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2>; Asterisk Management Portal
(AMP)<BR>; Copyright (C) 2004 Coalescent Systems Inc</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2>; dialparties.agi (</FONT><A
href="http://www.sprackett.com/asterisk/"><FONT face=Arial
size=2>http://www.sprackett.com/asterisk/</FONT></A><FONT face=Arial
color=#0000ff size=2>)<BR>; Asterisk::AGI (</FONT><A
href="http://asterisk.gnuinter.net/"><FONT face=Arial
size=2>http://asterisk.gnuinter.net/</FONT></A><FONT face=Arial color=#0000ff
size=2>)<BR>; gsm (</FONT><A
href="http://www.ibiblio.org/pub/Linux/utils/compress/!INDEX.short.html"><FONT
face=Arial
size=2>http://www.ibiblio.org/pub/Linux/utils/compress/!INDEX.short.html</FONT></A><FONT
face=Arial color=#0000ff size=2>)<BR>; loligo sounds (</FONT><A
href="http://www.loligo.com/asterisk/sounds/"><FONT face=Arial
size=2>http://www.loligo.com/asterisk/sounds/</FONT></A><FONT face=Arial
color=#0000ff size=2>)<BR>; mpg123 (</FONT><A
href="http://voip-info.org/wiki-Asterisk+config+musiconhold.conf"><FONT
face=Arial
size=2>http://voip-info.org/wiki-Asterisk+config+musiconhold.conf</FONT></A><FONT
face=Arial color=#0000ff size=2>)</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><BR><FONT face=Arial color=#0000ff size=2>; include extension contexts
generated from AMP<BR>#include extensions_additional.conf</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2>; Customizations to this dialplan
should be made in extensions_custom.conf<BR>; See extensions_custom.conf.sample
for an example<BR>#include extensions_custom.conf</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2>[from-trunk]<BR>include =>
from-pstn</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2>[from-pstn]<BR>include =>
from-pstn-custom
; create this context in extensions_custom.conf to include
customizations<BR>include => ext-did<BR>include =>
from-pstn-timecheck ; this
has to be included otherwise it overrides ext-did<BR>exten =>
fax,1,Goto(ext-fax,in_fax,1)</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2>[from-pstn-timecheck]<BR>exten =>
_.,1,Goto(s,1)<BR>exten => s,1,GotoIf($[${IN_OVERRIDE} =
forcereghours]?from-pstn-reghours,s,1:)<BR>exten =>
s,2,GotoIf($[${IN_OVERRIDE} = forceafthours]?from-pstn-afthours,s,1:)<BR>exten
=> s,3,GotoIfTime(${REGTIME}|${REGDAYS}|*|*?from-pstn-reghours,s,1:)<BR>exten
=> s,4,Goto(from-pstn-afthours,s,1)</FONT></DIV></SPAN>
<DIV><FONT face=Arial color=#0000ff
size=2></FONT> </DIV></DIV></BODY></HTML>