Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.



296 posts

Ultimate Geek
+1 received by user: 9


Topic # 70018 16-Oct-2010 17:52 Send private message

Hi 

I know there are some trixbox experts here so hope someone can help me.
The problem is hackers have been using my trixbox to make outbound calls at my expense.
They seem to be using the IVR to make calls to overseas destinations.
I don't know how they are doing it.
They seem to be calling in to the IVR with a bogus caller ID (I have anon sip calls disabled) and from there are able to make an out going call.
I only have one IAX2 trunk setup with 2talk.
 My trixbox is not open to the internet and I have a firewall, so I don't think they are getting in that way.
They managed to make a call to Sierra Leone which is strange since I have restrict calls to expensive overseas destinations turned on in 2talk settings so they should not have been able to do that at all.
I have disabled DISA completely in the hope of stopping them.
Once the hackers know there is a IP PBX connected to a phone number they don't stop trying it seems.

Hope someone can help.
Cheers




 




Now on Slingshot Better Network and it's better.

Share Image

View this topic in a long page with up to 500 replies per page Create new topic
 1 | 2
19379 posts

Uber Geek
+1 received by user: 1220

Moderator
Trusted
Biddle Corp
Subscriber

  Reply # 392711 16-Oct-2010 20:05 Send private message

They are probably running dictionary attacks against your SIP extensions because you have insecure passwords.

Fix this, install fail2ban and lock down your firewall so it's only accepting SIP traffic from WxC. These are all basic steps that should be installed by default.

3bit.com
5843 posts

Uber Geek
+1 received by user: 149

Moderator
Trusted
Subscriber

  Reply # 392720 16-Oct-2010 20:40 Send private message

I don't think your firewall is secured properly.

If they are scanning your system, port 5060 is open.






296 posts

Ultimate Geek
+1 received by user: 9


  Reply # 392778 17-Oct-2010 09:39 Send private message

First of all thanks for your reply's.

 

>They are probably running dictionary attacks against your SIP extensions because you have insecure >passwords. 

Your right, I don't know why I didn't think of this. However I do have very secure passwords on the extensions that are in use, but I also have a couple of extensions that I don't use that had very weak passwords, so although not in use I guess they may have been able to use them, so good point.

>Fix this, install fail2ban and lock down your firewall so it's only accepting SIP traffic from WxC. These are all >basic steps that should be installed by default. 


I only have a IAX2 trunk with 2talk, I have a firewall in my router and when I check it with sheildsup at grc.com all my ports are stealthed  including port 5060 (which I am not using) and port 4569 (IAX)

However I am going to also install APF and BFD




>I don't think your firewall is secured properly.

>If they are scanning your system, port 5060 is open.

All my ports are invisible, 5060 definitely not open.
I don't think they coming in through the network, my trixbox is invisible to the internet.
They seem to be doing it through the IVR somehow.
   


Thanks

 





Now on Slingshot Better Network and it's better.

Share Image



296 posts

Ultimate Geek
+1 received by user: 9


  Reply # 392806 17-Oct-2010 12:29 Send private message


They just managed to make 2 more phone calls.

I see how they are doing it now.
They are calling into the IVR and from there they are able to somehow get an outside
dial tone, scary stuff.
I had a look at the log files, makes for some interesting reading.
It looks like they are exploiting a bug in IAX2 or somerthing.
Unfortunately I am not that clued up with reading log files
Would someone here like to take a look at them for me?

 
 




Now on Slingshot Better Network and it's better.

Share Image

3558 posts

Uber Geek
+1 received by user: 60

Trusted
WorldxChange

  Reply # 392808 17-Oct-2010 12:34 Send private message

Scary stuff is right, not so easy with a bring your server is it a lot of security needs to be done, perhaps you should talk to 2talk and get them to assist with blocking these,




Yes I am a employee of WxC (My Profile) ... but I do have my own opinions as well Wink

             

https://www.facebook.com/wxccommunications

7 posts

Wannabe Geek


  Reply # 393089 18-Oct-2010 10:50 Send private message

Hi Techmeister,

You should read your log file (/var/log/asterisk/messages) carefully for hacking attempts. I have had thousands of dictionary attacks on my asterisk in D, causing gigabytes of traffic within hours.

I don't know about the quality of the configuration files Trixbox generates. Since the interface is based on FreePBX is guess the code quality is not clean/ not easy to understand.

Firstly you want to make sure you have very strong passwords for your extensions; allowguest=no; alwaysauthreject=yes; install Fail2Ban

Furthermore it is important to not allow toll calls through the default context! In case you are German,  which your Name implies, have a read though below how-to.

http://www.ip-phone-forum.de/showthread.php?t=221457

Anyway, I always suggest to install a Debian / Asterisk / fail2ban system from scratch without Freepbx / Trixbox or any graphic interface. Then you manually configure your asterisk in sip.conf, extensions.conf, voicemail.conf.

In case you are able to confirm the hackers come through the IVR / Voicemail, just disable it for now. Change all passwords, delete extensions you don't use. Another look into /var/log/asterisk/cdr-csv/Master.csv may give you further information on where the calls slip through.

Good luck!





296 posts

Ultimate Geek
+1 received by user: 9


  Reply # 393300 18-Oct-2010 19:21 Send private message

I am a Kiwi by the way.


>allowguest=no; alwaysauthreject=yes; install Fail2Ban
I have always had that, I think it default in trixbox.

The logs you mention have nothing in them but there is a full asterisk log.

Where the hackers are calling into my IVR they then dial or do something to get a dial tone out.
When they do that the logs have this:

[Oct 17 10:48:43] WARNING[29165] channel.c: Unexpected control subclass '14'
and it comes up twice.

That's when they get a dial tone out, after that I do not see the number they dial in the log file, so they are able to bypass that also.

I am using trixbox 2.6 CE which is EOL so no support from Fonality anymore.

I would like to find out how they did this for my own curiosity.

I will probably end up installing Elastix or PIAF which should fix this problem.
This just highlights the problem with software PBX's, there are always holes that hackers
will eventually find.
Thanks for your help




Now on Slingshot Better Network and it's better.

Share Image

184 posts

Master Geek

Subscriber

  Reply # 393308 18-Oct-2010 19:40 Send private message

If the calls are coming in via the PSTN it would be a good idea to report this to the Police so they can get those calls traced and see if they can work out where they are being made from.

19379 posts

Uber Geek
+1 received by user: 1220

Moderator
Trusted
Biddle Corp
Subscriber

  Reply # 393334 18-Oct-2010 20:55 Send private message

techmeister: I am a Kiwi by the way.


>allowguest=no; alwaysauthreject=yes; install Fail2Ban
I have always had that, I think it default in trixbox.



It is not a default security setting in trixbox.


I will probably end up installing Elastix or PIAF which should fix this problem.
This just highlights the problem with software PBX's, there are always holes that hackers
will eventually find.
Thanks for your help


Elastix or PIAF are no more secure than trixbox or another Asterisk distribution. It all comes down to how you configure things.

I disagree that it highlights problems with software PBX's - it highlights issues with making software such as trixbox that allows an average user to configure an IP PBX literally in hours with no prior knowledge. Unfortunately there is a lot to take in and understand it's very easy to have an insecure system. I've dealt with probably 15 or so compromised Asterisk systems in the past six months, all compromised because very basic security measures were not followed.



7 posts

Wannabe Geek


  Reply # 393342 18-Oct-2010 21:20 Send private message

Hi Techmeister,

Please logon to your trixbox and run "asterisk -r" to start the asterisk cli. Then run: "show dialplan" and post the complete output here. Please mask your 2talk username if visible in output.

Possibly there is an issue with outgoing context (IAX2 -> 2talk) and incoming context for the IVR (probably default).

Also put allowguest=no and alwaysauthreject=yes into your sip.conf and restart asterisk or run "sip reload" in asterisk. I am not sure if this goes into sip_additional.conf or so which might be trixbox specific. I prefer manual setup using VI.

19379 posts

Uber Geek
+1 received by user: 1220

Moderator
Trusted
Biddle Corp
Subscriber

  Reply # 393349 18-Oct-2010 21:38 Send private message

bungy: Hi Techmeister,

Please logon to your trixbox and run "asterisk -r" to start the asterisk cli. Then run: "show dialplan" and post the complete output here. Please mask your 2talk username if visible in output.



You mean "dialplan show" Smile

7 posts

Wannabe Geek


  Reply # 393351 18-Oct-2010 21:42 Send private message

both commands are valid Cool at least on 1.4



296 posts

Ultimate Geek
+1 received by user: 9


  Reply # 393382 18-Oct-2010 22:53 Send private message

ok, I'll do that
It's a big file though.




Now on Slingshot Better Network and it's better.

Share Image



296 posts

Ultimate Geek
+1 received by user: 9


  Reply # 393394 18-Oct-2010 23:27 Send private message

Here is the dialplan.

 



 




 

[ Context 'default' created by 'pbx_config' ]
's' => 1. Playback(vm-goodbye) [pbx_config]
2. Macro(hangupcall) [pbx_config]
Include => 'ext-local' [pbx_config]

