| |
| News & Reviews |
Welcome to the Voxilla VoIP Forum.
Voxilla has been a trusted source for accurate, up-to-date information on the IP Communications industry since 2002. A dedicated staff of reporters and engineers produce feature articles and product reviews to keep industry watchers abreast of the people, companies, and trends driving a fast moving market.
You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!
If you have any problems with the registration process or your account login, please contact contact us.
Voxilla VoIP Forum |
user tips and tricksTechnical support, how-to guides, troubleshooting, and general assistance, from beginner to seasoned pro, this is where to discuss Asterisk, the most powerful open source PBX. |
| | LinkBack | Thread Tools | Rate Thread | Display Modes |
| |||
| I wrote a shell script for automatic updates from the dev CVS I am releasing it as open source under GPL liscense, i.e. if you use it please give me credit :wink: edit 8-26-05, Cleaned up a bit works well enough to actualy exicute it from a dialplan, which is pretty messed up, but I have done it :lol: Code: #!/bin/sh PATH=/usr/ucb:/usr/bin:/bin; export PATH echo "shutting down asterisk" /usr/sbin/asterisk -rx "stop now" killall asterisk echo "begining cleanup" if [ -d "/usr/src/astcc" ] then rm -dfR /usr/src/astcc echo "astcc clean" else echo "astcc does not exist" fi if [ -d "/usr/src/asterisk" ] then rm -dfR /usr/src/asterisk echo "asterisk clean" else echo "asterisk does not exist" fi if [ -d "/usr/src/asterisk-addons" ] then rm -dfR /usr/src/asterisk-addons echo "asterisk-addons clean" else echo "asterisk-addons does not exist" fi if [ -d "/usr/src/asterisk-sounds" ] then rm -dfR /usr/src/asterisk-sounds echo "asterisk-sounds clean" else echo "asterisk-sounds does not exist" fi if [ -d "/usr/src/btp" ] then rm -dfR /usr/src/btp echo "btp clean" else echo "btp does not exist" fi if [ -d "/usr/src/gastman" ] then rm -dfR /usr/src/gastman echo "gastman clean" else echo "gastman does not exist" fi if [ -d "/usr/src/libiax" ] then rm -dfR /usr/src/libiax echo "libiax clean" else echo "libiax does not exist" fi if [ -d "/usr/src/libiax2" ] then rm -dfR /usr/src/libiax2 echo "libiax2 clean" else echo "libiax2 does not exist" fi if [ -d "/usr/src/libpri" ] then rm -dfR /usr/src/libpri echo "libpri clean" else echo "libpri does not exist" fi if [ -d "/usr/src/libr2" ] then rm -dfR /usr/src/libr2 echo "libr2 clean" else echo "libr2 does not exist" fi if [ -d "/usr/src/phpconfig" ] then rm -dfR /usr/src/phpconfig echo "phpconfig clean" else echo "phpconfig does not exist" fi if [ -d "/usr/src/zapata" ] then rm -dfR /usr/src/zapata echo "zapata clean" else echo "zapata does not exist" fi if [ -d "/usr/src/zaptel" ] then rm -dfR /usr/src/zaptel echo "zaptel clean" else echo "zaptel does not exist" fi echo "directory cleanup complete" echo "on to cvs update" cd /usr/src export CVSROOT=:pserver:anoncvs:anoncvs@cvs.digium.com:/usr/cvsroot cvs login cvs checkout astcc asterisk asterisk-addons asterisk-sounds btp gastman libiax libiax2 libpri libr2 phpconfig zapata zaptel echo "cvs download complete" echo "beginning compiling process" echo "building zaptel" cd /usr/src/zaptel make clean make install echo "zaptel complete" echo "building zapata" cd /usr/src/zapata make clean make install echo "zapata complete" echo "building phpconfig" cd /usr/src/phpconfig make clean make install echo "phpconfig complete" echo "building libr2" cd /usr/src/libr2 make clean make install echo "zlibr2 complete" echo "libpri zapata" cd /usr/src/libpri make clean make install echo "libpri complete" echo "building libiax2" cd /usr/src/libiax2 make clean make install echo "libiax2 complete" echo "building libiax" cd /usr/src/libiax make clean make install echo "libiax complete" echo "building btp" cd /usr/src/btp make clean make install echo "btp complete" echo "building asterisk" cd /usr/src/asterisk make clean make install echo "asterisk complete" echo "building asterisk-sounds" cd /usr/src/asterisk-sounds make clean make install echo "asterisk-sounds complete" echo "building asterisk-addons" cd /usr/src/asterisk-addons make clean make install echo "asterisk-addons complete" echo "building astcc" cd /usr/src/astcc make clean make install echo "astcc complete" echo "copiling complete" echo "Asterisk will load with verbosity level 8 debugging automagicly" echo "Thank you for using ast_update.sh for asterisk written by Brendon Redick" /usr/sbin/asterisk -vvvvvvvvc |
| ||||
| I made some stuff. Here is just a simple dialplan to change the music on hold realtime from dialing an internal extension or accessing via external extension (did). In the "6" priority, it doesnt have to hangup. You could do like goto something else after it changes. Even though asterisk reboots, it doesnt tear the call down. And its really neat, because if someone is listening to MOH and you go and change the music on hold, it will automaticly change it for them listening to it. Code: =-------------==-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-==-=----=-=-=-=-=-=-=-=--=-=-=---=-=-
;+changing music on hold section...
; Have a directory named "moh_holding"
; with your mp3's labled 1.mp3 2.mp3
; 3.mp3 etc..and your moh DIR changed
; to home_moh, in this case..
; Record the custom prompts yourself
[change-moh]
exten => s,1,background,choose_moh ;review or choose
exten => i,1,playback,invalid
exten => i,2,goto(s|1)
exten => t,1,goto(s|1)
exten => *,1,goto(admin_menu|s|4)
exten => 1,1,playback,thankyou-jb
exten => 1,2,goto(moh-review|s|1)
exten => 2,1,playback,thankyou-jb
exten => 2,2,goto(choose-moh|s|1)
[moh-review]
exten => s,1,playback,press-pound
exten => s,2,wait,2
exten => s,3,playback,/var/lib/asterisk/sounds/digits/1
exten => s,4,MP3Player(/var/lib/asterisk/moh_holding/1.mp3)
exten => s,5,playback,/var/lib/asterisk/sounds/digits/2
exten => s,6,MP3Player(/var/lib/asterisk/moh_holding/2.mp3)
exten => s,7,playback,/var/lib/asterisk/sounds/digits/3
exten => s,8,MP3Player(/var/lib/asterisk/moh_holding/3.mp3)
exten => s,9,playback,/var/lib/asterisk/sounds/digits/4
exten => s,10,MP3Player(/var/lib/asterisk/moh_holding/4.mp3)
exten => s,11,playback,/var/lib/asterisk/sounds/digits/5
exten => s,12,MP3Player(/var/lib/asterisk/moh_holding/5.mp3)
exten => s,13,playback,/var/lib/asterisk/sounds/digits/6
exten => s,14,MP3Player(/var/lib/asterisk/moh_holding/6.mp3)
exten => s,15,playback,/var/lib/asterisk/sounds/digits/7
exten => s,16,MP3Player(/var/lib/asterisk/moh_holding/7.mp3)
exten => s,17,playback,/var/lib/asterisk/sounds/digits/8
exten => s,18,MP3Player(/var/lib/asterisk/moh_holding/8.mp3)
exten => s,19,playback,/var/lib/asterisk/sounds/digits/9
exten => s,20,MP3Player(/var/lib/asterisk/moh_holding/9.mp3)
exten => s,21,playback,/var/lib/asterisk/sounds/digits/10
exten => s,22,MP3Player(/var/lib/asterisk/moh_holding/10.mp3)
exten => s,23,goto(change-moh|s|1)
[choose-moh]
exten => s,1,background,please-choose-moh
exten => i,1,playback,invalid
exten => i,2,goto(s|1)
exten => t,1,goto(s|1)
exten => *,1,goto(admin_menu|s|4)
exten => 1,1,playback,changing-to-1-pls-hold
exten => 1,2,TrySystem(/usr/bin/rm -rf /var/lib/asterisk/home_moh/1.mp3)
exten => 1,3,TrySystem(/usr/bin/cp /var/lib/asterisk/moh_holding/1.mp3 /var/lib/asterisk/home_moh/1.mp3)
exten => 1,4,TrySystem(/usr/bin/killall mpg123 -9)
exten => 1,5,TrySystem(/usr/sbin/asterisk -rx reboot)
exten => 1,6,hangup()
exten => 2,1,playback,changing-to-2-pls-hold
exten => 2,2,TrySystem(/usr/bin/rm -rf /var/lib/asterisk/home_moh/1.mp3)
exten => 2,3,TrySystem(/usr/bin/cp /var/lib/asterisk/moh_holding/2.mp3 /var/lib/asterisk/home_moh/1.mp3)
exten => 2,4,TrySystem(/usr/bin/killall mpg123 -9)
exten => 2,5,TrySystem(/usr/sbin/asterisk -rx reboot)
exten => 2,6,hangup()
exten => 3,1,playback,changing-to-3-pls-hold
exten => 3,2,TrySystem(/usr/bin/rm -rf /var/lib/asterisk/home_moh/1.mp3)
exten => 3,3,TrySystem(/usr/bin/cp /var/lib/asterisk/moh_holding/3.mp3 /var/lib/asterisk/home_moh/1.mp3)
exten => 3,4,TrySystem(/usr/bin/killall mpg123 -9)
exten => 3,5,TrySystem(/usr/sbin/asterisk -rx reboot)
exten => 3,6,hangup()
exten => 4,1,playback,changing-to-4-pls-hold
exten => 4,2,TrySystem(/usr/bin/rm -rf /var/lib/asterisk/home_moh/1.mp3)
exten => 4,3,TrySystem(/usr/bin/cp /var/lib/asterisk/moh_holding/4.mp3 /var/lib/asterisk/home_moh/1.mp3)
exten => 4,4,TrySystem(/usr/bin/killall mpg123 -9)
exten => 4,5,TrySystem(/usr/sbin/asterisk -rx reboot)
exten => 4,6,hangup()
exten => 5,1,playback,changing-to-5-pls-hold
exten => 5,2,TrySystem(/usr/bin/rm -rf /var/lib/asterisk/home_moh/1.mp3)
exten => 5,3,TrySystem(/usr/bin/cp /var/lib/asterisk/moh_holding/5.mp3 /var/lib/asterisk/home_moh/1.mp3)
exten => 5,4,TrySystem(/usr/bin/killall mpg123 -9)
exten => 5,5,TrySystem(/usr/sbin/asterisk -rx reboot)
exten => 5,6,hangup()
exten => 6,1,playback,changing-to-6-pls-hold
exten => 6,2,TrySystem(/usr/bin/rm -rf /var/lib/asterisk/home_moh/1.mp3)
exten => 6,3,TrySystem(/usr/bin/cp /var/lib/asterisk/moh_holding/6.mp3 /var/lib/asterisk/home_moh/1.mp3)
exten => 6,4,TrySystem(/usr/bin/killall mpg123 -9)
exten => 6,5,TrySystem(/usr/sbin/asterisk -rx reboot)
exten => 6,6,hangup()
exten => 7,1,playback,changing-to-7-pls-hold
exten => 7,2,TrySystem(/usr/bin/rm -rf /var/lib/asterisk/home_moh/1.mp3)
exten => 7,3,TrySystem(/usr/bin/cp /var/lib/asterisk/moh_holding/7.mp3 /var/lib/asterisk/home_moh/1.mp3)
exten => 7,4,TrySystem(/usr/bin/killall mpg123 -9)
exten => 7,5,TrySystem(/usr/sbin/asterisk -rx reboot)
exten => 7,6,hangup()
exten => 8,1,playback,changing-to-8-pls-hold
exten => 8,2,TrySystem(/usr/bin/rm -rf /var/lib/asterisk/home_moh/1.mp3)
exten => 8,3,TrySystem(/usr/bin/cp /var/lib/asterisk/moh_holding/8.mp3 /var/lib/asterisk/home_moh/1.mp3)
exten => 8,4,TrySystem(/usr/bin/killall mpg123 -9)
exten => 8,5,TrySystem(/usr/sbin/asterisk -rx reboot)
exten => 8,6,hangup()
exten => 9,1,playback,changing-to-9-pls-hold
exten => 9,2,TrySystem(/usr/bin/rm -rf /var/lib/asterisk/home_moh/1.mp3)
exten => 9,3,TrySystem(/usr/bin/cp /var/lib/asterisk/moh_holding/9.mp3 /var/lib/asterisk/home_moh/1.mp3)
exten => 9,4,TrySystem(/usr/bin/killall mpg123 -9)
exten => 9,5,TrySystem(/usr/sbin/asterisk -rx reboot)
exten => 9,6,hangup()
exten => 10,1,playback,changing-to-10-pls-hold
exten => 10,2,TrySystem(/usr/bin/rm -rf /var/lib/asterisk/home_moh/1.mp3)
exten => 10,3,TrySystem(/usr/bin/cp /var/lib/asterisk/moh_holding/10.mp3 /var/lib/asterisk/home_moh/1.mp3)
exten => 10,4,TrySystem(/usr/bin/killall mpg123 -9)
exten => 10,5,TrySystem(/usr/sbin/asterisk -rx reboot)
exten => 10,6,hangup() |
| ||||
| This is a context for extensions.conf to change the proxy you use with BroadVoice service, remotly thru an IVR menu you can reach either internaly dialing or dialing from the pstn. This comes in handy when you are having issues and need to change the proxy and you dont have access to the asterisk server. You should probally set a password up on this if you have it accecible from the pstn. Code: Must have 8 text files in etc/asterisk All labeled atl.conf dca.conf etc.. All filled out with each proxy info like it would be etc/hosts If you need help recording the custom recordings that are in this context, please refer to the bottom of this document. If you need more of an explanation of how to use this context, please feel free to email me at telephones <at> usa <dot> com [change-host-bv] exten => s,1,backgound,please_choose_proxy ;please choose etc.. exten => i,1,playback,invalid exten => i,2,goto(s|1) exten => t,1,goto(s|1) ;------------------------------------------------------------------ exten => 1,1,playback,changing_atl ;now changing to atl, pls hld exten => 1,2,TrySystem(/usr/bin/rm -rf /etc/hosts) exten => 1,3,TrySystem(/usr/bin/cp /etc/asterisk/atl.conf /etc/hosts) exten => 1,4,TrySystem(/usr/sbin/asterisk -rx reload) exten => 1,5,hangup() exten => 2,1,playback,changing_bos ;now changing to bos, pls hld exten => 2,2,TrySystem(/usr/bin/rm -rf /etc/hosts) exten => 2,3,TrySystem(/usr/bin/cp /etc/asterisk/bos.conf /etc/hosts) exten => 2,4,TrySystem(/usr/sbin/asterisk -rx reload) exten => 2,5,hangup() exten => 3,1,playback,changing_chi ;now changing to chi, pls hld exten => 3,2,TrySystem(/usr/bin/rm -rf /etc/hosts) exten => 3,3,TrySystem(/usr/bin/cp /etc/asterisk/chi.conf /etc/hosts) exten => 3,4,TrySystem(/usr/sbin/asterisk -rx reload) exten => 3,5,hangup() exten => 4,1,playback,changing_dca ;now changing to dca, pls hld exten => 4,2,TrySystem(/usr/bin/rm -rf /etc/hosts) exten => 4,3,TrySystem(/usr/bin/cp /etc/asterisk/dca.conf /etc/hosts) exten => 4,4,TrySystem(/usr/sbin/asterisk -rx reload) exten => 4,5,hangup() exten => 5,1,playback,changing_dca2 ;now changing to dca2, pls hld exten => 5,2,TrySystem(/usr/bin/rm -rf /etc/hosts) exten => 5,3,TrySystem(/usr/bin/cp /etc/asterisk/dca2.conf /etc/hosts) exten => 5,4,TrySystem(/usr/sbin/asterisk -rx reload) exten => 5,5,hangup() exten => 6,1,playback,changing_lax ;now changing to lax, pls hld exten => 6,2,TrySystem(/usr/bin/rm -rf /etc/hosts) exten => 6,3,TrySystem(/usr/bin/cp /etc/asterisk/lax.conf /etc/hosts) exten => 6,4,TrySystem(/usr/sbin/asterisk -rx reload) exten => 6,5,hangup() exten => 7,1,playback,changing_mia ;now changing to mia, pls hld exten => 7,2,TrySystem(/usr/bin/rm -rf /etc/hosts) exten => 7,3,TrySystem(/usr/bin/cp /etc/asterisk/mia.conf /etc/hosts) exten => 7,4,TrySystem(/usr/sbin/asterisk -rx reload) exten => 7,5,hangup() exten => 8,1,playback,changing_nyc ;now changing to nyc, pls hld exten => 8,2,TrySystem(/usr/bin/rm -rf /etc/hosts) exten => 8,3,TrySystem(/usr/bin/cp /etc/asterisk/nyc.conf /etc/hosts) exten => 8,4,TrySystem(/usr/sbin/asterisk -rx reload) exten => 8,5,hangup() --------------------------------------------------;EOD Ok if you need help recording the custom recordings here is a context you can use in your extensions.conf to record them all in one shot. So make sure you print this out so you can see where you are when recording. Press pound to proceed to record next message. [record_custom_recordings] exten => s,1,Authenticate,1111 ;passcode exten => s,2,record,/var/lib/asterisk/sounds/please_choose_proxy:gsm exten => s,3,record,/var/lib/asterisk/sounds/changing_atl:gsm exten => s,4,record,/var/lib/asterisk/sounds/changing_bos:gsm exten => s,5,record,/var/lib/asterisk/sounds/changing_chi:gsm exten => s,6,record,/var/lib/asterisk/sounds/changing_dca:gsm exten => s,7,record,/var/lib/asterisk/sounds/changing_dca2:gsm exten => s,8,record,/var/lib/asterisk/sounds/changing_mia:gsm exten => s,9,record,/var/lib/asterisk/sounds/changing_nyc:gsm exten => s,10,record,/var/lib/asterisk/sounds/changing_lax:gsm exten => s,11,Playback,/var/lib/asterisk/sounds/please_choose_proxy exten => s,12,Playback,/var/lib/asterisk/sounds/changing_atl exten => s,13,Playback,/var/lib/asterisk/sounds/changing_bos exten => s,14,Playback,/var/lib/asterisk/sounds/changing_chi exten => s,15,Playback,/var/lib/asterisk/sounds/changing_dca exten => s,16,Playback,/var/lib/asterisk/sounds/changing_dca2 exten => s,17,Playback,/var/lib/asterisk/sounds/changing_mia exten => s,18,Playback,/var/lib/asterisk/sounds/changing_nyc exten => s,19,Playback,/var/lib/asterisk/sounds/changing_lax exten => s,20,playback,thankyou exten => s,21,hangup() --=-- Dialog for the custom recordings, for the recording ’please_choose_proxy’ should say something to the affect: “Welcome, please choose your proxy now, for Atlanta press 1, for Boston press 2, for Chicago press 3, for DCA press 4, for DCA2 press 5, for Miami press 6, for New York press 7, for LA press 8. Please make your selection now” - All of the ‘changing_lax’ etc should say something like “You chose ‘insert proxy name here’ please hold.” This file is just a part of a major admin IVR I’m putting together for my own enjoyment and will be sharing it with anyone. If you have any advice or anything you might think I would like to add to this menu please feel free to contact me. Peace |
| ||||
| tehcall, I have two recommendations for your "change proxy" script a little, one easy and one more difficult. The easy change is to limit the impact on system resources to just those needed. I would change each instance of TrySystem(/usr/sbin/asterisk -rx reload) to TrySystem(/usr/sbin/asterisk -rx "sip reload") It's unnecessary to reload anything more than sip.conf to accomplish this update, so doing a global "reload" is overkill. The other change is more difficult. Your scheme of setting up eight different /etc/hosts files and copying in the one you want is only good if "sip.broadvoice.com" is the only line item in the file. If the user already has other entries in /etc/hosts, your scheme will introduce a level of complexity into that maintenance.
__________________ Please do not send technical questions via PM. Please post all questions to the forum. |
| | |
| Linksys SPA3102-NA (Unlocked) Includes VoIP/PSTN gateway, FXO/FXS ports, and router. Sale Price: $76.95 |
| ||||
| Yea I only have the localhost in the hosts file. Thanks for the comments to improve this dialplan. I'm sure theres other ways to accomplish this. I just did it the only way I could think of with the long ass dialplan. But I was only making this for the public to take and do what they want with it. I want to get this admin menu finished I just have so much on my plate right now. I want to add like a ping menu to ping preselected proxies to help determine the right one for the moment and also be able to ping IP addresses on demand. But I can't figure out how to get festival to read from a particular line in a txt file. A friend blackratchet wrote a pl to nmap via the phone which is pretty sweet. Its here http://oldskoolphreak.com/tfiles/voip/tts-nmap.agi |
| ||||
| My experience is that ping times are not a valid indicator of proxy performance, so I wouldn't spend too much time chasing that dragon. Ping packets are tiny and are only transmitted one packet every few seconds, so they tend to get through congestions that would choke RTP packets, which are larger and much more plentiful. I find that actual proxy performance more often than not will trump the ping time. For example, from Japan LAX proxy is about 20ms "shorter" to me than any other BV proxy. Still, for the last two weeks I was on DCA2 because it was performing better than LAX.
__________________ Please do not send technical questions via PM. Please post all questions to the forum. |
| |||
| I just installed the asterisk nmap agi.....it works great! Thank you very much! |
| Thread Tools | |
| Display Modes | Rate This Thread |
| |
| | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Tips for configuring and using BV (not BYOD)? | tapir | BroadVoice Support Forum | 7 | September 15th, 2006 05:30 AM |
| Linksys/Sipura: Tips and Tricks | markn455 | Linksys (Sipura) VoIP Support Forum | 1 | August 30th, 2006 11:54 PM |
| Any stupid Sipura tricks? | kcallis | Linksys (Sipura) VoIP Support Forum | 1 | February 1st, 2006 11:36 AM |
| Great New Article on Asterisk@Home Tips and Tricks | AlexanderBell | Asterisk Support Forum | 0 | August 26th, 2005 12:14 PM |
| FX-200 Trouble Shooting Tips | sipcpe | SIPCPE Support Forum | 11 | March 18th, 2005 02:35 AM |