[ Context 'ext-fax' created by 'pbx_config' ]
'analog_fax' => 1. GotoIf($["${FAX_RX}" = "disabled"]?4:2) [pbx_config]
2. Set(DIAL=${DB(DEVICE/${FAX_RX}/dial)}) [pbx_config]
3. Dial(${DIAL}|20|d) [pbx_config]
4. Hangup() [pbx_config]
'h' => 1. system(/var/lib/asterisk/bin/fax-process.pl --to ${EMAILADDR} --from ${FAX_RX_FROM} --dest "${FROM_DID}" --subject "Fax from ${URIENCODE(${CALLERID(number)})} ${URIENCODE(${CALLERID(name)})}" --attachment fax_${URIENCODE(${CALLERID(number)})}.pdf --typ [pbx_config]
2. Hangup() [pbx_config]
'in_fax' => 1. StopPlayTones() [pbx_config]
2. GotoIf($["${FAX_RX}" = "system"]?3:analog_fax|1) [pbx_config]
3. Macro(faxreceive) [pbx_config]
4. Hangup() [pbx_config]
'out_fax' => 1. txfax(${TXFAX_NAME}|caller) [pbx_config]
2. Hangup() [pbx_config]
's' => 1. Answer() [pbx_config]
2. Goto(in_fax|1) [pbx_config]

[ Context 'block-cf' created by 'pbx_config' ]
'_X.' => 1. Noop(Blocking callforward to ${EXTEN} because CF is blocked) [pbx_config]
2. Hangup() [pbx_config]

[ Context 'findmefollow-ringallv2' created by 'pbx_config' ]
'_FMGL-.' => 1. Noop(In FMGL ${FMGRP} with ${EXTEN:5}) [pbx_config]
2. GotoIf($["${DB(FM/DND/${FMGRP}/${FMUNIQUE})}" = "DND"]?dodnd) [pbx_config]
3. Wait(1) [pbx_config]
4. GotoIf($["${DB(FM/DND/${FMGRP}/${FMUNIQUE})}" = "DND"]?dodnd) [pbx_config]
5. Wait(1) [pbx_config]
6. GotoIf($["${DB(FM/DND/${FMGRP}/${FMUNIQUE})}" = "DND"]?dodnd) [pbx_config]
7. Wait(${FMPRERING}) [pbx_config]
8. GotoIf($["${DB(FM/DND/${FMGRP}/${FMUNIQUE})}" = "DND"]?dodnd) [pbx_config]
9. DBDel(FM/DND/${FMGRP}/${FMUNIQUE}) [pbx_config]
[dodial] 10. Macro(dial|${FMGRPTIME}|${DIAL_OPTIONS}|${EXTEN:5}) [pbx_config]
11. Noop(Ending FMGL ${FMGRP} with ${EXTEN:5} and dialstatus ${DIALSTATUS}) [pbx_config]
12. Hangup() [pbx_config]
[dodnd] 23. DBDel(FM/DND/${FMGRP}/${FMUNIQUE}) [pbx_config]
24. GotoIf($["${FMPRIME}" = "FALSE"]?dodial) [pbx_config]
25. Noop(Got DND in FMGL ${FMGRP} with ${EXTEN:5} in ${RingGroupMethod} mode| aborting) [pbx_config]
26. Hangup() [pbx_config]
'_FMPR-.' => 1. Noop(In FMPR ${FMGRP} with ${EXTEN:5}) [pbx_config]
2. Set(RingGroupMethod=) [pbx_config]
3. Set(USE_CONFIRMATION=) [pbx_config]
4. Set(RINGGROUP_INDEX=) [pbx_config]
5. Macro(simple-dial|${EXTEN:5}|${FMREALPRERING}) [pbx_config]
6. GotoIf($["${DIALSTATUS}" != "BUSY"]?nodnd) [pbx_config]
7. Set(DB(FM/DND/${FMGRP}/${FMUNIQUE})=DND) [pbx_config]
[nodnd] 8. Noop(Ending FMPR ${FMGRP} with ${EXTEN:5} and dialstatus ${DIALSTATUS}) [pbx_config]
9. Hangup() [pbx_config]

[ Context 'ext-local-confirm' created by 'pbx_config' ]
'_LC-.' => 1. Noop(IN ext-local-confirm with - RT: ${RT}| RG_IDX: ${RG_IDX}) [pbx_config]
2. GotoIf($["x${ALERT_INFO}"="x"]?godial) [pbx_config]
3. SIPAddHeader(Alert-Info: ${ALERT_INFO}) [pbx_config]
[godial] 4. dial(${DB(DEVICE/${EXTEN:3}/dial)}|${RT}|M(auto-confirm^${RG_IDX})${DIAL_OPTIONS}) [pbx_config]

[ Context 'macro-dial-confirm' created by 'pbx_config' ]
's' => 1. Set(DB(RG/${ARG4}/${CHANNEL})=RINGING) [pbx_config]
2. Set(__UNIQCHAN=${CHANNEL}) [pbx_config]
3. Set(USE_CONFIRMATION=TRUE) [pbx_config]
4. Set(RINGGROUP_INDEX=${ARG4}) [pbx_config]
5. Set(ARG4=) [pbx_config]
6. Macro(dial|${ARG1}|${ARG2}|${ARG3}) [pbx_config]
7. DBDel(RG/${RINGGROUP_INDEX}/${CHANNEL}) [pbx_config]
8. Set(USE_CONFIRMATION=) [pbx_config]
9. Set(RINGGROUP_INDEX=) [pbx_config]

[ Context 'macro-setmusic' created by 'pbx_config' ]
's' => 1. NoOp(Setting Outbound Route MoH To: ${ARG1}) [pbx_config]
2. SetMusicOnHold(${ARG1}) [pbx_config]

[ Context 'from-internal' created by 'pbx_config' ]
Include => 'from-internal-xfer' [pbx_config]
Include => 'bad-number' [pbx_config]

[ Context 'from-internal-xfer' created by 'pbx_config' ]
'h' => 1. Macro(hangupcall) [pbx_config]
's' => 1. Macro(hangupcall) [pbx_config]
Include => 'from-internal-custom' [pbx_config]
Include => 'parkedcalls' [pbx_config]
Include => 'ext-fax' [pbx_config]
Include => 'ext-local-confirm' [pbx_config]
Include => 'findmefollow-ringallv2' [pbx_config]
Include => 'from-internal-additional' [pbx_config]

[ Context 'from-sip-external' created by 'pbx_config' ]
'h' => 1. NoOp(Hangup) [pbx_config]
'i' => 1. NoOp(Invalid) [pbx_config]
's' => 1. GotoIf($["${ALLOW_SIP_ANON}"="yes"]?from-trunk|${DID}|1) [pbx_config]
2. Set(TIMEOUT(absolute)=15) [pbx_config]
3. Answer() [pbx_config]
4. Wait(2) [pbx_config]
5. Playback(ss-noservice) [pbx_config]
6. Playtones(congestion) [pbx_config]
7. Congestion(5) [pbx_config]
't' => 1. NoOp(Timeout) [pbx_config]
'_.' => 1. NoOp(Received incoming SIP connection from unknown peer to ${EXTEN}) [pbx_config]
2. Set(DID=${IF($["${EXTEN:1:2}"=""]?s:${EXTEN})}) [pbx_config]
3. Goto(s|1) [pbx_config]

[ Context 'macro-saydigits' created by 'pbx_config' ]
's' => 1. Noop(Trying custom SayDigits playback for "${ARG1}") [pbx_config]
2. Playback(tts/custom-${MD5(${ARG1})}) [pbx_config]
3. GotoIf($["${PLAYBACKSTATUS}"="SUCCESS"]?done) [pbx_config]
[tts] 4. Macro(tts-saydigits|${ARG1}|${ARG2}|${ARG3}) [pbx_config]
5. SayDigits(${ARG1}) [pbx_config]
6. Goto(done) [pbx_config]

[ Context 'macro-saynumber' created by 'pbx_config' ]
's' => 1. Noop(Trying custom SayNumber playback for "${ARG1}") [pbx_config]
2. Playback(tts/custom-${MD5(${ARG1})}) [pbx_config]
3. GotoIf($["${PLAYBACKSTATUS}"="SUCCESS"]?done) [pbx_config]
[tts] 4. Macro(tts-saynumber|${ARG1}|${ARG2}|${ARG3}) [pbx_config]
5. SayNumber(${ARG1}) [pbx_config]
6. Goto(done) [pbx_config]
105. Noop(tts handled saynumber) [pbx_config]

[ Context 'macro-sayname' created by 'pbx_config' ]
's' => 1. Noop(Trying custom SayName playback for "${ARG1}") [pbx_config]
2. Playback(tts/custom-${MD5(${ARG1})}) [pbx_config]
3. GotoIf($["${PLAYBACKSTATUS}"="SUCCESS"]?done) [pbx_config]
[tts] 4. Macro(tts-sayalpha|${ARG1}|${ARG2}|${ARG3}) [pbx_config]
5. SayAlpha(${ARG1}) [pbx_config]
6. Goto(done) [pbx_config]
105. Noop(tts handled sayname) [pbx_config]

[ Context 'macro-saytext' created by 'pbx_config' ]
's' => 1. Noop(Trying custom SayText playback for "${ARG1}") [pbx_config]
2. Playback(tts/custom-${MD5(${ARG1})}) [pbx_config]
3. GotoIf($["${PLAYBACKSTATUS}"="SUCCESS"]?done) [pbx_config]
[tts] 4. Macro(tts-saytext|${ARG1}|${ARG2}|${ARG3}) [pbx_config]
5. Noop(No text-to-speech handler for SayText| cannot say "${ARG1}") [pbx_config]
6. Goto(done) [pbx_config]
105. Noop(tts handled saytext) [pbx_config]

[ Context 'macro-privacy-mgr' created by 'pbx_config' ]
's' => 1. Set(KEEPCID=${CALLERID(num)}) [pbx_config]
2. GotoIf($["foo${CALLERID(num):0:1}"="foo+"]?CIDTEST2:CIDTEST1) [pbx_config]
[CIDTEST1] 3. Set(TESTCID=${MATH(1+${CALLERID(num)})}) [pbx_config]
4. Goto(TESTRESULT) [pbx_config]
[CIDTEST2] 5. Set(TESTCID=${MATH(1+${CALLERID(num):1})}) [pbx_config]
[TESTRESULT] 6. GotoIf($["foo${TESTCID}"="foo"]?CLEARCID:PRIVMGR) [pbx_config]
[CLEARCID] 7. Set(CALLERID(num)=) [pbx_config]
[PRIVMGR] 8. PrivacyManager() [pbx_config]
9. GotoIf($["${PRIVACYMGRSTATUS}"="FAILED"]?fail) [pbx_config]
10. SetCallerPres(allowed_passed_screen) [pbx_config]
[fail] 109. Noop(STATUS: ${PRIVACYMGRSTATUS} CID: ${CALLERID(num)} ${CALLERID(name)} CALLPRES: ${CALLLINGPRES}) [pbx_config]
110. Playback(sorry-youre-having-problems) [pbx_config]
111. Playback(goodbye) [pbx_config]
112. Playtones(congestion) [pbx_config]
113. Congestion(5) [pbx_config]

[ Context 'macro-user-logoff' created by 'pbx_config' ]
's' => 1. Set(DEVICETYPE=${DB(DEVICE/${CALLERID(number)}/type)}) [pbx_config]
2. GotoIf($["${DEVICETYPE}" = "fixed"]?s-FIXED|1) [pbx_config]
3. DeadAGI(user_login_out.agi|logout|${CALLERID(number)}) [pbx_config]
[done] 4. Playback(vm-goodbye) [pbx_config]
's-FIXED' => 1. NoOp(Device is FIXED and cannot be logged out of) [pbx_config]
2. Playback(an-error-has-occured&vm-goodbye) [pbx_config]
3. Hangup() [pbx_config]

[ Context 'macro-user-logon' created by 'pbx_config' ]
's' => 1. Set(DEVICETYPE=${DB(DEVICE/${CALLERID(number)}/type)}) [pbx_config]
2. Answer() [pbx_config]
3. Wait(1) [pbx_config]
4. GotoIf($["${DEVICETYPE}" = "fixed"]?s-FIXED|1) [pbx_config]
5. Set(AMPUSER=${ARG1}) [pbx_config]
6. GotoIf($["${AMPUSER}" != ""]?gotpass) [pbx_config]
[playagain] 7. Read(AMPUSER|please-enter-your-extension-then-press-pound|||4) [pbx_config]
8. GotoIf($["${AMPUSER}" = ""]?s-MAXATTEMPTS|1) [pbx_config]
[gotpass] 9. GotoIf($["${DB_EXISTS(AMPUSER/${AMPUSER}/password)}" = "0"]?s-NOUSER|1) [pbx_config]
10. Set(AMPUSERPASS=${DB_RESULT}) [pbx_config]
11. GotoIf($[${LEN(${AMPUSERPASS})} = 0]?s-NOPASSWORD|1) [pbx_config]
12. Set(DEVICEUSER=${DB(DEVICE/${CALLERID(number)}/user)}) [pbx_config]
13. GotoIf($["${DEVICEUSER}" = "${AMPUSER}"]?s-ALREADYLOGGEDON|1) [pbx_config]
14. Authenticate(${AMPUSERPASS}) [pbx_config]
15. DeadAGI(user_login_out.agi|login|${CALLERID(number)}|${AMPUSER}) [pbx_config]
16. Playback(vm-goodbye) [pbx_config]
's-ALREADYLOGGEDON' => 1. NoOp(This device has already been logged into by this user) [pbx_config]
2. Playback(vm-goodbye) [pbx_config]
3. Hangup() [pbx_config]
's-FIXED' => 1. NoOp(Device is FIXED and cannot be logged into) [pbx_config]
2. Playback(ha/phone) [pbx_config]
3. SayDigits(${CALLERID(number)}) [pbx_config]
4. Playback(is-curntly-unavail&vm-goodbye) [pbx_config]
5. Hangup() [pbx_config]
's-MAXATTEMPTS' => 1. NoOp(Too many login attempts) [pbx_config]
2. Playback(vm-goodbye) [pbx_config]
3. Hangup() [pbx_config]
's-NOPASSWORD' => 1. NoOp(This extension does not exist or no password is set) [pbx_config]
2. Playback(pbx-invalid) [pbx_config]
3. Goto(s|playagain) [pbx_config]
's-NOUSER' => 1. NoOp(Invalid extension ${AMPUSER} entered) [pbx_config]
2. Playback(pbx-invalid) [pbx_config]
3. Goto(s|playagain) [pbx_config]

[ Context 'macro-dumpvars' created by 'pbx_config' ]
's' => 1. Noop(ACCOUNTCODE=${ACCOUNTCODE}) [pbx_config]
2. Noop(ANSWEREDTIME=${ANSWEREDTIME}) [pbx_config]
3. Noop(BLINDTRANSFER=${BLINDTRANSFER}) [pbx_config]
4. Noop(CALLERID=${CALLERID(all)}) [pbx_config]
5. Noop(CALLERID(name)=${CALLERID(name)}) [pbx_config]
6. Noop(CALLERID(number)=${CALLERID(number)}) [pbx_config]
7. Noop(CALLINGPRES=${CALLINGPRES}) [pbx_config]
8. Noop(CHANNEL=${CHANNEL}) [pbx_config]
9. Noop(CONTEXT=${CONTEXT}) [pbx_config]
10. Noop(DATETIME=${DATETIME}) [pbx_config]
11. Noop(DIALEDPEERNAME=${DIALEDPEERNAME}) [pbx_config]
12. Noop(DIALEDPEERNUMBER=${DIALEDPEERNUMBER}) [pbx_config]
13. Noop(DIALEDTIME=${DIALEDTIME}) [pbx_config]
14. Noop(DIALSTATUS=${DIALSTATUS}) [pbx_config]
15. Noop(DNID=${DNID}) [pbx_config]
16. Noop(EPOCH=${EPOCH}) [pbx_config]
17. Noop(EXTEN=${EXTEN}) [pbx_config]
18. Noop(HANGUPCAUSE=${HANGUPCAUSE}) [pbx_config]
19. Noop(INVALID_EXTEN=${INVALID_EXTEN}) [pbx_config]
20. Noop(LANGUAGE=${LANGUAGE}) [pbx_config]
21. Noop(MEETMESECS=${MEETMESECS}) [pbx_config]
22. Noop(PRIORITY=${PRIORITY}) [pbx_config]
23. Noop(RDNIS=${RDNIS}) [pbx_config]
24. Noop(SIPDOMAIN=${SIPDOMAIN}) [pbx_config]
25. Noop(SIP_CODEC=${SIP_CODEC}) [pbx_config]
26. Noop(SIPCALLID=${SIPCALLID}) [pbx_config]
27. Noop(SIPUSERAGENT=${SIPUSERAGENT}) [pbx_config]
29. Noop(TXTCIDNAME=${TXTCIDNAME}) [pbx_config]
30. Noop(UNIQUEID=${UNIQUEID}) [pbx_config]
31. Noop(TOUCH_MONITOR=${TOUCH_MONITOR}) [pbx_config]
32. Noop(MACRO_CONTEXT=${MACRO_CONTEXT}) [pbx_config]
33. Noop(MACRO_EXTEN=${MACRO_EXTEN}) [pbx_config]
34. Noop(MACRO_PRIORITY=${MACRO_PRIORITY}) [pbx_config]

[ Context 'macro-dialout-trunk-predial-hook' created by 'pbx_config' ]
's' => 1. MacroExit() [pbx_config]

[ Context 'macro-dialout-default' created by 'pbx_config' ]
's' => 1. Macro(user-callerid|SKIPTTL) [pbx_config]
2. Macro(record-enable|${CALLERID(number)}|OUT) [pbx_config]
3. Macro(outbound-callerid|${ARG1}) [pbx_config]
4. Dial(${OUT}/${ARG1}) [pbx_config]
5. Playtones(congestion) [pbx_config]
6. Congestion(5) [pbx_config]
105. Macro(outisbusy) [pbx_config]

[ Context 'macro-dialout' created by 'pbx_config' ]
's' => 1. Macro(user-callerid|SKIPTTL) [pbx_config]
2. GotoIf($["${ECID${CALLERID(number)}}" = ""]?5) [pbx_config]
3. Set(CALLERID(all)=${ECID${CALLERID(number)}}) [pbx_config]
4. Goto(7) [pbx_config]
5. GotoIf($["${OUTCID_${ARG1}}" = ""]?7) [pbx_config]
6. Set(CALLERID(all)=${OUTCID_${ARG1}}) [pbx_config]
7. Set(length=${LEN(${DIAL_OUT_${ARG1}})}) [pbx_config]
8. Dial(${OUT_${ARG1}}/${ARG2:${length}}) [pbx_config]
9. Playtones(congestion) [pbx_config]
10. Congestion(5) [pbx_config]
109. Macro(outisbusy) [pbx_config]

[ Context 'macro-faxreceive' created by 'pbx_config' ]
's' => 1. Set(FAXFILE=${ASTSPOOLDIR}/fax/${UNIQUEID}.tif) [pbx_config]
2. Set(EMAILADDR=${FAX_RX_EMAIL}) [pbx_config]
3. rxfax(${FAXFILE}) [pbx_config]
103. Set(EMAILADDR=${FAX_RX_EMAIL}) [pbx_config]
104. Goto(3) [pbx_config]

[ Context 'macro-hangupcall' created by 'pbx_config' ]
's' => 1. GotoIf($[ "x${USE_CONFIRMATION}" = "x" | "x${RINGGROUP_INDEX}" = "x" | "${CHANNEL}" != "${UNIQCHAN}"]?skiprg) [pbx_config]
2. Noop(Cleaning Up Confirmation Flag: RG/${RINGGROUP_INDEX}/${CHANNEL}) [pbx_config]
3. DBDel(RG/${RINGGROUP_INDEX}/${CHANNEL}) [pbx_config]
[skiprg] 4. GotoIf($[ "x${BLKVM_BASE}" = "x" | "BLKVM/${BLKVM_BASE}/${CHANNEL}" != "${BLKVM_OVERRIDE}" ]?skipblkvm) [pbx_config]
5. Noop(Cleaning Up Block VM Flag: ${BLKVM_OVERRIDE}) [pbx_config]
6. DBDel(${BLKVM_OVERRIDE}) [pbx_config]
[skipblkvm] 7. GotoIf($[ "x${FMGRP}" = "x" | "x${FMUNIQUE}" = "x" | "${CHANNEL}" != "${FMUNIQUE}" ]?theend) [pbx_config]
8. DBDel(FM/DND/${FMGRP}/${CHANNEL}) [pbx_config]
[theend] 9. Hangup() [pbx_config]

[ Context 'macro-outisbusy' created by 'pbx_config' ]
's' => 1. Playback(all-circuits-busy-now|noanswer) [pbx_config]
2. Playback(pls-try-call-later|noanswer) [pbx_config]
3. Macro(hangupcall) [pbx_config]

[ Context 'macro-rg-group' created by 'pbx_config' ]
's' => 1. Macro(user-callerid|SKIPTTL) [pbx_config]
2. GotoIf($["${CALLERID(name):0:${LEN(${RGPREFIX})}}" != "${RGPREFIX}"]?4:3) [pbx_config]
3. Set(CALLERID(name)=${CALLERID(name):${LEN(${RGPREFIX})}}) [pbx_config]
4. Set(RGPREFIX=${ARG3}) [pbx_config]
5. Set(CALLERID(name)=${RGPREFIX}${CALLERID(name)}) [pbx_config]
6. Set(RecordMethod=Group) [pbx_config]
7. Macro(record-enable|${MACRO_EXTEN}|${RecordMethod}) [pbx_config]
8. Set(RingGroupMethod=${ARG1}) [pbx_config]
9. Macro(dial|${ARG2}|${DIAL_OPTIONS}|${ARG4}) [pbx_config]
10. Set(RingGroupMethod=) [pbx_config]

[ Context 'macro-fixcid' created by 'pbx_config' ]
's' => 1. Set(CALLERID(name)=${CALLERID(name)}) [pbx_config]

[ Context 'macro-get-vmcontext' created by 'pbx_config' ]
's' => 1. Set(VMCONTEXT=${DB(AMPUSER/${ARG1}/voicemail)}) [pbx_config]
2. GotoIf($["foo${VMCONTEXT}" = "foo"]?200:300) [pbx_config]
200. Set(VMCONTEXT=default) [pbx_config]
300. NoOp() [pbx_config]

[ Context 'macro-simple-dial' created by 'pbx_config' ]
'docfb' => 1. GotoIf( $[ "foo${DB(AMPUSER/${CFBEXT}/device)}" = "foo" ]?chlocal) [pbx_config]
2. Dial(Local/${CFBEXT}@ext-local|${RT}|${DIAL_OPTIONS}) [pbx_config]
3. Return() [pbx_config]
[chlocal] 4. Dial(Local/${CFBEXT}@from-internal/n|${RT}|${DIAL_OPTIONS}) [pbx_config]
5. Return() [pbx_config]
'docfu' => 1. GotoIf( $[ "foo${DB(AMPUSER/${CFUEXT}/device)}" = "foo" ]?chlocal) [pbx_config]
2. Dial(Local/${CFUEXT}@ext-local|${RT}|${DIAL_OPTIONS}) [pbx_config]
3. Return() [pbx_config]
[chlocal] 4. Dial(Local/${CFUEXT}@from-internal/n|${RT}|${DIAL_OPTIONS}) [pbx_config]
5. Return() [pbx_config]
's' => 1. Set(EXTTOCALL=${ARG1}) [pbx_config]
2. Set(RT=${ARG2}) [pbx_config]
3. Set(CFUEXT=${DB(CFU/${EXTTOCALL})}) [pbx_config]
4. Set(CFBEXT=${DB(CFB/${EXTTOCALL})}) [pbx_config]
5. Set(CWI_TMP=${CWIGNORE}) [pbx_config]
6. Macro(dial|${RT}|${DIAL_OPTIONS}|${EXTTOCALL}) [pbx_config]
7. Set(__CWIGNORE=${CWI_TMP}) [pbx_config]
8. Set(PR_DIALSTATUS=${DIALSTATUS}) [pbx_config]
9. GosubIf($[$["${PR_DIALSTATUS}"="NOANSWER"] & $["foo${CFUEXT}"!="foo"]]?docfu|1) [pbx_config]
10. GosubIf($[$["${PR_DIALSTATUS}"="BUSY"] & $["foo${CFBEXT}"!="foo"]]?docfb|1) [pbx_config]
11. Set(DIALSTATUS=${PR_DIALSTATUS}) [pbx_config]
12. Goto(s-${DIALSTATUS}|1) [pbx_config]
'_s-.' => 1. NoOp(Extension is reporting ${EXTEN}) [pbx_config]

[ Context 'macro-exten-vm' created by 'pbx_config' ]
'docfb' => 1. Set(RTCFB=${IF($["${VMBOX}"!="novm"]?${RINGTIMER}:"")}) [pbx_config]
2. Dial(Local/${CFBEXT}@from-internal/n|${RTCFB}|${DIAL_OPTIONS}) [pbx_config]
3. Return() [pbx_config]
'docfu' => 1. Set(RTCFU=${IF($["${VMBOX}"!="novm"]?${RINGTIMER}:"")}) [pbx_config]
2. Dial(Local/${CFUEXT}@from-internal/n|${RTCFU}|${DIAL_OPTIONS}) [pbx_config]
3. Return() [pbx_config]
'exit' => 1. Playback(beep&line-busy-transfer-menu&silence/1) [pbx_config]
[return] 2. MacroExit() [pbx_config]
's' => 1. Macro(user-callerid) [pbx_config]
2. Set(RingGroupMethod=none) [pbx_config]
3. Set(VMBOX=${ARG1}) [pbx_config]
4. Set(EXTTOCALL=${ARG2}) [pbx_config]
5. Set(CFUEXT=${DB(CFU/${EXTTOCALL})}) [pbx_config]
6. Set(CFBEXT=${DB(CFB/${EXTTOCALL})}) [pbx_config]
7. Set(RT=${IF($[$["${VMBOX}"!="novm"] | $["foo${CFUEXT}"!="foo"]]?${RINGTIMER}:"")}) [pbx_config]
8. Macro(record-enable|${EXTTOCALL}|IN) [pbx_config]
9. Macro(dial|${RT}|${DIAL_OPTIONS}|${EXTTOCALL}) [pbx_config]
10. GotoIf($[ $["${VMBOX}" != "novm"] & $["${SCREEN}" != ""] & $["${DIALSTATUS}" = "NOANSWER"] ]?exit|return) [pbx_config]
11. Set(SV_DIALSTATUS=${DIALSTATUS}) [pbx_config]
12. GosubIf($[$["${SV_DIALSTATUS}"="NOANSWER"] & $["${CFUEXT}"!=""] & $["${SCREEN}" = ""]]?docfu|1) [pbx_config]
13. GosubIf($[$["${SV_DIALSTATUS}"="BUSY"] & $["${CFBEXT}"!=""]]?docfb|1) [pbx_config]
14. Set(DIALSTATUS=${SV_DIALSTATUS}) [pbx_config]
15. NoOp(Voicemail is ${VMBOX}) [pbx_config]
16. GotoIf($["${VMBOX}" = "novm"]?s-${DIALSTATUS}|1) [pbx_config]
17. NoOp(Sending to Voicemail box ${EXTTOCALL}) [pbx_config]
18. Macro(vm|${VMBOX}|${DIALSTATUS}|${IVR_RETVM}) [pbx_config]
's-BUSY' => 1. NoOp(Extension is reporting BUSY and not passing to Voicemail) [pbx_config]
2. GotoIf($["${IVR_RETVM}" = "RETURN" & "${IVR_CONTEXT}" != ""]?exit|1) [pbx_config]
3. Playtones(busy) [pbx_config]
4. Busy(20) [pbx_config]
'_s-.' => 1. Noop(IVR_RETVM: ${IVR_RETVM} IVR_CONTEXT: ${IVR_CONTEXT}) [pbx_config]
2. GotoIf($["${IVR_RETVM}" = "RETURN" & "${IVR_CONTEXT}" != ""]?exit|1) [pbx_config]
3. Playtones(congestion) [pbx_config]
4. Congestion(10) [pbx_config]

[ Context 'macro-dial' created by 'pbx_config' ]
'DONTCALL' => 1. Answer() [pbx_config]
2. Wait(1) [pbx_config]
3. Zapateller() [pbx_config]
4. Playback(ss-noservice) [pbx_config]
5. Macro(hangupcall) [pbx_config]
'NOANSWER' => 1. Macro(vm|${SCREEN_EXTEN}|BUSY|${IVR_RETVM}) [pbx_config]
2. GotoIf($["${IVR_RETVM}" != "RETURN" | "${IVR_CONTEXT}" = ""]?bye) [pbx_config]
3. Return() [pbx_config]
[bye] 4. Macro(hangupcall) [pbx_config]
'TORTURE' => 1. Goto(app-blackhole|musiconhold|1) [pbx_config]
2. Macro(hangupcall) [pbx_config]
'h' => 1. Macro(hangupcall) [pbx_config]
's' => 1. GotoIf($["${MOHCLASS}" = ""]?dial) [pbx_config]
2. SetMusicOnHold(${MOHCLASS}) [pbx_config]
[dial] 3. AGI(dialparties.agi) [pbx_config]
4. NoOp(Returned from dialparties with no extensions to call and DIALSTATUS: ${DIALSTATUS}) [pbx_config]
[normdial] 7. Dial(${ds}) [pbx_config]
8. Set(DIALSTATUS=${IF($["${DIALSTATUS_CW}"!="" ]?${DIALSTATUS_CW}:${DIALSTATUS})}) [pbx_config]
9. GosubIf($["${SCREEN}" != ""]?${DIALSTATUS}|1) [pbx_config]
[huntdial] 20. NoOp(Returned from dialparties with hunt groups to dial ) [pbx_config]
21. Set(HuntLoop=0) [pbx_config]
[a22] 22. GotoIf($[${HuntMembers} >= 1]?a30) [pbx_config]
23. NoOp(Returning there are no members left in the hunt group to ring) [pbx_config]
[a30] 26. Set(HuntMember=HuntMember${HuntLoop}) [pbx_config]
27. GotoIf($[$["${CALLTRACE_HUNT}" != "" ] & $[$["${RingGroupMethod}" = "hunt" ] | $["${RingGroupMethod}" = "firstavailable"] | $["${RingGroupMethod}" = "firstnotonphone"]]]?a32:a35) [pbx_config]
[a32] 28. Set(CT_EXTEN=${CUT(FILTERED_DIAL||$[${HuntLoop} + 1])}) [pbx_config]
29. Set(DB(CALLTRACE/${CT_EXTEN})=${CALLTRACE_HUNT}) [pbx_config]
30. Goto(s|a42) [pbx_config]
[a35] 31. GotoIf($[$["${CALLTRACE_HUNT}" != "" ] & $["${RingGroupMethod}" = "memoryhunt" ]]?a36:a50) [pbx_config]
[a36] 32. Set(CTLoop=0) [pbx_config]
[a37] 33. GotoIf($[${CTLoop} > ${HuntLoop}]?a42) [pbx_config]
34. Set(CT_EXTEN=${CUT(FILTERED_DIAL||$[${CTLoop} + 1])}) [pbx_config]
35. Set(DB(CALLTRACE/${CT_EXTEN})=${CALLTRACE_HUNT}) [pbx_config]
36. Set(CTLoop=$[1 + ${CTLoop}]) [pbx_config]
37. Goto(s|a37) [pbx_config]
[a42] 38. Dial(${${HuntMember}}${ds}) [pbx_config]
39. Set(HuntLoop=$[1 + ${HuntLoop}]) [pbx_config]
40. GotoIf($[$[$["foo${RingGroupMethod}" != "foofirstavailable"] & $["foo${RingGroupMethod}" != "foofirstnotonphone"]] | $["foo${DialStatus}" = "fooBUSY"]]?a46) [pbx_config]
41. Set(HuntMembers=0) [pbx_config]
[a46] 42. Set(HuntMembers=$[${HuntMembers} - 1]) [pbx_config]
43. Goto(s|a22) [pbx_config]
[a50] 44. DBdel(CALLTRACE/${CT_EXTEN}) [pbx_config]
45. Goto(s|a42) [pbx_config]

[ Context 'from-did-direct' created by 'pbx_config' ]
Include => 'ext-findmefollow' [pbx_config]
Include => 'ext-local' [pbx_config]

[ Context 'from-pstn-toheader' created by 'pbx_config' ]
's' => 1. Goto(from-pstn|${CUT(CUT(SIP_HEADER(To)|@|1)|:|2)}|1) [pbx_config]

[ Context 'from-pstn-e164-us' created by 'pbx_config' ]
's' => 1. Set(CALLERID(number)=${CALLERID(number):2}) [pbx_config]
's' => 1. Set(CALLERID(number)=011${CALLERID(number):1}) [pbx_config]
's' => 2. Goto(from-pstn|${EXTEN}|1) [pbx_config]
's' => 2. Goto(from-pstn|${EXTEN}|1) [pbx_config]
's' => 1. Goto(from-pstn|${EXTEN}|1) [pbx_config]
'_+1NXXNXXXXXX' => 1. Set(CALLERID(number)=${CALLERID(number):2}) [pbx_config]
'_+1NXXNXXXXXX' => 1. Set(CALLERID(number)=011${CALLERID(number):1}) [pbx_config]
'_+1NXXNXXXXXX' => 2. Goto(from-pstn|${EXTEN:2}|1) [pbx_config]
'_+1NXXNXXXXXX' => 2. Goto(from-pstn|${EXTEN:2}|1) [pbx_config]
'_+1NXXNXXXXXX' => 1. Goto(from-pstn|${EXTEN:2}|1) [pbx_config]
'_[0-9+].' => 1. Set(CALLERID(number)=${CALLERID(number):2}) [pbx_config]
'_[0-9+].' => 1. Set(CALLERID(number)=011${CALLERID(number):1}) [pbx_config]
'_[0-9+].' => 2. Goto(from-pstn|${EXTEN}|1) [pbx_config]
'_[0-9+].' => 2. Goto(from-pstn|${EXTEN}|1) [pbx_config]
'_[0-9+].' => 1. Goto(from-pstn|${EXTEN}|1) [pbx_config]

[ Context 'from-pstn' created by 'pbx_config' ]
'fax' => 1. Goto(ext-fax|in_fax|1) [pbx_config]
Include => 'from-pstn-custom' [pbx_config]
Include => 'ext-did' [pbx_config]
Include => 'ext-did-post-custom' [pbx_config]
Include => 'from-did-direct' [pbx_config]
Include => 'ext-did-catchall' [pbx_config]

[ Context 'from-trunk' created by 'pbx_config' ]
Include => 'from-pstn' [pbx_config]

[ Context 'macro-presence-playnotification' created by 'pbx_config' ]
's' => 1. Wait(1) [pbx_config]
2. Set(_REALCALLERIDNUM=${REALCALLERIDNUM}) [pbx_config]
3. GotoIf($["${ARG1}" = ""]?play-extension:play-name-recording) [pbx_config]
[play-name-recording] 4. Playback(${ARG1}) [pbx_config]
5. Goto(available) [pbx_config]
[play-extension] 6. Playback(extension) [pbx_config]
7. SayDigits(${EXTENSION}) [pbx_config]
[available] 8. Playback(is&available) [pbx_config]
9. GotoIf($["${ARG2}" = ""]?speech-connect:end-novm) [pbx_config]
[speech-connect] 10. Playback(custom/would-you-like-to-connect) [pbx_config]
11. Read(CONNECTME|press-1|1) [pbx_config]
12. ExecIf($[${CONNECTME} = 1]|Macro|user-callerid) [pbx_config]
13. ExecIf($[${CONNECTME} = 1]|Dial|Local/${EXTENSION}@from-internal) [pbx_config]
14. SET(MACRO_RESULT=ABORT) [pbx_config]

[ Context 'presence-notify' created by 'pbx_config' ]
'_X.' => 1. Answer() [pbx_config]
2. Set(DIAL=${IF($["${NOTIFY_VM}" = ""]?Local/*80${EXTEN}@from-internal:Local/${EXTEN}@presence-vm-notify)}) [pbx_config]
3. Dial(${DIAL}|30|M(presence-playnotification^${NAME_RECORDING}^${NOTIFY_VM})) [pbx_config]
4. Hangup() [pbx_config]

[ Context 'presence-vm-notify' created by 'pbx_config' ]
'_X.' => 1. Answer() [pbx_config]
2. Voicemail(${EXTEN}@default|s) [pbx_config]

[ Context 'record-unavail-vm' created by 'pbx_config' ]
's' => 1. Answer() [pbx_config]
2. AGI(record-vm-greetings.php|unavail) [pbx_config]
3. Hangup() [pbx_config]

[ Context 'record-busy-vm' created by 'pbx_config' ]
's' => 1. Answer() [pbx_config]
2. AGI(record-vm-greetings.php|busy) [pbx_config]
3. Hangup() [pbx_config]

[ Context 'record-name-vm' created by 'pbx_config' ]
's' => 1. Answer() [pbx_config]
2. AGI(record-vm-greetings.php|name) [pbx_config]
3. Hangup() [pbx_config]

[ Context 'record-temp-vm' created by 'pbx_config' ]
's' => 1. Answer() [pbx_config]
2. AGI(record-vm-greetings.php|temp) [pbx_config]
3. Hangup() [pbx_config]

[ Context 'custom-meetme3' created by 'pbx_config' ]
's' => 1. Answer() [pbx_config]
2. Wait(3) [pbx_config]
3. CBMysql() [pbx_config]
4. Hangup() [pbx_config]

[ Context 'from-internal-custom' created by 'pbx_config' ]

[ Context 'from-internal-additional' created by 'pbx_config' ]
'h' => 1. Hangup() [pbx_config]
Include => 'from-internal-additional-custom' [pbx_config]
Include => 'app-pbdirectory' [pbx_config]
Include => 'app-callwaiting-cwoff' [pbx_config]
Include => 'app-callwaiting-cwon' [pbx_config]
Include => 'app-speeddial' [pbx_config]
Include => 'app-fmf-toggle' [pbx_config]
Include => 'ext-findmefollow' [pbx_config]
Include => 'fmgrps' [pbx_config]
Include => 'app-languages' [pbx_config]
Include => 'app-dictate-record' [pbx_config]
Include => 'app-dictate-send' [pbx_config]
Include => 'app-blacklist' [pbx_config]
Include => 'vmblast-grp' [pbx_config]
Include => 'ext-group' [pbx_config]
Include => 'grps' [pbx_config]
Include => 'app-dialvm' [pbx_config]
Include => 'app-vmmain' [pbx_config]
Include => 'ext-queues' [pbx_config]
Include => 'app-cf-busy-off' [pbx_config]
Include => 'app-cf-busy-off-any' [pbx_config]
Include => 'app-cf-busy-on' [pbx_config]
Include => 'app-cf-off' [pbx_config]
Include => 'app-cf-off-any' [pbx_config]
Include => 'app-cf-on' [pbx_config]
Include => 'app-cf-unavailable-off' [pbx_config]
Include => 'app-cf-unavailable-on' [pbx_config]
Include => 'ext-meetme' [pbx_config]
Include => 'app-recordings' [pbx_config]
Include => 'ext-paging' [pbx_config]
Include => 'app-calltrace' [pbx_config]
Include => 'app-directory' [pbx_config]
Include => 'app-echo-test' [pbx_config]
Include => 'app-speakextennum' [pbx_config]
Include => 'app-speakingclock' [pbx_config]
Include => 'app-queueprio' [pbx_config]
Include => 'app-dnd-off' [pbx_config]
Include => 'app-dnd-on' [pbx_config]
Include => 'app-dnd-toggle' [pbx_config]
Include => 'ext-dnd-hints' [pbx_config]
Include => 'app-userlogonoff' [pbx_config]
Include => 'app-pickup' [pbx_config]
Include => 'app-zapbarge' [pbx_config]
Include => 'app-chanspy' [pbx_config]
Include => 'ext-test' [pbx_config]
Include => 'ext-local' [pbx_config]
Include => 'outbound-allroutes' [pbx_config]

[ Context 'macro-vm' created by 'pbx_config' ]
'a' => 1. Macro(get-vmcontext|${ARG1}) [pbx_config]
2. GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/*/ext)}" = "0"]?adef|1) [pbx_config]
3. Set(VMX_ADEST_EXT=${DB_RESULT}) [pbx_config]
4. GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/*/context)}" = "1"]?acontext) [pbx_config]
5. Set(DB_RESULT=${VMX_CONTEXT}) [pbx_config]
[acontext] 6. Set(VMX_ADEST_CONTEXT=${DB_RESULT}) [pbx_config]
7. GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/*/pri)}" = "1"]?apri) [pbx_config]
8. Set(DB_RESULT=${VMX_PRI}) [pbx_config]
[apri] 9. Set(VMX_ADEST_PRI=${DB_RESULT}) [pbx_config]
10. Goto(${VMX_ADEST_CONTEXT}|${VMX_ADEST_EXT}|${VMX_ADEST_PRI}) [pbx_config]
'adef' => 1. VoiceMailMain(${ARG1}@${VMCONTEXT}) [pbx_config]
2. GotoIf($["${ARG3}" = "RETURN"]?exit-RETURN|1) [pbx_config]
3. Hangup() [pbx_config]
'dovm' => 1. Noop(VMX Timeout - go to voicemail) [pbx_config]
2. VoiceMail(${ARG1}@${VMCONTEXT}|${VMX_OPTS}${VMGAIN}) [pbx_config]
3. Goto(exit-${VMSTATUS}|1) [pbx_config]
'exit-FAILED' => 1. Playback(im-sorry&an-error-has-occured) [pbx_config]
2. GotoIf($["${ARG3}" = "RETURN"]?exit-RETURN|1) [pbx_config]
3. Hangup() [pbx_config]
'exit-RETURN' => 1. Noop(Returning From Voicemail because macro) [pbx_config]
'exit-SUCCESS' => 1. GotoIf($["${ARG3}" = "RETURN"]?exit-RETURN|1) [pbx_config]
2. Playback(goodbye) [pbx_config]
3. Hangup() [pbx_config]
'exit-USEREXIT' => 1. GotoIf($["${ARG3}" = "RETURN"]?exit-RETURN|1) [pbx_config]
2. Playback(goodbye) [pbx_config]
3. Hangup() [pbx_config]
'o' => 1. Playback(one-moment-please) [pbx_config]
2. GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/0/ext)}" = "0"]?doopdef) [pbx_config]
3. Set(VMX_OPDEST_EXT=${DB_RESULT}) [pbx_config]
4. GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/0/context)}" = "1"]?opcontext) [pbx_config]
5. Set(DB_RESULT=${VMX_CONTEXT}) [pbx_config]
[opcontext] 6. Set(VMX_OPDEST_CONTEXT=${DB_RESULT}) [pbx_config]
7. GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/0/pri)}" = "1"]?oppri) [pbx_config]
8. Set(DB_RESULT=${VMX_PRI}) [pbx_config]
[oppri] 9. Set(VMX_OPDEST_PRI=${DB_RESULT}) [pbx_config]
10. Goto(${VMX_OPDEST_CONTEXT}|${VMX_OPDEST_EXT}|${VMX_OPDEST_PRI}) [pbx_config]
[doopdef] 11. GotoIf($["x${OPERATOR_XTN}"="x"]?nooper:from-internal|${OPERATOR_XTN}|1) [pbx_config]
[nooper] 12. GotoIf($["x${FROM_DID}"="x"]?nodid) [pbx_config]
13. Dial(Local/${FROM_DID}@from-pstn|) [pbx_config]
14. Macro(hangup|) [pbx_config]
[nodid] 15. Dial(Local/s@from-pstn|) [pbx_config]
16. Macro(hangup|) [pbx_config]
's' => 1. Macro(user-callerid|SKIPTTL) [pbx_config]
2. Set(VMGAIN=${IF($["foo${VM_GAIN}"!="foo"]?"g(${VM_GAIN})":"")}) [pbx_config]
3. GotoIf($["foo${DB(${BLKVM_OVERRIDE})}" != "fooTRUE"]?vmx|1) [pbx_config]
4. Noop(CAME FROM: ${NODEST} - Blocking VM cause of key: ${DB(BLKVM_OVERRIDE)}) [pbx_config]
5. Hangup() [pbx_config]
's-BUSY' => 1. Noop(BUSY voicemail) [pbx_config]
2. Macro(get-vmcontext|${ARG1}) [pbx_config]
3. VoiceMail(${ARG1}@${VMCONTEXT}|${VM_OPTS}b${VMGAIN}) [pbx_config]
4. Goto(exit-${VMSTATUS}|1) [pbx_config]
's-DIRECTDIAL' => 1. Noop(DIRECTDIAL voicemail) [pbx_config]
2. Macro(get-vmcontext|${ARG1}) [pbx_config]
3. VoiceMail(${ARG1}@${VMCONTEXT}|${VM_OPTS}${VM_DDTYPE}${VMGAIN}) [pbx_config]
4. Goto(exit-${VMSTATUS}|1) [pbx_config]
's-NOMESSAGE' => 1. Noop(NOMESSAGE (beeb only) voicemail) [pbx_config]
2. Macro(get-vmcontext|${ARG1}) [pbx_config]
3. VoiceMail(${ARG1}@${VMCONTEXT}|s${VM_OPTS}${VMGAIN}) [pbx_config]
4. Goto(exit-${VMSTATUS}|1) [pbx_config]
't' => 1. Hangup() [pbx_config]
'vmx' => 1. GotoIf($["${ARG2}"="NOMESSAGE"]?s-${ARG2}|1) [pbx_config]
2. Set(MODE=${IF($["${ARG2}"="BUSY"]?busy:unavail)}) [pbx_config]
3. GotoIf($["${ARG2}" != "DIRECTDIAL"]?notdirect) [pbx_config]
4. Set(MODE=${IF($["${REGEX("[b]" ${VM_DDTYPE})}" = "1"]?busy:${MODE})}) [pbx_config]
[notdirect] 5. Noop(Checking if ext ${ARG1} is enabled: ${DB(AMPUSER/${ARG1}/vmx/${MODE}/state)}) [pbx_config]
6. GotoIf($["${DB(AMPUSER/${ARG1}/vmx/${MODE}/state)}" != "enabled"]?s-${ARG2}|1) [pbx_config]
7. Macro(get-vmcontext|${ARG1}) [pbx_config]
8. GotoIf($[(${STAT(f|${ASTSPOOLDIR}/voicemail/${VMCONTEXT}/${ARG1}/temp.wav)} = 1) || (${STAT(f|${ASTSPOOLDIR}/voicemail/${VMCONTEXT}/${ARG1}/temp.WAV)} = 1)]?tmpgreet) [pbx_config]
9. GotoIf($[(${STAT(f|${ASTSPOOLDIR}/voicemail/${VMCONTEXT}/${ARG1}/${MODE}.wav)} = 0) && (${STAT(f|${ASTSPOOLDIR}/voicemail/${VMCONTEXT}/${ARG1}/${MODE}.WAV)} = 0)]?nofile) [pbx_config]
10. Set(LOOPCOUNT=0) [pbx_config]
11. GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/repeat)}" = "0"]?vmxtime) [pbx_config]
12. Set(VMX_REPEAT=${DB_RESULT}) [pbx_config]
[vmxtime] 13. GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/timeout)}" = "0"]?vmxloops) [pbx_config]
14. Set(VMX_TIMEOUT=${DB_RESULT}) [pbx_config]
[vmxloops] 15. GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/loops)}" = "0"]?vmxanswer) [pbx_config]
16. Set(VMX_LOOPS=${DB_RESULT}) [pbx_config]
[vmxanswer] 17. Answer() [pbx_config]
[loopstart] 18. Read(ACTION|${ASTSPOOLDIR}/voicemail/${VMCONTEXT}/${ARG1}/${MODE}|1|skip|${VMX_REPEAT}|${VMX_TIMEOUT}) [pbx_config]
19. GotoIf($["${EXISTS(${ACTION})}" = "1"]?checkopt) [pbx_config]
[noopt] 20. Noop(Timeout: going to timeout dest) [pbx_config]
21. Set(VMX_OPTS=${VMX_OPTS_TIMEOUT}) [pbx_config]
22. GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/vmxopts/timeout)}" = "0"]?chktime) [pbx_config]
23. Set(VMX_OPTS=${DB_RESULT}) [pbx_config]
[chktime] 24. GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/timedest/ext)}" = "0"]?dotime) [pbx_config]
25. Set(VMX_TIMEDEST_EXT=${DB_RESULT}) [pbx_config]
26. GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/timedest/context)}" = "0"]?timepri) [pbx_config]
27. Set(VMX_TIMEDEST_CONTEXT=${DB_RESULT}) [pbx_config]
[timepri] 28. GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/timedest/pri)}" = "0"]?dotime) [pbx_config]
29. Set(VMX_TIMEDEST_PRI=${DB_RESULT}) [pbx_config]
[dotime] 30. Goto(${VMX_TIMEDEST_CONTEXT}|${VMX_TIMEDEST_EXT}|${VMX_TIMEDEST_PRI}) [pbx_config]
[checkopt] 31. GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/${ACTION}/ext)}" = "1"]?doopt) [pbx_config]
32. GotoIf($["${ACTION}" = "0"]?o|1) [pbx_config]
33. GotoIf($["${ACTION}" = "*"]?adef|1) [pbx_config]
34. Set(LOOPCOUNT=$[${LOOPCOUNT} + 1]) [pbx_config]
35. GotoIf($[${LOOPCOUNT} > ${VMX_LOOPS}]?toomany) [pbx_config]
36. Playback(pm-invalid-option&please-try-again) [pbx_config]
37. Goto(loopstart) [pbx_config]
[toomany] 38. Noop(Too Many invalid entries| got to invalid dest) [pbx_config]
39. Set(VMX_OPTS=${VMX_OPTS_LOOPS}) [pbx_config]
40. GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/vmxopts/loops)}" = "0"]?chkloop) [pbx_config]
41. Set(VMX_OPTS=${DB_RESULT}) [pbx_config]
[chkloop] 42. GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/loopdest/ext)}" = "0"]?doloop) [pbx_config]
43. Set(VMX_LOOPDEST_EXT=${DB_RESULT}) [pbx_config]
44. GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/loopdest/context)}" = "0"]?looppri) [pbx_config]
45. Set(VMX_LOOPDEST_CONTEXT=${DB_RESULT}) [pbx_config]
[looppri] 46. GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/loopdest/pri)}" = "0"]?doloop) [pbx_config]
47. Set(VMX_LOOPDEST_PRI=${DB_RESULT}) [pbx_config]
[doloop] 48. Goto(${VMX_LOOPDEST_CONTEXT}|${VMX_LOOPDEST_EXT}|${VMX_LOOPDEST_PRI}) [pbx_config]
[doopt] 49. Noop(Got a valid option: ${DB_RESULT}) [pbx_config]
50. Set(VMX_EXT=${DB_RESULT}) [pbx_config]
51. GotoIf($["${VMX_EXT}" != "dovm"]?getdest) [pbx_config]
[vmxopts] 52. Set(VMX_OPTS=${VMX_OPTS_DOVM}) [pbx_config]
53. GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/vmxopts/dovm)}" = "0"]?vmxdovm) [pbx_config]
[vmxopts] 54. Set(VMX_OPTS=${DB_RESULT}) [pbx_config]
[vmxdovm] 55. Goto(dovm|1) [pbx_config]
[getdest] 56. GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/${ACTION}/context)}" = "0"]?vmxpri) [pbx_config]
57. Set(VMX_CONTEXT=${DB_RESULT}) [pbx_config]
[vmxpri] 58. GotoIf($["${DB_EXISTS(AMPUSER/${ARG1}/vmx/${MODE}/${ACTION}/pri)}" = "0"]?vmxgoto) [pbx_config]
59. Set(VMX_PRI=${DB_RESULT}) [pbx_config]
[vmxgoto] 60. Goto(${VMX_CONTEXT}|${VMX_EXT}|${VMX_PRI}) [pbx_config]
[nofile] 61. Noop(File for mode: ${MODE} does not exist| SYSTEMSTATUS: ${SYSTEMSTATUS}| going to normal voicemail) [pbx_config]
62. Goto(s-${ARG2}|1) [pbx_config]
[tmpgreet] 63. Noop(Temporary Greeting Detected| going to normal voicemail) [pbx_config]
64. Goto(s-${ARG2}|1) [pbx_config]
'_s-.' => 1. Macro(get-vmcontext|${ARG1}) [pbx_config]
2. VoiceMail(${ARG1}@${VMCONTEXT}|${VM_OPTS}u${VMGAIN}) [pbx_config]
3. Goto(exit-${VMSTATUS}|1) [pbx_config]
Include => 'macro-vm-custom' [pbx_config]

[ Context 'vm-callme' created by 'pbx_config' ]
'#' => 1. Playback(vm-goodbye) [pbx_config]
2. Hangup() [pbx_config]
'*' => 1. Macro(get-vmcontext|${MBOX}) [pbx_config]
2. VoiceMailMain(${MBOX}@${VMCONTEXT}|s) [pbx_config]
'5' => 1. Goto(s|repeat) [pbx_config]
'h' => 1. Hangup() [pbx_config]
'i' => 1. Playback(pm-invalid-option) [pbx_config]
2. Goto(s|repeat) [pbx_config]
's' => 1. Answer() [pbx_config]
2. Wait(1) [pbx_config]
[repeat] 3. Background(${MSG}&silence/2&vm-repeat&vm-starmain) [pbx_config]
4. WaitExten(15|) [pbx_config]
't' => 1. Playback(vm-goodbye) [pbx_config]
2. Hangup() [pbx_config]
Include => 'vm-callme-custom' [pbx_config]

[ Context 'from-zaptel' created by 'pbx_config' ]
'fax' => 1. Goto(ext-fax|in_fax|1) [pbx_config]
's' => 1. Noop(Entering from-zaptel with DID == ${DID}) [pbx_config]
2. Ringing() [pbx_config]
3. Set(DID=${IF($["${DID}"= ""]?s:${DID})}) [pbx_config]
4. Noop(DID is now ${DID}) [pbx_config]
5. GotoIf($["${CHANNEL:0:3}"="Zap"]?zapok:notzap) [pbx_config]
[notzap] 6. Goto(from-pstn|${DID}|1) [pbx_config]
7. Macro(Hangupcall|dummy) [pbx_config]
[zapok] 8. Noop(Is a Zaptel Channel) [pbx_config]
9. Set(CHAN=${CHANNEL:4}) [pbx_config]
10. Set(CHAN=${CUT(CHAN|-|1)}) [pbx_config]
11. Macro(from-zaptel-${CHAN}|${DID}|1) [pbx_config]
12. Noop(Returned from Macro from-zaptel-${CHAN}) [pbx_config]
13. Goto(from-pstn|${DID}|1) [pbx_config]
'_X.' => 1. Set(DID=${EXTEN}) [pbx_config]
2. Goto(s|1) [pbx_config]
Include => 'from-zaptel-custom' [pbx_config]

[ Context 'macro-systemrecording' created by 'pbx_config' ]
'*' => 1. Goto(dorecord|1) [pbx_config]
'1' => 1. Goto(docheck|dc_start) [pbx_config]
'confmenu' => 1. Background(to-listen-to-it&press-1&to-rerecord-it&press-star&astcc-followed-by-pound|m|${CHANNEL(language)}|macro-systemrecording) [pbx_config]
2. Read(RECRESULT||1|||4) [pbx_config]
3. GotoIf($["x${RECRESULT}"="x*"]?dorecord|1) [pbx_config]
4. GotoIf($["x${RECRESULT}"="x1"]?docheck|2) [pbx_config]
5. Goto(1) [pbx_config]
'docheck' => 1. Playback(beep) [pbx_config]
[dc_start] 2. Background(${RECFILE}|m|${CHANNEL(language)}|macro-systemrecording) [pbx_config]
3. Wait(1) [pbx_config]
4. Goto(confmenu|1) [pbx_config]
'dorecord' => 1. System(rm ${ASTVARLIBDIR}/sounds/${RECFILE}.*) [pbx_config]
2. Record(${RECFILE}:wav) [pbx_config]
3. Wait(1) [pbx_config]
4. Goto(confmenu|1) [pbx_config]
'h' => 1. Hangup() [pbx_config]
'i' => 1. Playback(pm-invalid-option) [pbx_config]
2. Goto(confmenu|1) [pbx_config]
's' => 1. Set(RECFILE=${IF($["${ARG2}" = ""]?/tmp/${AMPUSER}-ivrrecording:${ARG2})}) [pbx_config]
2. ExecIf($["${ARG3}" != ""]|Authenticate|${ARG3}) [pbx_config]
3. Goto(${ARG1}|1) [pbx_config]
't' => 1. Playback(goodbye) [pbx_config]
2. Hangup() [pbx_config]
Include => 'macro-systemrecording-custom' [pbx_config]

[ Context 'macro-agent-del' created by 'pbx_config' ]
's' => 1. Wait(1) [pbx_config]
2. Macro(user-callerid|SKIPTTL) [pbx_config]
[a3] 3. Read(CALLBACKNUM|agent-logoff||||) [pbx_config]
4. GotoIf($["${CALLBACKNUM}" = ""]?a5:a7) [pbx_config]
[a5] 5. Set(CALLBACKNUM=${AMPUSER}) [pbx_config]
6. ExecIf($["${CALLBACKNUM}" = ""]|Set|CALLBACKNUM=${CALLERID(number)}) [pbx_config]
7. GotoIf($["${CALLBACKNUM}" = ""]?a3) [pbx_config]
[a7] 8. RemoveQueueMember(${ARG1}|Local/${CALLBACKNUM}@from-internal/n) [pbx_config]
9. UserEvent(RefreshQueue) [pbx_config]
10. Wait(1) [pbx_config]
11. Playback(agent-loggedoff) [pbx_config]
12. Hangup() [pbx_config]
Include => 'macro-agent-del-custom' [pbx_config]

[ Context 'macro-agent-add' created by 'pbx_config' ]
's' => 1. Wait(1) [pbx_config]
2. Macro(user-callerid|SKIPTTL) [pbx_config]
[a3] 3. Read(CALLBACKNUM|agent-login||||) [pbx_config]
4. GotoIf($["${CALLBACKNUM}" != ""]?a7) [pbx_config]
[a5] 5. Set(CALLBACKNUM=${AMPUSER}) [pbx_config]
6. ExecIf($["${CALLBACKNUM}" = ""]|Set|CALLBACKNUM=${CALLERID(number)}) [pbx_config]
7. GotoIf($["${CALLBACKNUM}" = ""]?a3) [pbx_config]
[a7] 8. GotoIf($["${CALLBACKNUM}" = "${ARG1}"]?invalid) [pbx_config]
9. ExecIf($["${QREGEX}" != ""]|GotoIf|$["${REGEX("${QREGEX}" ${CALLBACKNUM})}" = "0"]?invalid) [pbx_config]
10. ExecIf($["${ARG2}" != ""]|Authenticate|${ARG2}) [pbx_config]
[a9] 11. AddQueueMember(${ARG1}|Local/${CALLBACKNUM}@from-internal/n) [pbx_config]
12. UserEvent(Agentlogin|Agent: ${CALLBACKNUM}) [pbx_config]
13. Wait(1) [pbx_config]
14. Playback(agent-loginok&with&extension) [pbx_config]
15. SayDigits(${CALLBACKNUM}) [pbx_config]
16. Hangup() [pbx_config]
17. MacroExit() [pbx_config]
[invalid] 18. Playback(pbx-invalid) [pbx_config]
19. Goto(a3) [pbx_config]
Include => 'macro-agent-add-custom' [pbx_config]

[ Context 'macro-outbound-callerid' created by 'pbx_config' ]
's' => 1. ExecIf($["${CALLINGPRES_SV}" != ""]|SetCallerPres|${CALLINGPRES_SV}) [pbx_config]
2. ExecIf($["${REALCALLERIDNUM:1:2}" = ""]|Set|REALCALLERIDNUM=${CALLERID(number)}) [pbx_config]
[start] 3. GotoIf($[ $["${REALCALLERIDNUM}" = ""] | $["${KEEPCID}" != "TRUE"] | $["${OUTKEEPCID_${ARG1}}" = "on"] ]?normcid) [pbx_config]
4. Set(USEROUTCID=${REALCALLERIDNUM}) [pbx_config]
5. GotoIf($["foo${DB(AMPUSER/${REALCALLERIDNUM}/device)}" = "foo"]?bypass) [pbx_config]
[normcid] 6. Set(USEROUTCID=${DB(AMPUSER/${AMPUSER}/outboundcid)}) [pbx_config]
[bypass] 7. Set(EMERGENCYCID=${DB(DEVICE/${REALCALLERIDNUM}/emergency_cid)}) [pbx_config]
8. Set(TRUNKOUTCID=${OUTCID_${ARG1}}) [pbx_config]
9. GotoIf($[ $["${EMERGENCYROUTE:1:2}" = ""] | $["${EMERGENCYCID:1:2}" = ""] ]?trunkcid) [pbx_config]
10. Set(CALLERID(all)=${EMERGENCYCID}) [pbx_config]
[exit] 11. MacroExit() [pbx_config]
[trunkcid] 12. ExecIf($["${TRUNKOUTCID:1:2}" != ""]|Set|CALLERID(all)=${TRUNKOUTCID}) [pbx_config]
[usercid] 13. ExecIf($["${USEROUTCID:1:2}" != ""]|Set|CALLERID(all)=${USEROUTCID}) [pbx_config]
[hidecid] 14. ExecIf($["${CALLERID(name)}"="hidden"]|SetCallerPres|prohib_passed_screen) [pbx_config]
Include => 'macro-outbound-callerid-custom' [pbx_config]

[ Context 'macro-dialout-enum' created by 'pbx_config' ]
's' => 1. GosubIf($[$["${ARG3}" != ""] & $["${DB(AMPUSER/${AMPUSER}/pinless)}" != "NOPASSWD"]]?sub-pincheck|s|1) [pbx_config]
2. Macro(outbound-callerid|${ARG1}) [pbx_config]
3. Set(OUTBOUND_GROUP=OUT_${ARG1}) [pbx_config]
4. GotoIf($["${OUTMAXCHANS_${ARG1}}foo" = "foo"]?nomax) [pbx_config]
5. GotoIf($[ ${GROUP_COUNT(OUT_${ARG1})} >= ${OUTMAXCHANS_${ARG1}} ]?nochans) [pbx_config]
[nomax] 6. Set(DIAL_NUMBER=${ARG2}) [pbx_config]
7. Set(DIAL_TRUNK=${ARG1}) [pbx_config]
8. ExecIf($["${PREFIX_TRUNK_${DIAL_TRUNK}}" != ""]|AGI|fixlocalprefix) [pbx_config]
9. AGI(enumlookup.agi) [pbx_config]
[dialloop] 10. GotoIf($["foo${DIALARR}"="foo"]?end) [pbx_config]
11. Set(TRYDIAL=${CUT(DIALARR|%|1)}) [pbx_config]
12. Set(DIALARR=${CUT(DIALARR|%|2-)}) [pbx_config]
13. Dial(${TRYDIAL}|) [pbx_config]
14. Noop(Dial exited in macro-enum-dialout with ${DIALSTATUS}) [pbx_config]
15. GotoIf($[ $[ "${DIALSTATUS}" = "CHANUNAVAIL" ] | $[ "${DIALSTATUS}" = "CONGESTION" ] ]?dialloop) [pbx_config]
[dialfailed] 16. Goto(s-${DIALSTATUS}|1) [pbx_config]
[nochans] 17. Noop(max channels used up) [pbx_config]
[end] 18. Noop(Exiting macro-dialout-enum) [pbx_config]
's-BUSY' => 1. Noop(Trunk is reporting BUSY) [pbx_config]
2. Busy(20) [pbx_config]
'_s-.' => 1. Noop(Dial failed due to ${DIALSTATUS}) [pbx_config]
Include => 'macro-dialout-enum-custom' [pbx_config]

[ Context 'macro-user-callerid' created by 'pbx_config' ]
'h' => 1. Macro(hangupcall|) [pbx_config]
's' => 1. Set(AMPUSER=${IF($["foo${AMPUSER}" = "foo"]?${CALLERID(number)}:${AMPUSER})}) [pbx_config]
2. GotoIf($["${CHANNEL:0:5}" = "Local"]?report) [pbx_config]
3. ExecIf($["${REALCALLERIDNUM:1:2}" = ""]|Set|REALCALLERIDNUM=${CALLERID(number)}) [pbx_config]
4. Set(AMPUSER=${DB(DEVICE/${REALCALLERIDNUM}/user)}) [pbx_config]
5. Set(AMPUSERCIDNAME=${DB(AMPUSER/${AMPUSER}/cidname)}) [pbx_config]
6. GotoIf($["x${AMPUSERCIDNAME:1:2}" = "x"]?report) [pbx_config]
7. Set(AMPUSERCID=${IF($["${DB_EXISTS(AMPUSER/${AMPUSER}/cidnum)}" = "1"]?${DB_RESULT}:${AMPUSER})}) [pbx_config]
8. Set(CALLERID(all)="${AMPUSERCIDNAME}" <${AMPUSERCID}>) [pbx_config]
9. ExecIf($["${DB(AMPUSER/${AMPUSER}/language)}" != ""]|Set|CHANNEL(language)=${DB(AMPUSER/${AMPUSER}/language)}) [pbx_config]
[report] 10. GotoIf($[ "${ARG1}" = "SKIPTTL" ]?continue) [pbx_config]
[report2] 11. Set(__TTL=${IF($["foo${TTL}" = "foo"]?64:$[ ${TTL} - 1 ])}) [pbx_config]
12. GotoIf($[ ${TTL} > 0 ]?continue) [pbx_config]
13. Wait(${RINGTIMER}) [pbx_config]
14. Answer() [pbx_config]
15. Wait(2) [pbx_config]
16. Playback(im-sorry&an-error-has-occured&with&call-forwarding) [pbx_config]
17. Macro(hangupcall|) [pbx_config]
18. Congestion(20) [pbx_config]
[continue] 19. Noop(Using CallerID ${CALLERID(all)}) [pbx_config]
Include => 'macro-user-callerid-custom' [pbx_config]

[ Context 'macro-dialout-dundi' created by 'pbx_config' ]
'bypass' => 1. Noop(TRUNK: ${OUT_${DIAL_TRUNK}} BYPASSING because dialout-dundi-predial-hook) [pbx_config]
'disabletrunk' => 1. Noop(TRUNK: ${OUT_${DIAL_TRUNK}} DISABLED - falling through to next trunk) [pbx_config]
'h' => 1. Macro(hangupcall|) [pbx_config]
's' => 1. Set(DIAL_TRUNK=${ARG1}) [pbx_config]
2. GosubIf($[$["${ARG3}" != ""] & $["${DB(AMPUSER/${AMPUSER}/pinless)}" != "NOPASSWD"]]?sub-pincheck|s|1) [pbx_config]
3. GotoIf($["x${OUTDISABLE_${DIAL_TRUNK}}" = "xon"]?disabletrunk|1) [pbx_config]
4. Set(DIAL_NUMBER=${ARG2}) [pbx_config]
5. Set(DIAL_TRUNK_OPTIONS=${DIAL_OPTIONS}) [pbx_config]
6. Set(OUTBOUND_GROUP=OUT_${DIAL_TRUNK}) [pbx_config]
7. GotoIf($["${OUTMAXCHANS_${DIAL_TRUNK}}foo" = "foo"]?nomax) [pbx_config]
8. GotoIf($[ ${GROUP_COUNT(OUT_${DIAL_TRUNK})} >= ${OUTMAXCHANS_${DIAL_TRUNK}} ]?chanfull) [pbx_config]
[nomax] 9. GotoIf($["${INTRACOMPANYROUTE}" = "YES"]?skipoutcid) [pbx_config]
10. Set(DIAL_TRUNK_OPTIONS=${TRUNK_OPTIONS}) [pbx_config]
11. Macro(outbound-callerid|${DIAL_TRUNK}) [pbx_config]
[skipoutcid] 12. ExecIf($["${PREFIX_TRUNK_${DIAL_TRUNK}}" != ""]|AGI|fixlocalprefix) [pbx_config]
13. Set(OUTNUM=${OUTPREFIX_${DIAL_TRUNK}}${DIAL_NUMBER}) [pbx_config]
14. ExecIf($[$["${MOHCLASS}" != "default"] & $["${MOHCLASS}" != ""]]|Set|DIAL_TRUNK_OPTIONS=M(setmusic^${MOHCLASS})${DIAL_TRUNK_OPTIONS}) [pbx_config]
[gocall] 15. Macro(dialout-dundi-predial-hook|) [pbx_config]
16. GotoIf($["${PREDIAL_HOOK_RET}" = "BYPASS"]?bypass|1) [pbx_config]
17. GotoIf($["${custom}" = "AMP"]?customtrunk) [pbx_config]
18. Macro(dundi-${DIAL_TRUNK}|${OUTNUM}) [pbx_config]
19. Goto(s-${DIALSTATUS}|1) [pbx_config]
[chanfull] 20. Noop(max channels used up) [pbx_config]
's-BUSY' => 1. Noop(Dial failed due to trunk reporting BUSY - giving up) [pbx_config]
2. Playtones(busy) [pbx_config]
3. Busy(20) [pbx_config]
's-CANCEL' => 1. Noop(Dial failed due to trunk reporting CANCEL - giving up) [pbx_config]
2. Playtones(congestion) [pbx_config]
3. Congestion(20) [pbx_config]
's-NOANSWER' => 1. Noop(Dial failed due to trunk reporting NOANSWER - giving up) [pbx_config]
2. Playtones(congestion) [pbx_config]
3. Congestion(20) [pbx_config]
'_s-.' => 1. GotoIf($["x${OUTFAIL_${ARG1}}" = "x"]?noreport) [pbx_config]
2. AGI(${OUTFAIL_${ARG1}}) [pbx_config]
[noreport] 3. Noop(TRUNK Dial failed due to ${DIALSTATUS} - failing through to other trunks) [pbx_config]
Include => 'macro-dialout-dundi-custom' [pbx_config]

[ Context 'macro-dialout-trunk' created by 'pbx_config' ]
'bypass' => 1. Noop(TRUNK: ${OUT_${DIAL_TRUNK}} BYPASSING because dialout-trunk-predial-hook) [pbx_config]
'disabletrunk' => 1. Noop(TRUNK: ${OUT_${DIAL_TRUNK}} DISABLED - falling through to next trunk) [pbx_config]
'h' => 1. Macro(hangupcall|) [pbx_config]
's' => 1. Set(DIAL_TRUNK=${ARG1}) [pbx_config]
2. GosubIf($[$["${ARG3}" != ""] & $["${DB(AMPUSER/${AMPUSER}/pinless)}" != "NOPASSWD"]]?sub-pincheck|s|1) [pbx_config]
3. GotoIf($["x${OUTDISABLE_${DIAL_TRUNK}}" = "xon"]?disabletrunk|1) [pbx_config]
4. Set(DIAL_NUMBER=${ARG2}) [pbx_config]
5. Set(DIAL_TRUNK_OPTIONS=${DIAL_OPTIONS}) [pbx_config]
6. Set(OUTBOUND_GROUP=OUT_${DIAL_TRUNK}) [pbx_config]
7. GotoIf($["${OUTMAXCHANS_${DIAL_TRUNK}}foo" = "foo"]?nomax) [pbx_config]
8. GotoIf($[ ${GROUP_COUNT(OUT_${DIAL_TRUNK})} >= ${OUTMAXCHANS_${DIAL_TRUNK}} ]?chanfull) [pbx_config]
[nomax] 9. GotoIf($["${INTRACOMPANYROUTE}" = "YES"]?skipoutcid) [pbx_config]
10. Set(DIAL_TRUNK_OPTIONS=${TRUNK_OPTIONS}) [pbx_config]
11. Macro(outbound-callerid|${DIAL_TRUNK}) [pbx_config]
[skipoutcid] 12. ExecIf($["${PREFIX_TRUNK_${DIAL_TRUNK}}" != ""]|AGI|fixlocalprefix) [pbx_config]
13. Set(OUTNUM=${OUTPREFIX_${DIAL_TRUNK}}${DIAL_NUMBER}) [pbx_config]
14. Set(custom=${CUT(OUT_${DIAL_TRUNK}|:|1)}) [pbx_config]
15. ExecIf($[$["${MOHCLASS}" != "default"] & $["${MOHCLASS}" != ""]]|Set|DIAL_TRUNK_OPTIONS=M(setmusic^${MOHCLASS})${DIAL_TRUNK_OPTIONS}) [pbx_config]
[gocall] 16. Macro(dialout-trunk-predial-hook|) [pbx_config]
17. GotoIf($["${PREDIAL_HOOK_RET}" = "BYPASS"]?bypass|1) [pbx_config]
18. GotoIf($["${custom}" = "AMP"]?customtrunk) [pbx_config]
19. Dial(${OUT_${DIAL_TRUNK}}/${OUTNUM}|300|${DIAL_TRUNK_OPTIONS}) [pbx_config]
20. Goto(s-${DIALSTATUS}|1) [pbx_config]
[customtrunk] 21. Set(pre_num=${CUT(OUT_${DIAL_TRUNK}|$|1)}) [pbx_config]
22. Set(the_num=${CUT(OUT_${DIAL_TRUNK}|$|2)}) [pbx_config]
23. Set(post_num=${CUT(OUT_${DIAL_TRUNK}|$|3)}) [pbx_config]
24. GotoIf($["${the_num}" = "OUTNUM"]?outnum:skipoutnum) [pbx_config]
[outnum] 25. Set(the_num=${OUTNUM}) [pbx_config]
[skipoutnum] 26. Dial(${pre_num:4}${the_num}${post_num}|300|${DIAL_TRUNK_OPTIONS}) [pbx_config]
27. Goto(s-${DIALSTATUS}|1) [pbx_config]
[chanfull] 28. Noop(max channels used up) [pbx_config]
's-BUSY' => 1. Noop(Dial failed due to trunk reporting BUSY - giving up) [pbx_config]
2. Playtones(busy) [pbx_config]
3. Busy(20) [pbx_config]
's-CANCEL' => 1. Noop(Dial failed due to trunk reporting CANCEL - giving up) [pbx_config]
2. Playtones(congestion) [pbx_config]
3. Congestion(20) [pbx_config]
's-CHANUNAVAIL' => 1. GotoIf($["x${OUTFAIL_${ARG1}}" = "x"]?noreport) [pbx_config]
2. AGI(${OUTFAIL_${ARG1}}) [pbx_config]
[noreport] 3. Noop(TRUNK Dial failed due to ${DIALSTATUS} (hangupcause: ${HANGUPCAUSE}) - failing through to other trunks) [pbx_config]
's-NOANSWER' => 1. Noop(Dial failed due to trunk reporting NOANSWER - giving up) [pbx_config]
2. Playtones(congestion) [pbx_config]
3. Congestion(20) [pbx_config]






Now on Slingshot Better Network and it's better.

Share Image



296 posts

Ultimate Geek
+1 received by user: 9


  Reply # 393395 18-Oct-2010 23:29 Send private message

I had to do it in 2 posts.
I have x out my phone number.


Here is the rest of it. 


  '_s-.' => 1. GotoIf($["x${OUTFAIL_${ARG1}}" = "x"]?noreport) [pbx_config]
2. AGI(${OUTFAIL_${ARG1}}) [pbx_config]
[noreport] 3. Noop(TRUNK Dial failed due to ${DIALSTATUS} - failing through to other trunks) [pbx_config]
Include => 'macro-dialout-trunk-custom' [pbx_config]

[ Context 'sub-pincheck' created by 'pbx_config' ]
's' => 1. Authenticate(${ARG3}|) [pbx_config]
2. ResetCDR() [pbx_config]
3. Return() [pbx_config]
Include => 'sub-pincheck-custom' [pbx_config]

[ Context 'macro-auto-blkvm' created by 'pbx_config' ]
's' => 1. Set(__MACRO_RESULT=) [pbx_config]
2. dbDel(${BLKVM_OVERRIDE}) [pbx_config]
Include => 'macro-auto-blkvm-custom' [pbx_config]

[ Context 'macro-auto-confirm' created by 'pbx_config' ]
's' => 1. Set(__MACRO_RESULT=) [pbx_config]
2. dbDel(${BLKVM_OVERRIDE}) [pbx_config]
3. dbDel(RG/${ARG1}/${UNIQCHAN}) [pbx_config]
Include => 'macro-auto-confirm-custom' [pbx_config]

[ Context 'macro-confirm' created by 'pbx_config' ]
'1' => 1. GotoIf($["${DB_EXISTS(RG/${ARG3}/${UNIQCHAN})}" = "0"]?toolate|1) [pbx_config]
2. dbDel(RG/${ARG3}/${UNIQCHAN}) [pbx_config]
3. dbDel(${BLKVM_OVERRIDE}) [pbx_config]
4. Set(__MACRO_RESULT=) [pbx_config]
[exitopt1] 5. MacroExit() [pbx_config]
'2' => 1. Goto(noanswer|1) [pbx_config]
'3' => 1. SayDigits(${CALLCONFIRMCID}) [pbx_config]
2. GotoIf($["${DB_EXISTS(RG/${ARG3}/${UNIQCHAN})}" = "0"]?toolate|1:s|start) [pbx_config]
'h' => 1. Macro(hangupcall|) [pbx_config]
'noanswer' => 1. Set(__MACRO_RESULT=ABORT) [pbx_config]
[exitnoanswer] 2. MacroExit() [pbx_config]
's' => 1. Set(LOOPCOUNT=0) [pbx_config]
2. Set(__MACRO_RESULT=ABORT) [pbx_config]
3. Set(MSG1=${IF($["foo${ARG1}" != "foo"]?${ARG1}:"incoming-call-1-accept-2-decline")}) [pbx_config]
[start] 4. Background(${MSG1}|m|${CHANNEL(language)}|macro-confirm) [pbx_config]
5. Read(INPUT||1|||4) [pbx_config]
6. GotoIf($[${LEN(${INPUT})} > 0]?${INPUT}|1:t|1) [pbx_config]
't' => 1. GotoIf($["${DB_EXISTS(RG/${ARG3}/${UNIQCHAN})}" = "0"]?toolate|1) [pbx_config]
2. Set(LOOPCOUNT=$[ ${LOOPCOUNT} + 1 ]) [pbx_config]
3. GotoIf($[ ${LOOPCOUNT} < 5 ]?s|start:noanswer|1) [pbx_config]
'toolate' => 1. Set(MSG2=${IF($["foo${ARG2}" != "foo"]?${ARG2}:"incoming-call-no-longer-avail")}) [pbx_config]
2. Playback(${MSG2}) [pbx_config]
3. Set(__MACRO_RESULT=ABORT) [pbx_config]
[exittoolate] 4. MacroExit() [pbx_config]
'_X' => 1. Background(invalid|m|${CHANNEL(language)}|macro-confirm) [pbx_config]
2. GotoIf($["${DB_EXISTS(RG/${ARG3}/${UNIQCHAN})}" = "0"]?toolate|1) [pbx_config]
3. Set(LOOPCOUNT=$[ ${LOOPCOUNT} + 1 ]) [pbx_config]
4. GotoIf($[ ${LOOPCOUNT} < 5 ]?s|start:noanswer|1) [pbx_config]
Include => 'macro-confirm-custom' [pbx_config]

[ Context 'bad-number' created by 'pbx_config' ]
'_X.' => 1. ResetCDR() [pbx_config]
2. NoCDR() [pbx_config]
3. Wait(1) [pbx_config]
4. Playback(silence/1&cannot-complete-as-dialed&check-number-dial-again|noanswer) [pbx_config]
5. Wait(1) [pbx_config]
6. Congestion(20) [pbx_config]
7. Hangup() [pbx_config]
Include => 'bad-number-custom' [pbx_config]

[ Context 'app-blackhole' created by 'pbx_config' ]
'busy' => 1. Noop(Blackhole Dest: Busy) [pbx_config]
2. Answer() [pbx_config]
3. Playtones(busy) [pbx_config]
4. Busy(20) [pbx_config]
5. Hangup() [pbx_config]
'congestion' => 1. Noop(Blackhole Dest: Congestion) [pbx_config]
2. Answer() [pbx_config]
3. Playtones(congestion) [pbx_config]
4. Congestion(20) [pbx_config]
5. Hangup() [pbx_config]
'hangup' => 1. Noop(Blackhole Dest: Hangup) [pbx_config]
2. Hangup() [pbx_config]
'musiconhold' => 1. Noop(Blackhole Dest: Put caller on hold forever) [pbx_config]
2. Answer() [pbx_config]
3. MusicOnHold() [pbx_config]
'ring' => 1. Noop(Blackhole Dest: Ring) [pbx_config]
2. Answer() [pbx_config]
3. Playtones(ring) [pbx_config]
4. Wait(300) [pbx_config]
5. Hangup() [pbx_config]
'zapateller' => 1. Noop(Blackhole Dest: Play SIT Tone) [pbx_config]
2. Answer() [pbx_config]
3. Zapateller() [pbx_config]
Include => 'app-blackhole-custom' [pbx_config]

[ Context 'outrt-007-International' created by 'pbx_config' ]
'_00.' => 1. Macro(user-callerid|SKIPTTL|) [pbx_config]
2. Macro(pinsets|1|1) [pbx_config]
3. Set(_NODEST=) [pbx_config]
4. Macro(record-enable|${AMPUSER}|OUT|) [pbx_config]
5. Macro(dialout-trunk|2|${EXTEN}||) [pbx_config]
6. Macro(outisbusy|) [pbx_config]
Include => 'outrt-007-International-custom' [pbx_config]

[ Context 'outrt-006-telecom-faults' created by 'pbx_config' ]
'_1xx' => 1. Macro(user-callerid|SKIPTTL|) [pbx_config]
2. Set(_NODEST=) [pbx_config]
3. Macro(record-enable|${AMPUSER}|OUT|) [pbx_config]
4. Macro(dialout-trunk|2|${EXTEN}||) [pbx_config]
5. Macro(outisbusy|) [pbx_config]
Include => 'outrt-006-telecom-faults-custom' [pbx_config]

[ Context 'outrt-005-111' created by 'pbx_config' ]
'111' => 1. Macro(user-callerid|SKIPTTL|) [pbx_config]
2. Set(_NODEST=) [pbx_config]
3. Macro(record-enable|${AMPUSER}|OUT|) [pbx_config]
4. Macro(dialout-trunk|1|${EXTEN}||) [pbx_config]
5. Macro(dialout-trunk|2|${EXTEN}||) [pbx_config]
6. Macro(outisbusy|) [pbx_config]
Include => 'outrt-005-111-custom' [pbx_config]

[ Context 'outrt-004-FREE' created by 'pbx_config' ]
'_0508.' => 1. Macro(user-callerid|SKIPTTL|) [pbx_config]
2. Set(_NODEST=) [pbx_config]
3. Macro(record-enable|${AMPUSER}|OUT|) [pbx_config]
4. Macro(dialout-trunk|2|${EXTEN}||) [pbx_config]
5. Macro(dialout-trunk|1|${EXTEN}||) [pbx_config]
6. Macro(outisbusy|) [pbx_config]
'_0800.' => 1. Macro(user-callerid|SKIPTTL|) [pbx_config]
2. Set(_NODEST=) [pbx_config]
3. Macro(record-enable|${AMPUSER}|OUT|) [pbx_config]
4. Macro(dialout-trunk|2|${EXTEN}||) [pbx_config]
5. Macro(dialout-trunk|1|${EXTEN}||) [pbx_config]
6. Macro(outisbusy|) [pbx_config]
Include => 'outrt-004-FREE-custom' [pbx_config]

[ Context 'outrt-003-MOBILES' created by 'pbx_config' ]
'_021X.' => 1. Macro(user-callerid|SKIPTTL|) [pbx_config]
2. Set(_NODEST=) [pbx_config]
3. Macro(record-enable|${AMPUSER}|OUT|) [pbx_config]
4. Macro(dialout-trunk|2|${EXTEN}||) [pbx_config]
5. Macro(outisbusy|) [pbx_config]
'_022x.' => 1. Macro(user-callerid|SKIPTTL|) [pbx_config]
2. Set(_NODEST=) [pbx_config]
3. Macro(record-enable|${AMPUSER}|OUT|) [pbx_config]
4. Macro(dialout-trunk|2|${EXTEN}||) [pbx_config]
5. Macro(outisbusy|) [pbx_config]
'_027X.' => 1. Macro(user-callerid|SKIPTTL|) [pbx_config]
2. Set(_NODEST=) [pbx_config]
3. Macro(record-enable|${AMPUSER}|OUT|) [pbx_config]
4. Macro(dialout-trunk|2|${EXTEN}||) [pbx_config]
5. Macro(outisbusy|) [pbx_config]
'_028X.' => 1. Macro(user-callerid|SKIPTTL|) [pbx_config]
2. Set(_NODEST=) [pbx_config]
3. Macro(record-enable|${AMPUSER}|OUT|) [pbx_config]
4. Macro(dialout-trunk|2|${EXTEN}||) [pbx_config]
5. Macro(outisbusy|) [pbx_config]
'_029X.' => 1. Macro(user-callerid|SKIPTTL|) [pbx_config]
2. Set(_NODEST=) [pbx_config]
3. Macro(record-enable|${AMPUSER}|OUT|) [pbx_config]
4. Macro(dialout-trunk|2|${EXTEN}||) [pbx_config]
5. Macro(outisbusy|) [pbx_config]
Include => 'outrt-003-MOBILES-custom' [pbx_config]

[ Context 'outrt-002-TOLLS' created by 'pbx_config' ]
'_[0]XXXXXXXX' => 1. Macro(user-callerid|SKIPTTL|) [pbx_config]
2. Set(_NODEST=) [pbx_config]
3. Macro(record-enable|${AMPUSER}|OUT|) [pbx_config]
4. Macro(dialout-trunk|2|${EXTEN}||) [pbx_config]
5. Macro(outisbusy|) [pbx_config]
Include => 'outrt-002-TOLLS-custom' [pbx_config]

[ Context 'outrt-001-LOCAL' created by 'pbx_config' ]
'_XXXXXXX' => 1. Macro(user-callerid|SKIPTTL|) [pbx_config]
2. Set(_NODEST=) [pbx_config]
3. Macro(record-enable|${AMPUSER}|OUT|) [pbx_config]
4. Macro(dialout-trunk|2|${EXTEN}||) [pbx_config]
5. Macro(dialout-trunk|1|${EXTEN}||) [pbx_config]
6. Macro(outisbusy|) [pbx_config]
'_XXXX' => 1. Macro(user-callerid|SKIPTTL|) [pbx_config]
2. Set(_NODEST=) [pbx_config]
3. Macro(record-enable|${AMPUSER}|OUT|) [pbx_config]
4. Macro(dialout-trunk|2|${EXTEN}||) [pbx_config]
5. Macro(dialout-trunk|1|${EXTEN}||) [pbx_config]
6. Macro(outisbusy|) [pbx_config]
Include => 'outrt-001-LOCAL-custom' [pbx_config]

[ Context 'outbound-allroutes' created by 'pbx_config' ]
'foo' => 1. Noop(bar) [pbx_config]
Include => 'outbound-allroutes-custom' [pbx_config]
Include => 'outrt-001-LOCAL' [pbx_config]
Include => 'outrt-002-TOLLS' [pbx_config]
Include => 'outrt-003-MOBILES' [pbx_config]
Include => 'outrt-004-FREE' [pbx_config]
Include => 'outrt-005-111' [pbx_config]
Include => 'outrt-006-telecom-faults' [pbx_config]
Include => 'outrt-007-International' [pbx_config]

[ Context 'macro-record-enable' created by 'pbx_config' ]
's' => 1. GotoIf($["${BLINDTRANSFER}" = ""]?check) [pbx_config]
2. ResetCDR(w) [pbx_config]
3. StopMixMonitor() [pbx_config]
[check] 4. AGI(recordingcheck|${STRFTIME(${EPOCH}||%Y%m%d-%H%M%S)}|${UNIQUEID}) [pbx_config]
5. MacroExit() [pbx_config]
[record] 999. MixMonitor(${MIXMON_DIR}${CALLFILENAME}.${MIXMON_FORMAT}||${MIXMON_POST}) [pbx_config]
Include => 'macro-record-enable-custom' [pbx_config]

[ Context 'from-trunk-iax2-xxxxxxxxx created by 'pbx_config' ]
'_.' => 1. Set(GROUP()=OUT_2) [pbx_config]
2. Goto(from-trunk|${EXTEN}|1) [pbx_config]
Include => 'from-trunk-iax2-xxxxxxxx-custom' [pbx_config]

[ Context 'from-did-direct-ivr' created by 'pbx_config' ]
'202' => 1. ExecIf($["${BLKVM_OVERRIDE}" != ""]|dbDel|${BLKVM_OVERRIDE}) [pbx_config]
2. Set(__NODEST=) [pbx_config]
3. Goto(from-did-direct|202|1) [pbx_config]
4. GotoIf($["${IVR_RETVM}" = "RETURN" & "${IVR_CONTEXT}" != ""]?ext-local|vmret|playret) [pbx_config]
'205' => 1. ExecIf($["${BLKVM_OVERRIDE}" != ""]|dbDel|${BLKVM_OVERRIDE}) [pbx_config]
2. Set(__NODEST=) [pbx_config]
3. Goto(from-did-direct|205|1) [pbx_config]
4. GotoIf($["${IVR_RETVM}" = "RETURN" & "${IVR_CONTEXT}" != ""]?ext-local|vmret|playret) [pbx_config]
Include => 'from-did-direct-ivr-custom' [pbx_config]

[ Context 'ext-local' created by 'pbx_config' ]
'202' => hint: SIP/202&Custom:DND202 [pbx_config]
1. Macro(exten-vm|202|202) [pbx_config]
2. Goto(vmret|1) [pbx_config]
'205' => hint: SIP/205&Custom:DND205 [pbx_config]
1. Macro(exten-vm|205|205) [pbx_config]
2. Goto(vmret|1) [pbx_config]
'Linksys' => 1. Goto(from-internal|202|1) [pbx_config]
'SPA942' => 1. Goto(from-internal|205|1) [pbx_config]
'vmb202' => 1. Macro(vm|202|BUSY|${IVR_RETVM}) [pbx_config]
2. Goto(vmret|1) [pbx_config]
'vmb205' => 1. Macro(vm|205|BUSY|${IVR_RETVM}) [pbx_config]
2. Goto(vmret|1) [pbx_config]
'vmret' => 1. GotoIf($["${IVR_RETVM}" = "RETURN" & "${IVR_CONTEXT}" != ""]?playret) [pbx_config]
2. Hangup() [pbx_config]
[playret] 3. Playback(exited-vm-will-be-transfered&silence/1) [pbx_config]
4. Goto(${IVR_CONTEXT}|return|1) [pbx_config]
'vms202' => 1. Macro(vm|202|NOMESSAGE|${IVR_RETVM}) [pbx_config]
2. Goto(vmret|1) [pbx_config]
'vms205' => 1. Macro(vm|205|NOMESSAGE|${IVR_RETVM}) [pbx_config]
2. Goto(vmret|1) [pbx_config]
'vmu202' => 1. Macro(vm|202|NOANSWER|${IVR_RETVM}) [pbx_config]
2. Goto(vmret|1) [pbx_config]
'vmu205' => 1. Macro(vm|205|NOANSWER|${IVR_RETVM}) [pbx_config]
2. Goto(vmret|1) [pbx_config]
Include => 'ext-local-custom' [pbx_config]

[ Context 'ext-did-catchall' created by 'pbx_config' ]
'h' => 1. Hangup() [pbx_config]
's' => 1. Noop(No DID or CID Match) [pbx_config]
[a2] 2. Answer() [pbx_config]
3. Wait(2) [pbx_config]
4. Playback(ss-noservice) [pbx_config]
5. SayAlpha(${FROM_DID}) [pbx_config]
6. Hangup() [pbx_config]
'_.' => 1. Set(__FROM_DID=${EXTEN}) [pbx_config]
2. Noop(Received an unknown call with DID set to ${EXTEN}) [pbx_config]
3. Goto(s|a2) [pbx_config]
Include => 'ext-did-catchall-custom' [pbx_config]

[ Context 'ext-did' created by 'pbx_config' ]
'fax' => 1. Goto(ext-fax|in_fax|1) [pbx_config]
Include => 'ext-did-custom' [pbx_config]
Include => 'ext-did-0001' [pbx_config]
Include => 'ext-did-0002' [pbx_config]

[ Context 'ext-did-0002' created by 'pbx_config' ]
xxxxxxx' => 1. Set(__FROM_DID=${EXTEN}) [pbx_config]
2. Gosub(app-blacklist-check|s|1) [pbx_config]
3. ExecIf($[ "${CALLERID(name)}" = "" ] |Set|CALLERID(name)=${CALLERID(num)}) [pbx_config]
4. Set(__CALLINGPRES_SV=${CALLINGPRES_${CALLINGPRES}}) [pbx_config]
5. SetCallerPres(allowed_not_screened) [pbx_config]
6. Goto(ivr-4|s|1) [pbx_config]
'fax' => 1. Goto(ext-fax|in_fax|1) [pbx_config]
Include => 'ext-did-0002-custom' [pbx_config]

[ Context 'ext-did-0001' created by 'pbx_config' ]
'fax' => 1. Goto(ext-fax|in_fax|1) [pbx_config]
's' => 1. ExecIf($["${FROM_DID}" = ""]|Set|__FROM_DID=${EXTEN}) [pbx_config]
2. Gosub(app-blacklist-check|s|1) [pbx_config]
3. ExecIf($[ "${CALLERID(name)}" = "" ] |Set|CALLERID(name)=${CALLERID(num)}) [pbx_config]
4. Set(__CALLINGPRES_SV=${CALLINGPRES_${CALLINGPRES}}) [pbx_config]
5. SetCallerPres(allowed_not_screened) [pbx_config]
6. Set(_RGPREFIX=MUM) [pbx_config]
7. Set(CALLERID(name)=${RGPREFIX}${CALLERID(name)}) [pbx_config]
8. Goto(from-did-direct|202|1) [pbx_config]
'_.' => 1. Set(__FROM_DID=${EXTEN}) [pbx_config]
2. Goto(s|1) [pbx_config]
Include => 'ext-did-0001-custom' [pbx_config]

[ Context 'ext-test' created by 'pbx_config' ]
'666' => 1. Goto(ext-fax|in_fax|1) [pbx_config]
'7777' => 1. Goto(from-pstn|${EXTEN}|1) [pbx_config]
'h' => 1. Macro(hangupcall|) [pbx_config]
Include => 'ext-test-custom' [pbx_config]

[ Context 'app-chanspy' created by 'pbx_config' ]
'555' => 1. Macro(user-callerid|) [pbx_config]
2. Answer() [pbx_config]
3. Wait(1) [pbx_config]
4. ChanSpy() [pbx_config]
5. Hangup() [pbx_config]
Include => 'app-chanspy-custom' [pbx_config]

[ Context 'app-zapbarge' created by 'pbx_config' ]
'888' => 1. Macro(user-callerid|) [pbx_config]
2. Set(GROUP()=${CALLERID(number)}) [pbx_config]
3. Answer() [pbx_config]
4. Wait(1) [pbx_config]
5. ZapBarge() [pbx_config]
6. Hangup() [pbx_config]
Include => 'app-zapbarge-custom' [pbx_config]

[ Context 'app-pickup' created by 'pbx_config' ]
'**201' => 1. Pickup(201) [pbx_config]
2. Pickup(201@ext-local) [pbx_config]
3. Pickup(201@from-internal) [pbx_config]
4. Pickup(201@from-internal-xfer) [pbx_config]
5. Pickup(201@from-did-direct) [pbx_config]
6. Pickup(LC-201@from-internal) [pbx_config]
7. Pickup(LC-201@from-internal-xfer) [pbx_config]
8. Pickup(FMPR-201) [pbx_config]
9. Pickup(FMPR-201@from-internal) [pbx_config]
10. Pickup(FMPR-201@from-internal-xfer) [pbx_config]
11. Pickup(FMPR-201@from-did-direct) [pbx_config]
12. Pickup(601@from-internal) [pbx_config]
13. Pickup(601@from-internal-xfer) [pbx_config]
14. Pickup(601@ext-group) [pbx_config]
15. Hangup() [pbx_config]
'**202' => 1. Pickup(202) [pbx_config]
2. Pickup(202@ext-local) [pbx_config]
3. Pickup(202@from-internal) [pbx_config]
4. Pickup(202@from-internal-xfer) [pbx_config]
5. Pickup(202@from-did-direct) [pbx_config]
6. Pickup(LC-202@from-internal) [pbx_config]
7. Pickup(LC-202@from-internal-xfer) [pbx_config]
8. Pickup(FMPR-202) [pbx_config]
9. Pickup(FMPR-202@from-internal) [pbx_config]
10. Pickup(FMPR-202@from-internal-xfer) [pbx_config]
11. Pickup(FMPR-202@from-did-direct) [pbx_config]
12. Pickup(600@from-internal) [pbx_config]
13. Pickup(600@from-internal-xfer) [pbx_config]
14. Pickup(600@ext-group) [pbx_config]
15. Hangup() [pbx_config]
'**203' => 1. Pickup(203) [pbx_config]
2. Pickup(203@ext-local) [pbx_config]
3. Pickup(203@from-internal) [pbx_config]
4. Pickup(203@from-internal-xfer) [pbx_config]
5. Pickup(203@from-did-direct) [pbx_config]
6. Pickup(LC-203@from-internal) [pbx_config]
7. Pickup(LC-203@from-internal-xfer) [pbx_config]
8. Pickup(FMPR-203) [pbx_config]
9. Pickup(FMPR-203@from-internal) [pbx_config]
10. Pickup(FMPR-203@from-internal-xfer) [pbx_config]
11. Pickup(FMPR-203@from-did-direct) [pbx_config]
12. Pickup(601@from-internal) [pbx_config]
13. Pickup(601@from-internal-xfer) [pbx_config]
14. Pickup(601@ext-group) [pbx_config]
15. Hangup() [pbx_config]
'**204' => 1. Pickup(204) [pbx_config]
2. Pickup(204@ext-local) [pbx_config]
3. Pickup(204@from-internal) [pbx_config]
4. Pickup(204@from-internal-xfer) [pbx_config]
5. Pickup(204@from-did-direct) [pbx_config]
6. Pickup(LC-204@from-internal) [pbx_config]
7. Pickup(LC-204@from-internal-xfer) [pbx_config]
8. Pickup(FMPR-204) [pbx_config]
9. Pickup(FMPR-204@from-internal) [pbx_config]
10. Pickup(FMPR-204@from-internal-xfer) [pbx_config]
11. Pickup(FMPR-204@from-did-direct) [pbx_config]
12. Pickup(600@from-internal) [pbx_config]
13. Pickup(600@from-internal-xfer) [pbx_config]
14. Pickup(600@ext-group) [pbx_config]
15. Hangup() [pbx_config]
'**205' => 1. Pickup(205) [pbx_config]
2. Pickup(205@ext-local) [pbx_config]
3. Pickup(205@from-internal) [pbx_config]
4. Pickup(205@from-internal-xfer) [pbx_config]
5. Pickup(205@from-did-direct) [pbx_config]
6. Pickup(LC-205@from-internal) [pbx_config]
7. Pickup(LC-205@from-internal-xfer) [pbx_config]
8. Pickup(FMPR-205) [pbx_config]
9. Pickup(FMPR-205@from-internal) [pbx_config]
10. Pickup(FMPR-205@from-internal-xfer) [pbx_config]
11. Pickup(FMPR-205@from-did-direct) [pbx_config]
12. Pickup(600@from-internal) [pbx_config]
13. Pickup(600@from-internal-xfer) [pbx_config]
14. Pickup(600@ext-group) [pbx_config]
15. Pickup(601@from-internal) [pbx_config]
16. Pickup(601@from-internal-xfer) [pbx_config]
17. Pickup(601@ext-group) [pbx_config]
18. Hangup() [pbx_config]
'_**.' => 1. Noop(Attempt to Pickup ${EXTEN:2} by ${CALLERID(num)}) [pbx_config]
2. Pickup(${EXTEN:2}) [pbx_config]
3. Pickup(${EXTEN:2}@ext-local) [pbx_config]
4. Pickup(${EXTEN:2}@from-internal) [pbx_config]
5. Pickup(${EXTEN:2}@from-internal-xfer) [pbx_config]
6. Pickup(${EXTEN:2}@from-did-direct) [pbx_config]
7. Pickup(FMPR-${EXTEN:2}) [pbx_config]
8. Pickup(LC-${EXTEN:2}@from-internal) [pbx_config]
9. Pickup(LC-${EXTEN:2}@from-internal-xfer) [pbx_config]
10. Pickup(FMPR-${EXTEN:2}@from-internal) [pbx_config]
11. Pickup(FMPR-${EXTEN:2}@from-internal-xfer) [pbx_config]
12. Pickup(FMPR-${EXTEN:2}@from-did-direct) [pbx_config]
13. Hangup() [pbx_config]
Include => 'app-pickup-custom' [pbx_config]

[ Context 'app-userlogonoff' created by 'pbx_config' ]
'*11' => 1. Macro(user-logon|) [pbx_config]
2. Hangup() [pbx_config]
'*12' => 1. Macro(user-logoff|) [pbx_config]
2. Hangup() [pbx_config]
'_*11.' => 1. Macro(user-logon|${EXTEN:3}|) [pbx_config]
2. Hangup() [pbx_config]
Include => 'app-userlogonoff-custom' [pbx_config]

[ Context 'ext-dnd-hints' created by 'pbx_config' ]
'*76202' => hint: Custom:DEVDND202 [pbx_config]
1. Goto(app-dnd-toggle|*76|1) [pbx_config]
'*76205' => hint: Custom:DEVDND205 [pbx_config]
1. Goto(app-dnd-toggle|*76|1) [pbx_config]
Include => 'ext-dnd-hints-custom' [pbx_config]

[ Context 'app-dnd-toggle' created by 'pbx_config' ]
'*76' => 1. Answer() [pbx_config]
2. Wait(1) [pbx_config]
3. Macro(user-callerid|) [pbx_config]
4. GotoIf($["${DB(DND/${AMPUSER})}" = ""]?activate:deactivate) [pbx_config]
[activate] 5. Set(DB(DND/${AMPUSER})=YES) [pbx_config]
6. Set(STATE=BUSY) [pbx_config]
7. Gosub(app-dnd-toggle|sstate|1) [pbx_config]
8. Playback(do-not-disturb&activated) [pbx_config]
9. Macro(hangupcall|) [pbx_config]
[deactivate] 10. dbDel(DND/${AMPUSER}) [pbx_config]
11. Set(STATE=NOT_INUSE) [pbx_config]
12. Gosub(app-dnd-toggle|sstate|1) [pbx_config]
13. Playback(do-not-disturb&de-activated) [pbx_config]
14. Macro(hangupcall|) [pbx_config]
'sstate' => 1. Set(DEVSTATE(Custom:DND${AMPUSER})=${STATE}) [pbx_config]
2. Set(DEVICES=${DB(AMPUSER/${AMPUSER}/device)}) [pbx_config]
3. GotoIf($["${DEVICES}" = "" ]?return) [pbx_config]
4. Set(LOOPCNT=${FIELDQTY(DEVICES|&)}) [pbx_config]
5. Set(ITER=1) [pbx_config]
[begin] 6. Set(DEVSTATE(Custom:DEVDND${CUT(DEVICES|&|${ITER})})=${STATE}) [pbx_config]
7. Set(ITER=$[${ITER} + 1]) [pbx_config]
8. GotoIf($[${ITER} <= ${LOOPCNT}]?begin) [pbx_config]
[return] 9. Return() [pbx_config]
Include => 'app-dnd-toggle-custom' [pbx_config]

[ Context 'app-dnd-on' created by 'pbx_config' ]
'*78' => 1. Answer() [pbx_config]
2. Wait(1) [pbx_config]
3. Macro(user-callerid|) [pbx_config]
4. Set(DB(DND/${AMPUSER})=YES) [pbx_config]
5. Set(STATE=BUSY) [pbx_config]
6. Gosub(app-dnd-on|sstate|1) [pbx_config]
7. Playback(do-not-disturb&activated) [pbx_config]
8. Macro(hangupcall|) [pbx_config]
'sstate' => 1. Set(DEVSTATE(Custom:DND${AMPUSER})=${STATE}) [pbx_config]
2. Set(DEVICES=${DB(AMPUSER/${AMPUSER}/device)}) [pbx_config]
3. GotoIf($["${DEVICES}" = "" ]?return) [pbx_config]
4. Set(LOOPCNT=${FIELDQTY(DEVICES|&)}) [pbx_config]
5. Set(ITER=1) [pbx_config]
[begin] 6. Set(DEVSTATE(Custom:DEVDND${CUT(DEVICES|&|${ITER})})=${STATE}) [pbx_config]
7. Set(ITER=$[${ITER} + 1]) [pbx_config]
8. GotoIf($[${ITER} <= ${LOOPCNT}]?begin) [pbx_config]
[return] 9. Return() [pbx_config]
Include => 'app-dnd-on-custom' [pbx_config]

[ Context 'app-dnd-off' created by 'pbx_config' ]
'*79' => 1. Answer() [pbx_config]
2. Wait(1) [pbx_config]
3. Macro(user-callerid|) [pbx_config]
4. dbDel(DND/${AMPUSER}) [pbx_config]
5. Set(STATE=NOT_INUSE) [pbx_config]
6. Gosub(app-dnd-off|sstate|1) [pbx_config]
7. Playback(do-not-disturb&de-activated) [pbx_config]
8. Macro(hangupcall|) [pbx_config]
'sstate' => 1. Set(DEVSTATE(Custom:DND${AMPUSER})=${STATE}) [pbx_config]
2. Set(DEVICES=${DB(AMPUSER/${AMPUSER}/device)}) [pbx_config]
3. GotoIf($["${DEVICES}" = "" ]?return) [pbx_config]
4. Set(LOOPCNT=${FIELDQTY(DEVICES|&)}) [pbx_config]
5. Set(ITER=1) [pbx_config]
[begin] 6. Set(DEVSTATE(Custom:DEVDND${CUT(DEVICES|&|${ITER})})=${STATE}) [pbx_config]
7. Set(ITER=$[${ITER} + 1]) [pbx_config]
8. GotoIf($[${ITER} <= ${LOOPCNT}]?begin) [pbx_config]
[return] 9. Return() [pbx_config]
Include => 'app-dnd-off-custom' [pbx_config]

[ Context 'app-speakingclock' created by 'pbx_config' ]
'*60' => 1. Answer() [pbx_config]
2. Wait(1) [pbx_config]
3. Set(NumLoops=0) [pbx_config]
[start] 4. Set(FutureTime=$[${EPOCH} + 11]) [pbx_config]
5. Playback(at-tone-time-exactly) [pbx_config]
6. GotoIf($["${TIMEFORMAT}" = "kM"]?hr24format) [pbx_config]
7. SayUnixTime(${FutureTime}||IM 'and' S 'seconds' p) [pbx_config]
8. Goto(waitloop) [pbx_config]
[hr24format] 9. SayUnixTime(${FutureTime}||kM 'and' S 'seconds') [pbx_config]
[waitloop] 10. Set(TimeLeft=$[${FutureTime} - ${EPOCH}]) [pbx_config]
11. GotoIf($[${TimeLeft} < 1]?playbeep) [pbx_config]
12. Wait(1) [pbx_config]
13. Goto(waitloop) [pbx_config]
[playbeep] 14. Playback(beep) [pbx_config]
15. Wait(5) [pbx_config]
16. Set(NumLoops=$[${NumLoops} + 1]) [pbx_config]
17. GotoIf($[${NumLoops} < 5]?start) [pbx_config]
18. Playback(goodbye) [pbx_config]
19. Hangup() [pbx_config]
Include => 'app-speakingclock-custom' [pbx_config]

[ Context 'app-speakextennum' created by 'pbx_config' ]
'*65' => 1. Answer() [pbx_config]
2. Wait(1) [pbx_config]
3. Macro(user-callerid|) [pbx_config]
4. Playback(your) [pbx_config]
5. Playback(extension) [pbx_config]
6. Playback(number) [pbx_config]
7. Playback(is) [pbx_config]
8. SayDigits(${AMPUSER}) [pbx_config]
9. Wait(2) [pbx_config]
10. Hangup() [pbx_config]
Include => 'app-speakextennum-custom' [pbx_config]

[ Context 'app-echo-test' created by 'pbx_config' ]
'*43' => 1. Answer() [pbx_config]
2. Wait(1) [pbx_config]
3. Playback(demo-echotest) [pbx_config]
4. Echo() [pbx_config]
5. Playback(demo-echodone) [pbx_config]
6. Hangup() [pbx_config]
Include => 'app-echo-test-custom' [pbx_config]

[ Context 'app-directory' created by 'pbx_config' ]
'#' => 1. Answer() [pbx_config]
2. Wait(1) [pbx_config]
3. AGI(directory|${DIR-CONTEXT}|from-did-direct|${DIRECTORY:0:1}${DIRECTORY_OPTS}o) [pbx_config]
4. Playback(vm-goodbye) [pbx_config]
5. Hangup() [pbx_config]
'o' => 1. Goto(from-internal|${OPERATOR_XTN}|1) [pbx_config]
Include => 'app-directory-custom' [pbx_config]

[ Context 'app-calltrace-perform' created by 'pbx_config' ]
'1' => 1. Goto(from-internal|${lastcaller}|1) [pbx_config]
'i' => 1. Playback(vm-goodbye) [pbx_config]
2. Macro(hangupcall|) [pbx_config]
's' => 1. Answer() [pbx_config]
2. Wait(1) [pbx_config]
3. Macro(user-callerid|) [pbx_config]
4. Playback(info-about-last-call&telephone-number) [pbx_config]
5. Set(lastcaller=${DB(CALLTRACE/${AMPUSER})}) [pbx_config]
6. GotoIf($[ $[ "${lastcaller}" = "" ] | $[ "${lastcaller}" = "unknown" ] ]?noinfo) [pbx_config]
7. SayDigits(${lastcaller}) [pbx_config]
8. Set(TIMEOUT(digit)=3) [pbx_config]
9. Set(TIMEOUT(response)=7) [pbx_config]
10. Background(to-call-this-number&press-1) [pbx_config]
11. Goto(fin) [pbx_config]
[noinfo] 12. Playback(from-unknown-caller) [pbx_config]
13. Macro(hangupcall|) [pbx_config]
[fin] 14. Noop(Waiting for input) [pbx_config]
15. WaitExten(60|) [pbx_config]
16. Playback(sorry-youre-having-problems&goodbye) [pbx_config]
't' => 1. Playback(vm-goodbye) [pbx_config]
2. Macro(hangupcall|) [pbx_config]
Include => 'app-calltrace-perform-custom' [pbx_config]

[ Context 'app-calltrace' created by 'pbx_config' ]
'*69' => 1. Goto(app-calltrace-perform|s|1) [pbx_config]
Include => 'app-calltrace-custom' [pbx_config]

[ Context 'ext-paging' created by 'pbx_config' ]
'_PAGE.' => 1. GotoIf($[ ${AMPUSER} = ${EXTEN:4} ]?skipself) [pbx_config]
2. GotoIf($[ ${FORCE_PAGE} != 1 ]?AVAIL) [pbx_config]
3. Set(AVAILSTATUS=not checked) [pbx_config]
4. Goto(SKIPCHECK) [pbx_config]
[AVAIL] 5. ChanIsAvail(${DB(DEVICE/${EXTEN:4}/dial)}|js) [pbx_config]
[SKIPCHECK] 6. Noop(Seems to be available (state = ${AVAILSTATUS}) [pbx_config]
7. GotoIf($["${DB(DND/${DB(DEVICE/${EXTEN:4}/user)})}" = "YES"]?skipself) [pbx_config]
8. Macro(autoanswer|${EXTEN:4}) [pbx_config]
9. Dial(${DIAL}|${DTIME}|${DOPTIONS}) [pbx_config]
[skipself] 10. Noop(Not paging originator) [pbx_config]
11. Hangup() [pbx_config]
106. Noop(Channel ${AVAILCHAN} is not available (state = ${AVAILSTATUS})) [pbx_config]
Include => 'ext-paging-custom' [pbx_config]

[ Context 'macro-autoanswer' created by 'pbx_config' ]
's' => 1. Set(DIAL=${DB(DEVICE/${ARG1}/dial)}) [pbx_config]
2. GotoIf($["${DB(DEVICE/${ARG1}/autoanswer/macro)}" != "" ]?macro) [pbx_config]
3. Set(phone=${SIPPEER(${CUT(DIAL|/|2)}:useragent)}) [pbx_config]
4. Set(SIPURI=) [pbx_config]
5. Set(ALERTINFO=Alert-Info: Ring Answer) [pbx_config]
6. Set(CALLINFO=Call-Info: ;answer-after=0) [pbx_config]
7. Set(SIPURI=intercom=true) [pbx_config]
8. Set(DOPTIONS=A(beep)) [pbx_config]
9. Set(DTIME=5) [pbx_config]
10. Set(ANSWERMACRO=) [pbx_config]
11. ExecIf($["${phone:0:5}" = "Mitel"]|Set|CALLINFO=Call-Info: ;answer-after=0) [pbx_config]
12. GotoIf($["${ANSWERMACRO}" != ""]?macro2) [pbx_config]
13. ExecIf($["${ALERTINFO}" != ""]|SipAddHeader|${ALERTINFO}) [pbx_config]
14. ExecIf($["${CALLINFO}" != ""]|SipAddHeader|${CALLINFO}) [pbx_config]
15. ExecIf($["${SIPURI}" != ""]|Set|__SIP_URI_OPTIONS=${SIPURI}) [pbx_config]
[macro] 18. Macro(${DB(DEVICE/${ARG1}/autoanswer/macro)}|${ARG1}) [pbx_config]
[macro2] 21. Macro(${ANSWERMACRO}|${ARG1}) [pbx_config]
Include => 'macro-autoanswer-custom' [pbx_config]

[ Context 'app-recordings' created by 'pbx_config' ]
'*77' => 1. Macro(user-callerid|) [pbx_config]
2. Wait(2) [pbx_config]
3. Macro(systemrecording|dorecord) [pbx_config]
'*99' => 1. Macro(user-callerid|) [pbx_config]
2. Wait(2) [pbx_config]
3. Macro(systemrecording|docheck) [pbx_config]
Include => 'app-recordings-custom' [pbx_config]

[ Context 'app-cf-unavailable-on' created by 'pbx_config' ]
'*52' => 1. Answer() [pbx_config]
2. Wait(1) [pbx_config]
3. Macro(user-callerid|) [pbx_config]
4. Playback(call-fwd-no-ans) [pbx_config]
5. Playback(please-enter-your&extension) [pbx_config]
6. Read(fromext|then-press-pound||||) [pbx_config]
7. Set(fromext=${IF($["foo${fromext}"="foo"]?${AMPUSER}:${fromext})}) [pbx_config]
8. Wait(1) [pbx_config]
[startread] 9. Playback(ent-target-attendant) [pbx_config]
10. Read(toext|then-press-pound||||) [pbx_config]
11. GotoIf($["foo${toext}"="foo"]?startread) [pbx_config]
12. Wait(1) [pbx_config]
13. Set(DB(CFU/${fromext})=${toext}) [pbx_config]
14. Playback(call-fwd-no-ans&for&extension) [pbx_config]
15. SayDigits(${fromext}) [pbx_config]
16. Playback(is-set-to) [pbx_config]
17. SayDigits(${toext}) [pbx_config]
18. Macro(hangupcall|) [pbx_config]
'_*52.' => 1. Answer() [pbx_config]
2. Wait(1) [pbx_config]
3. Macro(user-callerid|) [pbx_config]
4. Set(DB(CFU/${AMPUSER})=${EXTEN:3}) [pbx_config]
5. Playback(call-fwd-no-ans&for&extension) [pbx_config]
6. SayDigits(${AMPUSER}) [pbx_config]
7. Playback(is-set-to) [pbx_config]
8. SayDigits(${EXTEN:3}) [pbx_config]
9. Macro(hangupcall|) [pbx_config]
Include => 'app-cf-unavailable-on-custom' [pbx_config]

[ Context 'app-cf-unavailable-off' created by 'pbx_config' ]
'*53' => 1. Answer() [pbx_config]
2. Wait(1) [pbx_config]
3. Macro(user-callerid|) [pbx_config]
4. dbDel(CFU/${AMPUSER}) [pbx_config]
5. Playback(call-fwd-no-ans&de-activated) [pbx_config]
6. Macro(hangupcall|) [pbx_config]
'_*53.' => 1. Answer() [pbx_config]
2. Wait(1) [pbx_config]
3. Set(fromext=${EXTEN:3}) [pbx_config]
4. dbDel(CFU/${fromext}) [pbx_config]
5. Playback(call-fwd-no-ans&for&extension) [pbx_config]
6. SayDigits(${fromext}) [pbx_config]
7. Playback(cancelled) [pbx_config]
8. Macro(hangupcall|) [pbx_config]
Include => 'app-cf-unavailable-off-custom' [pbx_config]

[ Context 'app-cf-on' created by 'pbx_config' ]
'*72' => 1. Answer() [pbx_config]
2. Wait(1) [pbx_config]
3. Macro(user-callerid|) [pbx_config]
4. Playback(call-fwd-unconditional) [pbx_config]
5. Playback(please-enter-your&extension) [pbx_config]
6. Read(fromext|then-press-pound||||) [pbx_config]
7. Set(fromext=${IF($["foo${fromext}"="foo"]?${AMPUSER}:${fromext})}) [pbx_config]
8. Wait(1) [pbx_config]
[startread] 9. Playback(ent-target-attendant) [pbx_config]
10. Read(toext|then-press-pound||||) [pbx_config]
11. GotoIf($["foo${toext}"="foo"]?startread) [pbx_config]
12. Wait(1) [pbx_config]
13. Set(DB(CF/${fromext})=${toext}) [pbx_config]
14. Playback(call-fwd-unconditional&for&extension) [pbx_config]
15. SayDigits(${fromext}) [pbx_config]
16. Playback(is-set-to) [pbx_config]
17. SayDigits(${toext}) [pbx_config]
18. Macro(hangupcall|) [pbx_config]
'_*72.' => 1. Answer() [pbx_config]
2. Wait(1) [pbx_config]
3. Macro(user-callerid|) [pbx_config]
4. Set(DB(CF/${AMPUSER})=${EXTEN:3}) [pbx_config]
5. Playback(call-fwd-unconditional&for&extension) [pbx_config]
6. SayDigits(${AMPUSER}) [pbx_config]
7. Playback(is-set-to) [pbx_config]
8. SayDigits(${EXTEN:3}) [pbx_config]
9. Macro(hangupcall|) [pbx_config]
Include => 'app-cf-on-custom' [pbx_config]

[ Context 'app-cf-off-any' created by 'pbx_config' ]
'*74' => 1. Answer() [pbx_config]
2. Wait(1) [pbx_config]
3. Playback(please-enter-your&extension) [pbx_config]
4. Read(fromext|then-press-pound||||) [pbx_config]
5. Wait(1) [pbx_config]
6. dbDel(CF/${fromext}) [pbx_config]
7. Playback(call-fwd-unconditional&for&extension) [pbx_config]
8. SayDigits(${fromext}) [pbx_config]
9. Playback(cancelled) [pbx_config]
10. Macro(hangupcall|) [pbx_config]
Include => 'app-cf-off-any-custom' [pbx_config]

[ Context 'app-cf-off' created by 'pbx_config' ]
'*73' => 1. Answer() [pbx_config]
2. Wait(1) [pbx_config]
3. Macro(user-callerid|) [pbx_config]
4. dbDel(CF/${AMPUSER}) [pbx_config]
5. Playback(call-fwd-unconditional&de-activated) [pbx_config]
6. Macro(hangupcall|) [pbx_config]
'_*73.' => 1. Answer() [pbx_config]
2. Wait(1) [pbx_config]
3. Set(fromext=${EXTEN:3}) [pbx_config]
4. dbDel(CF/${fromext}) [pbx_config]
5. Playback(call-fwd-unconditional&for&extension) [pbx_config]
6. SayDigits(${fromext}) [pbx_config]
7. Playback(cancelled) [pbx_config]
8. Macro(hangupcall|) [pbx_config]
Include => 'app-cf-off-custom' [pbx_config]

[ Context 'app-cf-busy-on' created by 'pbx_config' ]
'*90' => 1. Answer() [pbx_config]
2. Wait(1) [pbx_config]
3. Macro(user-callerid|) [pbx_config]
4. Playback(call-fwd-on-busy) [pbx_config]
5. Playback(please-enter-your&extension) [pbx_config]
6. Read(fromext|then-press-pound||||) [pbx_config]
7. Set(fromext=${IF($["foo${fromext}"="foo"]?${AMPUSER}:${fromext})}) [pbx_config]
8. Wait(1) [pbx_config]
[startread] 9. Playback(ent-target-attendant) [pbx_config]
10. Read(toext|then-press-pound||||) [pbx_config]
11. GotoIf($["foo${toext}"="foo"]?startread) [pbx_config]
12. Wait(1) [pbx_config]
13. Set(DB(CFB/${fromext})=${toext}) [pbx_config]
14. Playback(call-fwd-on-busy&for&extension) [pbx_config]
15. SayDigits(${fromext}) [pbx_config]
16. Playback(is-set-to) [pbx_config]
17. SayDigits(${toext}) [pbx_config]
18. Macro(hangupcall|) [pbx_config]
'_*90.' => 1. Answer() [pbx_config]
2. Wait(1) [pbx_config]
3. Macro(user-callerid|) [pbx_config]
4. Set(DB(CFB/${AMPUSER})=${EXTEN:3}) [pbx_config]
5. Playback(call-fwd-on-busy&for&extension) [pbx_config]
6. SayDigits(${AMPUSER}) [pbx_config]
7. Playback(is-set-to) [pbx_config]
8. SayDigits(${EXTEN:3}) [pbx_config]
9. Macro(hangupcall|) [pbx_config]
Include => 'app-cf-busy-on-custom' [pbx_config]

[ Context 'app-cf-busy-off-any' created by 'pbx_config' ]
'*92' => 1. Answer() [pbx_config]
2. Wait(1) [pbx_config]
3. Playback(please-enter-your&extension) [pbx_config]
4. Read(fromext|then-press-pound||||) [pbx_config]
5. Wait(1) [pbx_config]
6. dbDel(CFB/${fromext}) [pbx_config]
7. Playback(call-fwd-on-busy&for&extension) [pbx_config]
8. SayDigits(${fromext}) [pbx_config]
9. Playback(cancelled) [pbx_config]
10. Macro(hangupcall|) [pbx_config]
Include => 'app-cf-busy-off-any-custom' [pbx_config]

[ Context 'app-cf-busy-off' created by 'pbx_config' ]
'*91' => 1. Answer() [pbx_config]
2. Wait(1) [pbx_config]
3. Macro(user-callerid|) [pbx_config]
4. dbDel(CFB/${AMPUSER}) [pbx_config]
5. Playback(call-fwd-on-busy&de-activated) [pbx_config]
6. Macro(hangupcall|) [pbx_config]
'_*91.' => 1. Answer() [pbx_config]
2. Wait(1) [pbx_config]
3. Set(fromext=${EXTEN:3}) [pbx_config]
4. dbDel(CFB/${fromext}) [pbx_config]
5. Playback(call-fwd-on-busy&for&extension) [pbx_config]
6. SayDigits(${fromext}) [pbx_config]
7. Playback(cancelled) [pbx_config]
8. Macro(hangupcall|) [pbx_config]
Include => 'app-cf-busy-off-custom' [pbx_config]

[ Context 'app-vmmain' created by 'pbx_config' ]
'*97' => 1. Answer() [pbx_config]
2. Wait(1) [pbx_config]
3. Macro(user-callerid|) [pbx_config]
4. Macro(get-vmcontext|${AMPUSER}) [pbx_config]
[check] 5. MailBoxExists(${AMPUSER}@${VMCONTEXT}) [pbx_config]
6. GotoIf($["${VMBOXEXISTSSTATUS}" = "SUCCESS"]?mbexist) [pbx_config]
7. VoiceMailMain() [pbx_config]
8. GotoIf($["${IVR_RETVM}" = "RETURN" & "${IVR_CONTEXT}" != ""]?playret) [pbx_config]
9. Macro(hangupcall|) [pbx_config]
[mbexist] 106. VoiceMailMain(${AMPUSER}@${VMCONTEXT}) [pbx_config]
107. GotoIf($["${IVR_RETVM}" = "RETURN" & "${IVR_CONTEXT}" != ""]?playret) [pbx_config]
108. Macro(hangupcall|) [pbx_config]
[playret] 109. Playback(beep&you-will-be-transfered-menu&silence/1) [pbx_config]
110. Goto(${IVR_CONTEXT}|return|1) [pbx_config]
Include => 'app-vmmain-custom' [pbx_config]

[ Context 'app-dialvm' created by 'pbx_config' ]
'*98' => 1. Answer() [pbx_config]
[start] 2. Wait(1) [pbx_config]
3. Noop(app-dialvm: Asking for mailbox) [pbx_config]
4. Read(MAILBOX|vm-login|||3|2) [pbx_config]
[check] 5. Noop(app-dialvm: Got Mailbox ${MAILBOX}) [pbx_config]
6. Macro(get-vmcontext|${MAILBOX}) [pbx_config]
7. MailBoxExists(${MAILBOX}@${VMCONTEXT}) [pbx_config]
8. GotoIf($["${VMBOXEXISTSSTATUS}" = "SUCCESS"]?good:bad) [pbx_config]
9. Macro(hangupcall|) [pbx_config]
[good] 10. Noop(app-dialvm: Good mailbox ${MAILBOX}@${VMCONTEXT}) [pbx_config]
11. VoiceMailMain(${MAILBOX}@${VMCONTEXT}) [pbx_config]
12. GotoIf($["${IVR_RETVM}" = "RETURN" & "${IVR_CONTEXT}" != ""]?playret) [pbx_config]
13. Macro(hangupcall|) [pbx_config]
[bad] 14. Noop(app-dialvm: BAD mailbox ${MAILBOX}@${VMCONTEXT}) [pbx_config]
15. Wait(1) [pbx_config]
16. Noop(app-dialvm: Asking for password so people cant probe for existence of a mailbox) [pbx_config]
17. Read(FAKEPW|vm-password|||3|2) [pbx_config]
18. Noop(app-dialvm: Asking for mailbox again) [pbx_config]
19. Read(MAILBOX|vm-incorrect-mailbox|||3|2) [pbx_config]
20. Goto(check) [pbx_config]
21. Macro(hangupcall|) [pbx_config]
[playret] 22. Playback(beep&you-will-be-transfered-menu&silence/1) [pbx_config]
23. Goto(${IVR_CONTEXT}|return|1) [pbx_config]
'_*98.' => 1. Answer() [pbx_config]
2. Wait(1) [pbx_config]
3. Macro(get-vmcontext|${EXTEN:3}) [pbx_config]
4. VoiceMailMain(${EXTEN:3}@${VMCONTEXT}) [pbx_config]
5. GotoIf($["${IVR_RETVM}" = "RETURN" & "${IVR_CONTEXT}" != ""]?${IVR_CONTEXT}|return|1) [pbx_config]
6. Macro(hangupcall|) [pbx_config]
Include => 'app-dialvm-custom' [pbx_config]

[ Context 'ext-group' created by 'pbx_config' ]
'600' => 1. Macro(user-callerid|) [pbx_config]
2. GotoIf($["foo${BLKVM_OVERRIDE}" = "foo"]?skipdb) [pbx_config]
3. GotoIf($["${DB(${BLKVM_OVERRIDE})}" = "TRUE"]?skipov) [pbx_config]
[skipdb] 4. Set(__NODEST=) [pbx_config]
5. Set(__BLKVM_OVERRIDE=BLKVM/${EXTEN}/${CHANNEL}) [pbx_config]
6. Set(__BLKVM_BASE=${EXTEN}) [pbx_config]
7. Set(DB(${BLKVM_OVERRIDE})=TRUE) [pbx_config]
[skipov] 8. Set(RRNODEST=${NODEST}) [pbx_config]
[skipvmblk] 9. Set(__NODEST=${EXTEN}) [pbx_config]
10. Set(RecordMethod=Group) [pbx_config]
11. Macro(record-enable|202-204-205|${RecordMethod}) [pbx_config]
12. Set(RingGroupMethod=ringall) [pbx_config]
[DIALGRP] 13. Macro(dial|30|${DIAL_OPTIONS}|202-204-205) [pbx_config]
14. Set(RingGroupMethod=) [pbx_config]
15. GotoIf($["foo${RRNODEST}" != "foo"]?nodest) [pbx_config]
16. Set(__NODEST=) [pbx_config]
17. dbDel(${BLKVM_OVERRIDE}) [pbx_config]
18. Goto(ext-local|vmb202|1) [pbx_config]
[nodest] 19. Noop(SKIPPING DEST| CALL CAME FROM Q/RG: ${RRNODEST}) [pbx_config]
'601' => 1. Macro(user-callerid|) [pbx_config]
2. GotoIf($["foo${BLKVM_OVERRIDE}" = "foo"]?skipdb) [pbx_config]
3. GotoIf($["${DB(${BLKVM_OVERRIDE})}" = "TRUE"]?skipov) [pbx_config]
[skipdb] 4. Set(__NODEST=) [pbx_config]
5. Set(__BLKVM_OVERRIDE=BLKVM/${EXTEN}/${CHANNEL}) [pbx_config]
6. Set(__BLKVM_BASE=${EXTEN}) [pbx_config]
7. Set(DB(${BLKVM_OVERRIDE})=TRUE) [pbx_config]
[skipov] 8. Set(RRNODEST=${NODEST}) [pbx_config]
[skipvmblk] 9. Set(__NODEST=${EXTEN}) [pbx_config]
10. Set(RecordMethod=Group) [pbx_config]
11. Macro(record-enable|201-205-203|${RecordMethod}) [pbx_config]
12. Set(RingGroupMethod=ringall) [pbx_config]
[DIALGRP] 13. Macro(dial|20|${DIAL_OPTIONS}|201-205-203) [pbx_config]
14. Set(RingGroupMethod=) [pbx_config]
15. GotoIf($["foo${RRNODEST}" != "foo"]?nodest) [pbx_config]
16. Set(__NODEST=) [pbx_config]
17. dbDel(${BLKVM_OVERRIDE}) [pbx_config]
18. Goto(ext-local|vmu205|1) [pbx_config]
[nodest] 19. Noop(SKIPPING DEST| CALL CAME FROM Q/RG: ${RRNODEST}) [pbx_config]
Include => 'ext-group-custom' [pbx_config]

[ Context 'app-blacklist-remove' created by 'pbx_config' ]
'1' => 1. dbDel(blacklist/${blacknr}) [pbx_config]
2. Playback(num-was-successfully&removed) [pbx_config]
3. Wait(1) [pbx_config]
4. Hangup() [pbx_config]
's' => 1. Answer() [pbx_config]
2. Wait(1) [pbx_config]
3. Playback(entr-num-rmv-blklist) [pbx_config]
4. Set(TIMEOUT(digit)=5) [pbx_config]
5. Set(TIMEOUT(response)=60) [pbx_config]
6. Read(blacknr|then-press-pound||||) [pbx_config]
7. SayDigits(${blacknr}) [pbx_config]
8. Playback(if-correct-press&digits/1) [pbx_config]
9. Noop(Waiting for input) [pbx_config]
[end] 10. WaitExten(60|) [pbx_config]
11. Playback(sorry-youre-having-problems&goodbye) [pbx_config]
Include => 'app-blacklist-remove-custom' [pbx_config]

[ Context 'app-blacklist' created by 'pbx_config' ]
'*31' => 1. Goto(app-blacklist-remove|s|1) [pbx_config]
Include => 'app-blacklist-custom' [pbx_config]

[ Context 'app-blacklist-check' created by 'pbx_config' ]
's' => 1. LookupBlacklist() [pbx_config]
2. GotoIf($["${LOOKUPBLSTATUS}"="FOUND"]?blacklisted) [pbx_config]
3. Return() [pbx_config]
[blacklisted] 4. Answer() [pbx_config]
5. Wait(1) [pbx_config]
6. Zapateller() [pbx_config]
7. Playback(ss-noservice) [pbx_config]
8. Hangup() [pbx_config]
Include => 'app-blacklist-check-custom' [pbx_config]

[ Context 'cidlookup' created by 'pbx_config' ]
'cidlookup_return' => 1. LookupCIDName() [pbx_config]
2. Return() [pbx_config]
Include => 'cidlookup-custom' [pbx_config]

[ Context 'app-dictate-send' created by 'pbx_config' ]
'*35' => 1. Answer() [pbx_config]
2. Macro(user-callerid|) [pbx_config]
3. Noop(CallerID is ${AMPUSER}) [pbx_config]
4. Set(DICTENABLED=${DB(AMPUSER/${AMPUSER}/dictate/enabled)}) [pbx_config]
5. GotoIf($[$["x${DICTENABLED}"="x"]|$["x${DICTENABLED}"="xdisabled"]]?nodict:dictok) [pbx_config]
[nodict] 6. Playback(feature-not-avail-line) [pbx_config]
7. Hangup() [pbx_config]
[dictok] 8. Read(DICTFILE|enter-filename-short||||) [pbx_config]
9. Set(DICTEMAIL=${DB(AMPUSER/${AMPUSER}/dictate/email)}) [pbx_config]
10. Set(DICTFMT=${DB(AMPUSER/${AMPUSER}/dictate/format)}) [pbx_config]
11. Set(NAME=${DB(AMPUSER/${AMPUSER}/cidname)}) [pbx_config]
12. Playback(dictation-being-processed) [pbx_config]
13. System(/var/lib/asterisk/bin/audio-email.pl --file /var/lib/asterisk/sounds/dictate/${AMPUSER}/${DICTFILE}.raw --attachment dict-${DICTFILE} --format ${DICTFMT} --to ${DICTEMAIL} --subject "Dictation from ${NAME} Attached") [pbx_config]
14. Playback(dictation-sent) [pbx_config]
15. Macro(hangupcall|) [pbx_config]
Include => 'app-dictate-send-custom' [pbx_config]

[ Context 'app-dictate-record' created by 'pbx_config' ]
'*34' => 1. Answer() [pbx_config]
2. Macro(user-callerid|) [pbx_config]
3. Noop(CallerID is ${AMPUSER}) [pbx_config]
4. Set(DICTENABLED=${DB(AMPUSER/${AMPUSER}/dictate/enabled)}) [pbx_config]
5. GotoIf($[$["x${DICTENABLED}"="x"]|$["x${DICTENABLED}"="xdisabled"]]?nodict:dictok) [pbx_config]
[nodict] 6. Playback(feature-not-avail-line) [pbx_config]
7. Hangup() [pbx_config]
[dictok] 8. Dictate(/var/lib/asterisk/sounds/dictate/${AMPUSER}) [pbx_config]
9. Macro(hangupcall|) [pbx_config]
Include => 'app-dictate-record-custom' [pbx_config]

[ Context 'ivr-4' created by 'pbx_config' ]
'*' => 1. dbDel(${BLKVM_OVERRIDE}) [pbx_config]
2. Set(__NODEST=) [pbx_config]
3. Goto(ivr-4|s|begin) [pbx_config]
'1' => 1. dbDel(${BLKVM_OVERRIDE}) [pbx_config]
2. Set(__NODEST=) [pbx_config]
3. Goto(from-did-direct|202|1) [pbx_config]
'2' => 1. dbDel(${BLKVM_OVERRIDE}) [pbx_config]
2. Set(__NODEST=) [pbx_config]
3. Goto(from-did-direct|205|1) [pbx_config]
'fax' => 1. Goto(ext-fax|in_fax|1) [pbx_config]
'h' => 1. Hangup() [pbx_config]
'hang' => 1. Playback(vm-goodbye) [pbx_config]
2. Hangup() [pbx_config]
'i' => 1. dbDel(${BLKVM_OVERRIDE}) [pbx_config]
2. Set(__NODEST=) [pbx_config]
3. Goto(from-did-direct|205|1) [pbx_config]
's' => 1. Set(MSG=custom/MainIVR) [pbx_config]
2. Set(LOOPCOUNT=0) [pbx_config]
3. Set(__DIR-CONTEXT=default) [pbx_config]
4. Set(_IVR_CONTEXT_${CONTEXT}=${IVR_CONTEXT}) [pbx_config]
5. Set(_IVR_CONTEXT=${CONTEXT}) [pbx_config]
6. GotoIf($["${CDR(disposition)}" = "ANSWERED"]?begin) [pbx_config]
7. Answer() [pbx_config]
8. Wait(1) [pbx_config]
[begin] 9. Set(TIMEOUT(digit)=3) [pbx_config]
10. Set(TIMEOUT(response)=8) [pbx_config]
11. Set(__IVR_RETVM=) [pbx_config]
12. ExecIf($["${MSG}" != ""]|Background|${MSG}) [pbx_config]
13. WaitExten(|) [pbx_config]
't' => 1. dbDel(${BLKVM_OVERRIDE}) [pbx_config]
2. Set(__NODEST=) [pbx_config]
3. Goto(from-did-direct|205|1) [pbx_config]
Include => 'ivr-4-custom' [pbx_config]

[ Context 'ext-findmefollow' created by 'pbx_config' ]
'*21202' => hint: Custom:FOLLOWME202 [pbx_config]
1. Goto(app-fmf-toggle|*21|1) [pbx_config]
'*21205' => hint: Custom:FOLLOWME205 [pbx_config]
1. Goto(app-fmf-toggle|*21|1) [pbx_config]
Include => 'ext-findmefollow-custom' [pbx_config]

[ Context 'app-fmf-toggle' created by 'pbx_config' ]
'*21' => 1. Goto(app-fmf-toggle|s|start) [pbx_config]
's' => 1. Answer() [pbx_config]
2. Wait(1) [pbx_config]
3. Macro(user-callerid|) [pbx_config]
4. GotoIf($["${DB(AMPUSER/${AMPUSER}/followme/ddial)}" = "EXTENSION"]?activate) [pbx_config]
5. GotoIf($["${DB(AMPUSER/${AMPUSER}/followme/ddial)}" = "DIRECT"]?deactivate:end) [pbx_config]
[deactivate] 6. Set(DB(AMPUSER/${AMPUSER}/followme/ddial)=EXTENSION) [pbx_config]
7. Set(STATE=NOT_INUSE) [pbx_config]
8. Gosub(app-fmf-toggle|sstate|1) [pbx_config]
9. Playback(followme&de-activated) [pbx_config]
[end] 10. Macro(hangupcall|) [pbx_config]
[activate] 11. Set(DB(AMPUSER/${AMPUSER}/followme/ddial)=DIRECT) [pbx_config]
12. Set(STATE=INUSE) [pbx_config]
13. Gosub(app-fmf-toggle|sstate|1) [pbx_config]
14. Playback(followme&activated) [pbx_config]
15. Macro(hangupcall|) [pbx_config]
'sstate' => 1. Set(DEVICES=${DB(AMPUSER/${AMPUSER}/device)}) [pbx_config]
2. GotoIf($["${DEVICES}" = "" ]?return) [pbx_config]
3. Set(LOOPCNT=${FIELDQTY(DEVICES|&)}) [pbx_config]
4. Set(ITER=1) [pbx_config]
[begin] 5. Set(DEVSTATE(Custom:FOLLOWME${CUT(DEVICES|&|${ITER})})=${STATE}) [pbx_config]
6. Set(ITER=$[${ITER} + 1]) [pbx_config]
7. GotoIf($[${ITER} <= ${LOOPCNT}]?begin) [pbx_config]
[return] 8. Return() [pbx_config]
Include => 'app-fmf-toggle-custom' [pbx_config]

[ Context 'app-speeddial-set' created by 'pbx_config' ]
'1' => 1. Playback(speed-dial) [pbx_config]
2. SayDigits(${newlocation}) [pbx_config]
3. Playback(is-set-to) [pbx_config]
4. SayDigits(${SPEEDDIALNUMBER}) [pbx_config]
5. Goto(s|conflicts) [pbx_config]
'2' => 1. Goto(s|setloc) [pbx_config]
'3' => 1. Goto(s|setnum) [pbx_config]
's' => 1. Macro(user-callerid|) [pbx_config]
[setloc] 2. Read(newlocation|speed-enterlocation||||) [pbx_config]
[lookup] 3. Macro(speeddial-lookup|${newlocation}|${AMPUSER}) [pbx_config]
[lookup] 4. GotoIf($["${SPEEDDIALNUMBER}"!=""]?conflicts) [pbx_config]
[setnum] 5. Read(newnum|speed-enternumber||||) [pbx_config]
[success] 6. Set(DB(AMPUSER/${AMPUSER}/speeddials/${newlocation})=${newnum}) [pbx_config]
7. Playback(speed-dial) [pbx_config]
8. SayDigits(${newlocation}) [pbx_config]
9. Playback(is-set-to) [pbx_config]
10. SayDigits(${newnum}) [pbx_config]
11. Hangup() [pbx_config]
[conflicts] 12. Playback(speed-dial) [pbx_config]
13. SayDigits(${newlocation}) [pbx_config]
14. Playback(is-in-use) [pbx_config]
15. Background(press-1&to-listen-to-it&press-2&to-enter-a-diff&location&press-3&to-change&telephone-number) [pbx_config]
16. WaitExten(60|) [pbx_config]
't' => 1. Congestion() [pbx_config]
Include => 'app-speeddial-set-custom' [pbx_config]

[ Context 'app-speeddial' created by 'pbx_config' ]
'*75' => 1. Goto(app-speeddial-set|s|1) [pbx_config]
'_*0.' => 1. Macro(user-callerid|) [pbx_config]
2. Set(SPEEDDIALLOCATION=${EXTEN:2}) [pbx_config]
[lookup] 3. Macro(speeddial-lookup|${SPEEDDIALLOCATION}|${AMPUSER}) [pbx_config]
4. GotoIf($["${SPEEDDIALNUMBER}"=""]?failed) [pbx_config]
5. Dial(Local/${SPEEDDIALNUMBER}@from-internal/n|) [pbx_config]
[failed] 104. Playback(speed-dial-empty) [pbx_config]
105. Congestion() [pbx_config]
Include => 'app-speeddial-custom' [pbx_config]

[ Context 'macro-speeddial-lookup' created by 'pbx_config' ]
's' => 1. GotoIf($["${ARG2}"=""]]?lookupsys) [pbx_config]
2. Set(SPEEDDIALNUMBER=) [pbx_config]
[lookupuser] 3. Set(SPEEDDIALNUMBER=${DB(AMPUSER/${ARG2}/speeddials/${ARG1})}) [pbx_config]
4. GotoIf($["${SPEEDDIALNUMBER}"=""]?lookupsys) [pbx_config]
5. Noop(Found speeddial ${ARG1} for user ${ARG2}: ${SPEEDDIALNUMBER}) [pbx_config]
6. Goto(end) [pbx_config]
[lookupsys] 104. Set(SPEEDDIALNUMBER=${DB(sysspeeddials/${ARG1})}) [pbx_config]
105. GotoIf($["${SPEEDDIALNUMBER}"=""]?failed) [pbx_config]
106. Noop(Found system speeddial ${ARG1}: ${SPEEDDIALNUMBER}) [pbx_config]
107. Goto(end) [pbx_config]
[failed] 205. Noop(No system or user speeddial found) [pbx_config]
[end] 206. Noop(End of Speeddial-lookup) [pbx_config]
Include => 'macro-speeddial-lookup-custom' [pbx_config]

[ Context 'app-callwaiting-cwon' created by 'pbx_config' ]
'*70' => 1. Answer() [pbx_config]
2. Wait(1) [pbx_config]
3. Macro(user-callerid|) [pbx_config]
4. Set(DB(CW/${AMPUSER})=ENABLED) [pbx_config]
5. Playback(call-waiting&activated) [pbx_config]
6. Macro(hangupcall|) [pbx_config]
Include => 'app-callwaiting-cwon-custom' [pbx_config]

[ Context 'app-callwaiting-cwoff' created by 'pbx_config' ]
'*71' => 1. Answer() [pbx_config]
2. Wait(1) [pbx_config]
3. Macro(user-callerid|) [pbx_config]
4. dbDel(CW/${AMPUSER}) [pbx_config]
5. Playback(call-waiting&de-activated) [pbx_config]
6. Macro(hangupcall|) [pbx_config]
Include => 'app-callwaiting-cwoff-custom' [pbx_config]

[ Context 'app-pbdirectory' created by 'pbx_config' ]
'411' => 1. Answer() [pbx_config]
2. Wait(1) [pbx_config]
3. Goto(pbdirectory|1) [pbx_config]
'hangup' => 1. Hangup() [pbx_config]
'pbdirectory' => 1. Macro(user-callerid|) [pbx_config]
2. AGI(pbdirectory) [pbx_config]
3. GotoIf($["${dialnumber}"=""]?hangup|1) [pbx_config]
4. Noop(Got number to dial: ${dialnumber}) [pbx_config]
5. Dial(Local/${dialnumber}@from-internal/n|) [pbx_config]
Include => 'app-pbdirectory-custom' [pbx_config]

[ Context 'macro-pinsets' created by 'pbx_config' ]
'cdr' => 1. ExecIf($["${DB(AMPUSER/${AMPUSER}/pinless)}" != "NOPASSWD"]|Authenticate|/etc/asterisk/pinset_${ARG1}|a) [pbx_config]
2. ExecIf($["${DB(AMPUSER/${AMPUSER}/pinless)}" != "NOPASSWD"]|ResetCDR|) [pbx_config]
's' => 1. GotoIf(${ARG2} = 1?cdr|1) [pbx_config]
2. ExecIf($["${DB(AMPUSER/${AMPUSER}/pinless)}" != "NOPASSWD"]|Authenticate|/etc/asterisk/pinset_${ARG1}) [pbx_config]
3. ExecIf($["${DB(AMPUSER/${AMPUSER}/pinless)}" != "NOPASSWD"]|ResetCDR|) [pbx_config]
Include => 'macro-pinsets-custom' [pbx_config]

[ Context 'parkedcalls' created by 'res_features' ]
'700' => 1. Park() [res_features]

-= 291 extensions (1622 priorities) in 124 contexts. =




Now on Slingshot Better Network and it's better.

Share Image

 1 | 2
View this topic in a long page with up to 500 replies per page Create new topic




Twitter »
Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:




News »

Trending now »
Hot discussions in our forums right now:

Orcon Global Mode launched
Created by freitasm, last reply by Sounddude on 28-Aug-2014 15:39 (104 replies)
Pages... 5 6 7


Advice on Residential Fence replacement and neighbour
Created by networkn, last reply by nickrout on 27-Aug-2014 19:45 (26 replies)
Pages... 2


Debian can't access DNS
Created by dcole13, last reply by dcole13 on 28-Aug-2014 18:59 (23 replies)
Pages... 2


Lightbox quality Awful
Created by ronw, last reply by networkn on 28-Aug-2014 19:07 (21 replies)
Pages... 2


Vodafone TV multicast settings on pfSense?
Created by kenkeniff, last reply by kenkeniff on 27-Aug-2014 10:32 (182 replies)
Pages... 11 12 13


XtraHost - Closing
Created by achieveit, last reply by quickymart on 27-Aug-2014 18:57 (19 replies)
Pages... 2


Another Gaming computer help question
Created by Lyderies, last reply by timmmay on 26-Aug-2014 18:06 (38 replies)
Pages... 2 3


Lightbox press event release
Created by freitasm, last reply by Item on 28-Aug-2014 18:15 (543 replies)
Pages... 35 36 37



Geekzone Live »
Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.

Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.

Alternatively, you can receive a daily email with Geekzone updates.