Re: [asterisk-users] Script to Program Snom Phones
If you use freepbx you can do it with endpoint manager http://schmoozecom.com/endpoint-manager.php It costs I think in the latest freepbx version but there will be earlier versions around It's just generating templates by mac for the tftp server On 10/04/2015, at 4:37 am, Tafadzwa Nyabasa tnyab...@gmail.com wrote: Hi There, Does anyone know how to program Snom phones using a Mac addresses like what is done with the Ciscos. I have about 50 extensions to be programmed and I am hoping there is a way on Asterisk to program extensions on the snom phones. Please assist. Regards -- Tafadzwa Nyabasa Cell: 071 900 2849 Fax: 0862413605 -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Script to Program Snom Phones
On Thu, Apr 9, 2015 at 12:23 PM, Derek Andrew derek.and...@usask.ca wrote: SNOM phones can be configured using files on a TFTP server. On Thu, Apr 9, 2015 at 11:14 AM, jg webaccounts...@jgoettgens.de wrote: Does anyone know how to program Snom phones using a Mac addresses like what is done with the Ciscos. I have about 50 extensions to be programmed and I am hoping there is a way on Asterisk to program extensions on the snom phones. Please assist. What do you mean with 50 extensions? Snom phones allow to define a directory, where you can export and import a simple text file. There might also be a way to automate this using one of the provisioning methods. jg -- Copyright 2015 Derek Andrew (excluding quotations) +1 306 966 4808 University of Saskatchewan Peterson 120; 54 Innovation Boulevard Saskatoon,Saskatchewan,Canada. S7N 2V3 Timezone GMT-6 Typed but not read. -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users HTTP is the prefered method of provisioning. You can see http://wiki.snom.com/Settings/setting_server and even the dynamic tools baked into Asterisk at https://wiki.asterisk.org/wiki/display/AST/Phone+Provisioning+in+Asterisk -- ~ Andrew lathama Latham lath...@lathama.com http://lathama.net ~ -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Script to Program Snom Phones
Does anyone know how to program Snom phones using a Mac addresses like what is done with the Ciscos. I have about 50 extensions to be programmed and I am hoping there is a way on Asterisk to program extensions on the snom phones. Please assist. What do you mean with 50 extensions? Snom phones allow to define a directory, where you can export and import a simple text file. There might also be a way to automate this using one of the provisioning methods. jg -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] Script to Program Snom Phones
Hi There, Does anyone know how to program Snom phones using a Mac addresses like what is done with the Ciscos. I have about 50 extensions to be programmed and I am hoping there is a way on Asterisk to program extensions on the snom phones. Please assist. Regards -- Tafadzwa Nyabasa Cell: 071 900 2849 Fax: 0862413605 -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Script to Program Snom Phones
On Thu, April 9, 2015 12:37, Tafadzwa Nyabasa wrote: Hi There, Does anyone know how to program Snom phones using a Mac addresses like what is done with the Ciscos. I have about 50 extensions to be programmed and I am hoping there is a way on Asterisk to program extensions on the snom phones. Please assist. Regards I do not think that this is specifically an Asterisk problem. The SNOM phones that we use (870s and 76s) have FW 8.7.3.25.5. On the Update tab of the Advanced setting page there are set the update policy and URI. In our case the settings are 'Never update, load settings only', from URL http://192.168.6.9:83, with a refresh interval of 600840. The phone will look at http://192.168.6.9:83 for a file called snom870-.htm where is the phone's MAC number. If that fails then it will look for snom870.htm instead. These files should contain the xml dialect for the SNOM phone configuration directives: ?xml version=1.0 encoding=utf-8? settings phone-settings language perm=RWEnglish/language dnd_on_code perm=*78/dnd_on_code . . . /phone-settings /settings You need to provide a service that will provide the file via URI. You must put files therein with names following the specific nomenclature employed buy the phones themselves. Finally you must also set the phones to read from that location and to apply the configurations retrieved therefrom. -- *** E-Mail is NOT a SECURE channel *** James B. Byrnemailto:byrn...@harte-lyne.ca Harte Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3 -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Script to Program Snom Phones
SNOM phones can be configured using files on a TFTP server. On Thu, Apr 9, 2015 at 11:14 AM, jg webaccounts...@jgoettgens.de wrote: Does anyone know how to program Snom phones using a Mac addresses like what is done with the Ciscos. I have about 50 extensions to be programmed and I am hoping there is a way on Asterisk to program extensions on the snom phones. Please assist. What do you mean with 50 extensions? Snom phones allow to define a directory, where you can export and import a simple text file. There might also be a way to automate this using one of the provisioning methods. jg -- Copyright 2015 Derek Andrew (excluding quotations) +1 306 966 4808 University of Saskatchewan Peterson 120; 54 Innovation Boulevard Saskatoon,Saskatchewan,Canada. S7N 2V3 Timezone GMT-6 Typed but not read. -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] Script to automatically update externip. Useful for a host with dynamic public IP
#!/bin/bash # checksetexternip.sh # Author: John Cahill em...@johncahill.net # Licence: GPL v3 # Description: script that queries checkip.dyndns.com to find the server's external IP address. Updates asterisk's externip value and does a sip reload if necessary. # Last modified 06/02/2012 is_ip(){ input=$1 octet1=$(echo $input | cut -d . -f1) octet2=$(echo $input | cut -d . -f2) octet3=$(echo $input | cut -d . -f3) octet4=$(echo $input | cut -d . -f4) stat=1 if [[ $input =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]] [ $octet1 -le 255 ] [ $octet2 -le 255 ] [ $octet3 -le 255 ] [ $octet4 -le 255 ]; then stat=0 fi return $stat } EXTERNIP=`wget -qO- checkip.dyndns.com | awk '{print $6}'| cut -d -f1` is_ip $EXTERNIP if [ $? -ne 0 ] then logger -s checksetexternip.sh: External IP address invalid or unavailable, exiting. exit 1 fi OLDEXTERNIP=`grep externip /etc/asterisk/sip_general_custom.conf | cut -d= -f2` if [ $EXTERNIP = $OLDEXTERNIP ] then logger -s checksetexternip.sh: External IP address is the same, nothing to do exiting. exit 0 else logger -s checksetexternip.sh: External IP address has changed, changing /etc/asterisk/sip_general_custom.conf grep -v externip /etc/asterisk/sip_general_custom.conf /etc/asterisk/sip_general_custom.conf.tmp echo externip=$EXTERNIP /etc/asterisk/sip_general_custom.conf.tmp cp /etc/asterisk/sip_general_custom.conf.tmp /etc/asterisk/sip_general_custom.conf rm /etc/asterisk/sip_general_custom.conf.tmp logger -s Doing asterisk -rx sip reload asterisk -rx sip reload fi John Cahill Systems Engineer Services for Asterisk Data Messaging Communications Ltd Fourth Floor 22 Lever St Manchester M1 1EA Email: j...@dmcip.com Telephone: 0800 862 0181 Fax: 0161 850 0126 jabber: gnuj...@jabber.org -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Script to automatically update externip. Useful for a host with dynamic public IP
Note: You'll probably have to change /etc/asterisk/sip_general_custom.conf to /etc/asterisk/sip.conf in the script depending on your set-up. - Original Message - From: John Cahill j...@dmcip.com To: Asterisk Users Mailing asterisk-users@lists.digium.com Sent: Monday, 6 February, 2012 3:31:23 PM Subject: [asterisk-users] Script to automatically update externip. Useful for a host with dynamic public IP #!/bin/bash # checksetexternip.sh # Author: John Cahill em...@johncahill.net # Licence: GPL v3 # Description: script that queries checkip.dyndns.com to find the server's external IP address. Updates asterisk's externip value and does a sip reload if necessary. # Last modified 06/02/2012 is_ip(){ input=$1 octet1=$(echo $input | cut -d . -f1) octet2=$(echo $input | cut -d . -f2) octet3=$(echo $input | cut -d . -f3) octet4=$(echo $input | cut -d . -f4) stat=1 if [[ $input =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]] [ $octet1 -le 255 ] [ $octet2 -le 255 ] [ $octet3 -le 255 ] [ $octet4 -le 255 ]; then stat=0 fi return $stat } EXTERNIP=`wget -qO- checkip.dyndns.com | awk '{print $6}'| cut -d -f1` is_ip $EXTERNIP if [ $? -ne 0 ] then logger -s checksetexternip.sh: External IP address invalid or unavailable, exiting. exit 1 fi OLDEXTERNIP=`grep externip /etc/asterisk/sip_general_custom.conf | cut -d= -f2` if [ $EXTERNIP = $OLDEXTERNIP ] then logger -s checksetexternip.sh: External IP address is the same, nothing to do exiting. exit 0 else logger -s checksetexternip.sh: External IP address has changed, changing /etc/asterisk/sip_general_custom.conf grep -v externip /etc/asterisk/sip_general_custom.conf /etc/asterisk/sip_general_custom.conf.tmp echo externip=$EXTERNIP /etc/asterisk/sip_general_custom.conf.tmp cp /etc/asterisk/sip_general_custom.conf.tmp /etc/asterisk/sip_general_custom.conf rm /etc/asterisk/sip_general_custom.conf.tmp logger -s Doing asterisk -rx sip reload asterisk -rx sip reload fi John Cahill Systems Engineer Services for Asterisk Data Messaging Communications Ltd Fourth Floor 22 Lever St Manchester M1 1EA Email: j...@dmcip.com Telephone: 0800 862 0181 Fax: 0161 850 0126 jabber: gnuj...@jabber.org -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- John Cahill Systems Engineer Services for Asterisk Data Messaging Communications Ltd Fourth Floor 22 Lever St Manchester M1 1EA Email: j...@dmcip.com Telephone: 0800 862 0181 Fax: 0161 850 0126 jabber: gnuj...@jabber.org -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Script to automatically update externip. Useful for a host with dynamic public IP
On Monday 06 Feb 2012, John Cahill wrote: logger -s checksetexternip.sh: External IP address has changed, changing /etc/asterisk/sip_general_custom.conf grep -v externip /etc/asterisk/sip_general_custom.conf /etc/asterisk/sip_general_custom.conf.tmp echo externip=$EXTERNIP /etc/asterisk/sip_general_custom.conf.tmp cp /etc/asterisk/sip_general_custom.conf.tmp /etc/asterisk/sip_general_custom.conf rm /etc/asterisk/sip_general_custom.conf.tmp You could also do something like: sed -i -e s/^externip *=.*/externip = $EXTERNIP/ /etc/asterisk/sip.conf Apologies for the wrapped code. Regards, -- Raj -- Raj Mathur || r...@kandalaya.org || GPG: http://otheronepercent.blogspot.com || http://kandalaya.org || CC68 It is the mind that moves || http://schizoid.in || D17F -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Script to automatically update externip. Useful for a host with dynamic public IP
To me it would be simpler to use externhost instead of externip and then use a dynamic DNS service. It has worked flawlessly for me for many years. Regards David. -Original Message- From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Raj Mathur (??? ?) Sent: Tuesday, 7 February 2012 1:19 PM To: asterisk-users@lists.digium.com Subject: Re: [asterisk-users] Script to automatically update externip. Useful for a host with dynamic public IP On Monday 06 Feb 2012, John Cahill wrote: logger -s checksetexternip.sh: External IP address has changed, changing /etc/asterisk/sip_general_custom.conf grep -v externip /etc/asterisk/sip_general_custom.conf /etc/asterisk/sip_general_custom.conf.tmp echo externip=$EXTERNIP /etc/asterisk/sip_general_custom.conf.tmp cp /etc/asterisk/sip_general_custom.conf.tmp /etc/asterisk/sip_general_custom.conf rm /etc/asterisk/sip_general_custom.conf.tmp You could also do something like: sed -i -e s/^externip *=.*/externip = $EXTERNIP/ /etc/asterisk/sip.conf Apologies for the wrapped code. Regards, -- Raj -- Raj Mathur || r...@kandalaya.org || GPG: http://otheronepercent.blogspot.com || http://kandalaya.org || CC68 It is the mind that moves || http://schizoid.in || D17F -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] script to trim sip.conf
Hey Guys! Sorry i am posting scripting question in asterisk forum but i had no choice. also i am not script expert so i though anyone here might help me. following is my example sip.conf now i want to add accountcode=callerid_name for example accountcode=Katie Wilson in entire file. we have around 200 extension could someone help me to figure out how to do that with perl script or shell would be fine. [100](seb-exten) callerid=Katie Wilson 100 mailbox=100@default [200](seb-exten) callerid=Ramona Minero 200 mailbox=200@default -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] script to trim sip.conf
On Tue, May 17, 2011 at 4:21 PM, satish patel satish...@hotmail.com wrote: Hey Guys! Sorry i am posting scripting question in asterisk forum but i had no choice. also i am not script expert so i though anyone here might help me. following is my example sip.conf now i want to add accountcode=callerid_name for example accountcode=Katie Wilson in entire file. we have around 200 extension could someone help me to figure out how to do that with perl script or shell would be fine. [100](seb-exten) callerid=Katie Wilson 100 mailbox=100@default [200](seb-exten) callerid=Ramona Minero 200 mailbox=200@default Satish, Give this a shot: cat sip.conf | perl -pi -e s/^callerid=\(.*)\ (.*)/callerid=\\$1\ \$2\naccountcode=\\$1\/ sip.conf.new and compare them. -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] script to trim sip.conf
Holy cow! you made my day Thank you so much... It works great!!! S. From: mden...@gmail.com Date: Tue, 17 May 2011 17:02:55 -0400 To: asterisk-users@lists.digium.com Subject: Re: [asterisk-users] script to trim sip.conf On Tue, May 17, 2011 at 4:21 PM, satish patel satish...@hotmail.com wrote: Hey Guys! Sorry i am posting scripting question in asterisk forum but i had no choice. also i am not script expert so i though anyone here might help me. following is my example sip.conf now i want to add accountcode=callerid_name for example accountcode=Katie Wilson in entire file. we have around 200 extension could someone help me to figure out how to do that with perl script or shell would be fine. [100](seb-exten) callerid=Katie Wilson 100 mailbox=100@default [200](seb-exten) callerid=Ramona Minero 200 mailbox=200@default Satish, Give this a shot: cat sip.conf | perl -pi -e s/^callerid=\(.*)\ (.*)/callerid=\\$1\ \$2\naccountcode=\\$1\/ sip.conf.new and compare them. -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] Script to show asterisk stuff
Hello folks. I'm looking into having a web page displaying asterisk callers. We are a call centre, and having operators answering calls at home or whatever, they would need to have a real time application to display how manny callers are queuing, for how long etc. At first, I thought of phpagi. It connects to the manager and does a core show channels concise. This has most of the info I want. After tweaking with php to parse the text to exatcly how I wanted, I found out that the script would be slow if it was self refreshing (say 2 secs) and with about 30 people opening it at the same time. So now I was thinking in a script that would connect to the Manager, and parse that output into a mysql table. A Web page would consult the mysql table, showing the wanted results. Then I thought twice and maybe some of you already developed a situation like this and would not mind sharing? I don't mind sharing the little I done so far, if anyone is interested. Thanks all ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Script to show asterisk stuff
On 4 Jan 2010, at 16:46, Tiago Geada wrote: Hello folks. I'm looking into having a web page displaying asterisk callers. We are a call centre, and having operators answering calls at home or whatever, they would need to have a real time application to display how manny callers are queuing, for how long etc. At first, I thought of phpagi. It connects to the manager and does a core show channels concise. This has most of the info I want. After tweaking with php to parse the text to exatcly how I wanted, I found out that the script would be slow if it was self refreshing (say 2 secs) and with about 30 people opening it at the same time. So now I was thinking in a script that would connect to the Manager, and parse that output into a mysql table. A Web page would consult the mysql table, showing the wanted results. Or, if you want less work.. have a script which connects to the manager, formats the data and creates an HTML page. Then wait x seconds and loop. Then, home workers just view that one static page and use a meta-refresh or something.. Only one script is doing any real work and serving a static page to clients shouldn't overload the server. Will ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Script to show asterisk stuff
2010/1/4 Will Payne w...@teambadger.co.uk On 4 Jan 2010, at 16:46, Tiago Geada wrote: Hello folks. I'm looking into having a web page displaying asterisk callers. We are a call centre, and having operators answering calls at home or whatever, they would need to have a real time application to display how manny callers are queuing, for how long etc. At first, I thought of phpagi. It connects to the manager and does a core show channels concise. This has most of the info I want. After tweaking with php to parse the text to exatcly how I wanted, I found out that the script would be slow if it was self refreshing (say 2 secs) and with about 30 people opening it at the same time. So now I was thinking in a script that would connect to the Manager, and parse that output into a mysql table. A Web page would consult the mysql table, showing the wanted results. Or, if you want less work.. have a script which connects to the manager, formats the data and creates an HTML page. Then wait x seconds and loop. Then, home workers just view that one static page and use a meta-refresh or something.. Only one script is doing any real work and serving a static page to clients shouldn't overload the server. Will __ Hi Will. Thanks for replying. That was sort of my second thought. But once I connect to the manager I can listen to all the events, Calls comming in, which extension they are dialed to, lots of info... so I just got sort of confused for whitch path I should take. I guess I will do just that. Thanks _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] script
I want to have Asterisk Dial individual numbers and play a recording if each answers. If they don't answer then the code rolls to the next number. Should I set up a spreadsheet somewhere and load with the numbers? Or, an AGI script? 1. Dial number 1 2. If connect, then play message 3. If connect, finish message and move to next number 4. Dial 1 - 10,000 in succession ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] script
First of all, if your connection is DAHDI/POTS, forget about this. That being said, the simple thing to do is to set up a context that plays your recording and do a script to read through the list of numbers and call each using AMI and the context. You could use the call queue, but that wouldn't give you any control. -Original Message- From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Thomas Perron Sent: Monday, December 21, 2009 7:04 AM To: asterisk-users@lists.digium.com Subject: [asterisk-users] script I want to have Asterisk Dial individual numbers and play a recording if each answers. If they don't answer then the code rolls to the next number. Should I set up a spreadsheet somewhere and load with the numbers? Or, an AGI script? 1. Dial number 1 2. If connect, then play message 3. If connect, finish message and move to next number 4. Dial 1 - 10,000 in succession ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] script
2009/12/21 Thomas Perron thomas.per...@gmail.com: I want to have Asterisk Dial individual numbers and play a recording if each answers. If they don't answer then the code rolls to the next number. Should I set up a spreadsheet somewhere and load with the numbers? Or, an AGI script? 1. Dial number 1 2. If connect, then play message 3. If connect, finish message and move to next number 4. Dial 1 - 10,000 in succession I've developed several solutions using a combination of AMI to originate calls and AGI to personalize messages. If message is the same for all destinations, you can skip using AGI. And if you need to make the calls just once you might want to take a look at asterisk call files instead of AMI, probably they will suit your needs, depending on how much control do you need over the calls. Roman blog: http://it-result.me ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] script
Neither. Use call files or the AMI Originate command. -- Sent from mobile device On Dec 21, 2009, at 8:04 AM, Thomas Perron thomas.per...@gmail.com wrote: I want to have Asterisk Dial individual numbers and play a recording if each answers. If they don't answer then the code rolls to the next number. Should I set up a spreadsheet somewhere and load with the numbers? Or, an AGI script? 1. Dial number 1 2. If connect, then play message 3. If connect, finish message and move to next number 4. Dial 1 - 10,000 in succession ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] script
You could use a spreadsheet to do an AMI control. -Original Message- From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Alex Balashov Sent: Monday, December 21, 2009 10:30 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Cc: asterisk-users@lists.digium.com Subject: Re: [asterisk-users] script Neither. Use call files or the AMI Originate command. -- Sent from mobile device On Dec 21, 2009, at 8:04 AM, Thomas Perron thomas.per...@gmail.com wrote: I want to have Asterisk Dial individual numbers and play a recording if each answers. If they don't answer then the code rolls to the next number. Should I set up a spreadsheet somewhere and load with the numbers? Or, an AGI script? 1. Dial number 1 2. If connect, then play message 3. If connect, finish message and move to next number 4. Dial 1 - 10,000 in succession ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] script
Hi Roman, I am trying Originate AMI command within a php file for a browser veiwing to do a spoof call with user inputin dial number, phone number, and spoof number but I am failing. Would you mind to share some of you AMI php code with us that relates to originate? Thanks a bunch, Bruce On Mon, Dec 21, 2009 at 10:18 AM, Roman roman.maill...@gmail.com wrote: 2009/12/21 Thomas Perron thomas.per...@gmail.com: I want to have Asterisk Dial individual numbers and play a recording if each answers. If they don't answer then the code rolls to the next number. Should I set up a spreadsheet somewhere and load with the numbers? Or, an AGI script? 1. Dial number 1 2. If connect, then play message 3. If connect, finish message and move to next number 4. Dial 1 - 10,000 in succession I've developed several solutions using a combination of AMI to originate calls and AGI to personalize messages. If message is the same for all destinations, you can skip using AGI. And if you need to make the calls just once you might want to take a look at asterisk call files instead of AMI, probably they will suit your needs, depending on how much control do you need over the calls. Roman blog: http://it-result.me ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] Script to softly restart Asterisk each midnight to clean locked channels
As Asterisk has inner problems and channels very often locks we have such script to restart Asterisk each midnight. We (our clients) mostly use v1.4.18.1. We can't upgrade to newer versions because there are too much changes which would brake our system (realtime/sip/iax2/cdr/etc/etc). Script soft hangups all alive channels in dirty way then kills Asterisk and starts it up. Hope it will be useful to somebody. Corrections/comments welcome. #! /bin/sh # Script to restart asterisk softly by Kolmisoft # crontab # 0 0 * * * /usr/local/mor/asterisk_nice_restart.sh # tell Asterisk do not accept new calls asterisk -rx 'stop gracefully' /dev/null # read all channels asterisk -rx 'core show channels verbose' | sed '1d' /tmp/f1 cat /tmp/f1 | awk '{split ($0,a, ); print a[11]}' /tmp/f2 # hangup all alive channels for i in `cat /tmp/f2`; do asterisk -rx soft hangup $i /dev/null done # let asterisk to stop by itself sleep 5 # kill remainings killall -9 safe_asterisk killall -9 asterisk # start fresh and ready to work! /etc/init.d/asterisk start # clean rm -rf /tmp/f1 rm -rf /tmp/f2 Regards, Mindaugas Kezys http://www.kolmisoft.com VoIP Billing and Routing Solutions ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Script to softly restart Asterisk each midnight to clean locked channels
Mindaugas Kezys escribió: As Asterisk has inner problems and channels very often locks we have such script to restart Asterisk each midnight. snip That is the things we must help to solve for not having to do to something like this on asterisk servers. Fortunately I use 1.4.22 version which has proved to me to be quite stable, judging from this uptime: System uptime: 1 week, 2 days, 19 hours, 22 minutes, 53 seconds Last reload: 10 hours, 31 minutes, 33 seconds Upgrading to 1.4.23.1 resulted in random core dumps (suspecting attended transfers issue) but unfortunately I've had no time to debug it and make a good bug report. My case is a 24/7/365 non-stop call center, so I didn't have another choice but to rollback. I hope some of us just can help asterisk be better by trying to use the latest version at least on testing environments, to not having to maintain an internal version and cherrypicking patches that may or may not resolve the issues that we could experience. Just my 2 cents... -- Ing. Miguel Molina Grupo de Tecnología Millenium Phone Center PBX: (+57 1)6500800 ext. 1201 Fax: (+57 1)6500816 Móvil: (+57)3138873587 ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Script to softly restart Asterisk each midnight to clean locked channels
On Thu, 19 Mar 2009, Miguel Molina wrote: Mindaugas Kezys escribi?: As Asterisk has inner problems and channels very often locks we have such script to restart Asterisk each midnight. snip Why restart Asterisk, free up the channel... From cron, you can clear up any calls over say 3 hours: /usr/sbin/asterisk -rx show channels concise|awk -F : '($11 10800) {print /usr/sbin/asterisk -rx \soft hangup $1 \}'|sh You don't necessarily have to keep restarting it at midnight. =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ J. Oquendo SGFA, SGFE, C|EH, CNDA, CHFI, OSCP Enough research will tend to support your conclusions. - Arthur Bloch A conclusion is the place where you got tired of thinking - Arthur Bloch 227C 5D35 7DCB 0893 95AA 4771 1DCE 1FD1 5CCD 6B5E http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x5CCD6B5E ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Script to softly restart Asterisk each midnight to clean locked channels
Any guidelines how to solve locked channels problems? E.g. to find out which part of the code has problems and causes locks. Upgrade to newer versions are not an option. Regards, Mindaugas Kezys http://www.kolmisoft.com VoIP Billing and Routing Solutions -Original Message- From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Miguel Molina Sent: 2009 m. kovo 19 d. 17:47 To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Script to softly restart Asterisk each midnight to clean locked channels Mindaugas Kezys escribió: As Asterisk has inner problems and channels very often locks we have such script to restart Asterisk each midnight. snip That is the things we must help to solve for not having to do to something like this on asterisk servers. Fortunately I use 1.4.22 version which has proved to me to be quite stable, judging from this uptime: System uptime: 1 week, 2 days, 19 hours, 22 minutes, 53 seconds Last reload: 10 hours, 31 minutes, 33 seconds Upgrading to 1.4.23.1 resulted in random core dumps (suspecting attended transfers issue) but unfortunately I've had no time to debug it and make a good bug report. My case is a 24/7/365 non-stop call center, so I didn't have another choice but to rollback. I hope some of us just can help asterisk be better by trying to use the latest version at least on testing environments, to not having to maintain an internal version and cherrypicking patches that may or may not resolve the issues that we could experience. Just my 2 cents... -- Ing. Miguel Molina Grupo de Tecnología Millenium Phone Center PBX: (+57 1)6500800 ext. 1201 Fax: (+57 1)6500816 Móvil: (+57)3138873587 ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Script to softly restart Asterisk each midnight to clean locked channels
On Thu, Mar 19, 2009 at 06:37:26PM +0200, Mindaugas Kezys wrote: Any guidelines how to solve locked channels problems? E.g. to find out which part of the code has problems and causes locks. Build Asterisk with locking debugging? (sure, this hurts performance, but one day with decreased performance will yeald a good bug report) -- Tzafrir Cohen icq#16849755 jabber:tzafrir.co...@xorcom.com +972-50-7952406 mailto:tzafrir.co...@xorcom.com http://www.xorcom.com iax:gu...@local.xorcom.com/tzafrir ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Script to softly restart Asterisk each midnight to clean locked channels
Locked channel does not react to 'soft hangup' command. That's why it is called - LOCKED. Regards, Mindaugas Kezys http://www.kolmisoft.com VoIP Billing and Routing Solutions -Original Message- From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of J. Oquendo Sent: 2009 m. kovo 19 d. 18:33 To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Script to softly restart Asterisk each midnight to clean locked channels On Thu, 19 Mar 2009, Miguel Molina wrote: Mindaugas Kezys escribi?: As Asterisk has inner problems and channels very often locks we have such script to restart Asterisk each midnight. snip Why restart Asterisk, free up the channel... From cron, you can clear up any calls over say 3 hours: /usr/sbin/asterisk -rx show channels concise|awk -F : '($11 10800) {print /usr/sbin/asterisk -rx \soft hangup $1 \}'|sh You don't necessarily have to keep restarting it at midnight. =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ J. Oquendo SGFA, SGFE, C|EH, CNDA, CHFI, OSCP Enough research will tend to support your conclusions. - Arthur Bloch A conclusion is the place where you got tired of thinking - Arthur Bloch 227C 5D35 7DCB 0893 95AA 4771 1DCE 1FD1 5CCD 6B5E http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x5CCD6B5E ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] Script for seeding polycom phones with an extension directory
Hello List, Not sure if this will be helpful but I made changes to the original Cisco directory.php.txt script and applied them for use on the Polycom phones. This will create an extension directory and alphabetize it based on the sip registrations you have setup in sip.conf. Note that this only seeds the phones and does not synchronize them. Anyway thought it might save people some time. To run do: php scriptname /home/polycom/-directory.xml. ? header(Content-type: text/xml); header(Connection: close); header(Expires: -1); // location of asterisk config files $location = /etc/asterisk/; // parse sip.conf $sip_array = parse_ini_file($location.sip.conf, true); while ($v = current($sip_array)) { if (isset($v['name'])) { $directory[] = fn. $v['name']./fn\n. ct.key($sip_array)./ct\n; } next($sip_array); } sort($directory); echo directory\n; echo item_list\n; foreach ($directory as $v) { echo item\n; echo $v; echo /item\n; } echo /item_list\n; echo /directory\n; ? Roy Anciso Director of Technology Manistee Intermediate School District 1710 Merkey Road Manistee, MI 49660 Ph: 231-723-4264 Fx: 231-723-1690 [EMAIL PROTECTED] ___ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] Script on hold
Hi, I want to run a script when users puts other party on hold. Script may be anything. Perl, Agi ... Is there anyway to do this ? Idris ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[Asterisk-Users] Script AGI on C
Hi Folks: I used that one example for AGI script on C web, only to fill the working with the Asterisk. I compiled and it worked great. I executed accidentally the ls -l command in directory where was the source and executable, I noted and was surprised that because the executable size was to further 20 times more than source. I executed the gcc -Os source.c -o executable.agi command several times, with otimization flags different. Maximum i can affort to reduce the executable size was 17 times. The source size full comment is 448 Bytes; The size executable was about 7615 Bytes. (the maximum i got to reduce) I was hope the executable size was in the order of magnitude of the proper source size, since the comments are long. Do one get to explain because of this? Is this overhead consequence of linking with the operational system? The script use only four functions of stdio.h library. It was seem that the compiler include all stdio.h functions and compile all them. I would like somebody of list to clear my doubt. Regards, Cleviton. Here below small script used I grasp on site: http://home.cogeco.ca/~camstuff/agi.html /* C works just fine with Asterisk but you should use 'setlinebuf' on stdout and stderr. This causes buffering one line at a time (rather than using a larger buffer). If you *don't* do this on stdout then your script will hang up while Asterisk waits for a command but the (long) buffer isn't full yet. A minimal AGI script in C looks like this: */ // #include stdio.h main() { charline[80]; /* use line buffering */ setlinebuf(stdout); setlinebuf(stderr); /* read and ignore AGI environment */ while (1) { fgets(line,80,stdin); if (strlen(line) = 1) break; } /* Send asterisk a command */ printf(SAY NUMBER 123 \\\n); /* Read response from Asterisk and show on console */ fgets(line,80,stdin); fputs(line,stderr); } ___ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Script AGI on C
Oi... eu respondi sua mensagem na lista asteriskbrasil, mas com a moderação dela, só deve chegar amanhã, hehehe tenta um strip no arquivo. # strip executable.agi isso deve reduzir mais um pouco o tamanho do seu arquivo... Diego Aguirre Infodag - Informática FWD#: 459696 Nikotel#: 99 21 8138-2710 EnumLookup#: +55 21 8138-2710 DUNDi-br#: 21 8138-2710 [EMAIL PROTECTED] escreveu: Hi Folks: I used that one example for AGI script on C web, only to fill the working with the Asterisk. I compiled and it worked great. I executed accidentally the ls -l command in directory where was the source and executable, I noted and was surprised that because the executable size was to further 20 times more than source. I executed the gcc -Os source.c -o executable.agi command several times, with otimization flags different. Maximum i can affort to reduce the executable size was 17 times. The source size full comment is 448 Bytes; The size executable was about 7615 Bytes. (the maximum i got to reduce) I was hope the executable size was in the order of magnitude of the proper source size, since the comments are long. Do one get to explain because of this? Is this overhead consequence of linking with the operational system? The script use only four functions of stdio.h library. It was seem that the compiler include all stdio.h functions and compile all them. I would like somebody of list to clear my doubt. Regards, Cleviton. Here below small script used I grasp on site: http://home.cogeco.ca/~camstuff/agi.html /* C works just fine with Asterisk but you should use 'setlinebuf' on stdout and stderr. This causes buffering one line at a time (rather than using a larger buffer). If you *don't* do this on stdout then your script will hang up while Asterisk waits for a command but the (long) buffer isn't full yet. A minimal AGI script in C looks like this: */ // #include stdio.h main() { charline[80]; /* use line buffering */ setlinebuf(stdout); setlinebuf(stderr); /* read and ignore AGI environment */ while (1) { fgets(line,80,stdin); if (strlen(line) = 1) break; } /* Send asterisk a command */ printf(SAY NUMBER 123 \\\n); /* Read response from Asterisk and show on console */ fgets(line,80,stdin); fputs(line,stderr); } ___ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[Asterisk-Users] Script to Restart Zaptel
We are runnign into problems where our legacy PBX reaches a frame loss threshold and takes it's T1 card offline (the T1 card that interfaces with the Asterisk servers TE110P). During this time, the Asterisk server senses a Yellow alarm. We've noticed that if we quit asterisk, stop zaptel, start zaptel, start asterisk that the alarm condition clears on the legacy PBX.We'd like to be able to to check for the yellow alarm condition and perform the steps above when applicable. Has anyone done something like this? ___ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[Asterisk-Users] Script to detect corrupted faxes from SpanDSP
#!/bin/bash # #Name: emailfax # Author: Colin Anderson [EMAIL PROTECTED] #Desc: Script to email faxes from SpanDSP and detect if fax is corrupt or incompatible with SpanDSP # These three variables must be passed to the script for it to work FAXFILE=$1 EMAILADDRESS=$2 CALLERID=$3 # First we convert the fax to a PDF wheter it's good, bad or whatever /bin/nice -n 19 tiff2ps -2eaz -w 8.5 -h 11 $FAXFILE | ps2pdf - $FAXFILE.pdf # Then we stat the filesize of the generated PDF. A corrupt PDF usually comes through as 422 bytes PDFSIZE=`stat -c%s $FAXFILE.pdf 2 /dev/null` # If-then to email the fax if it's OK, or email the recipient to let them know that the fax was bad, # and we will add it to our exception list (manually) so it will go to a real fax machine in the future # If the filesize of the PDF is greater than 422 bytes send it otherwise uh-oh. if [ $PDFSIZE -gt 422 ]; then mime-construct --to $EMAILADDRESS --subject Fax from $CALLERID --attachment $CALLERID.pdf --type application/pdf --file $FAXFILE.pdf rm $FAXFILE rm $FAXFILE.pdf else # I use mime-consruct because I'm lazy but a piped mail command should work just as well. mime-construct --to $EMAILADDRESS --subject Fax from $CALLERID failed to receive properly - this fax number will be added to the exception list mime-construct --to [EMAIL PROTECTED] --subject Fax from $CALLERID failed - fix dat shit rm $FAXFILE rm $FAXFILE.pdf fi ___ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[Asterisk-Users] Script to update externip for [EMAIL PROTECTED]/AMP [was Re: SIP Extension behind NAT, Asterisk on NAT (DMZ)]
On Nov 26, 2005, at 3:06 PM, Manny A. Wise wrote: [snip] The problem is not updating the FQDN name in dyndns.org..that part is working great...the problem now is..how to get the IP change into the sip_nat.conf... but I am sure has to be a way... :) How about this? You have to add back in the first shebang line that defines /bin/sh as the program to use to run the script. BEGIN SCRIPT- # Script to update Asterisk's externip= setting with the current # IP address. Writes changes to sip_nat.conf for [EMAIL PROTECTED]/AMP # This script is only useful if you have a dynamic IP Address and # are using NAT. # define where to write temporary files Tmp=/tmp/externipupdate$$.txt # define the hostname to lookup host=myhost.mydomain.dom # Use dig to get our current IP address (assuming that it has been # properly updated via DynDNS client or otherwise. Set the variable # ip_address to the value of the IP address. ip_address=`dig $host +short` # Write the new settings to a temporary file and then overwrite the # exisiting /etc/asterisk/sip_nat.conf file with the temporary file # using the mv command. echo nat=yes $Tmp echo externip=$ip_address $Tmp # Change the following line to reflect your local network. Add multiple # localnet= lines if you have more than one local network. echo localnet=10.0.0.0/255.255.255.0 $Tmp mv $Tmp /etc/asterisk/sip_nat.conf # Tell Asterisk to reload SIP to make the changes take effect /usr/sbin/asterisk -rx sip reload --END SCRIPT That ought to do the trick. I tested it with my [EMAIL PROTECTED] config. I will leave the task of finding a way to automatically run this program when needed as an exercise to the reader. (cron would work if it changes at regular time intervals, I suppose) Keep in mind that there will be a delay between when the address changes to when it is updated in DynDNS and then another delay as the change propagates throughout the DNS system. Lastly, depending on how you call the script, there will be a delay between when it propagates through DNS and when this script is run. Maybe there is a way to use the DynDNS client to get the new IP address and write it to sip_nat.conf at the same time it updates the DynDNS service? Are there DynDNS clients that allow you to run an external program every time the IP changes? Kind of like Comedian mail's externnotify parameter? Tom Tom Rymes Cascade Link Systems www.cascadelinksystems.com (603) 375-1414 Intelligent technology solutions for small businesses. ___ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Script for load testing
Anton Krall wrote: Guys. Do any have some already made scripts for load testing or creating lots of calls for load testing an asterisk install? Wanted to check with you first, since probably somebody has done this before. Use simpleclient command line client from the iax cvs repository. -- Cheers, Matt Riddell ___ http://www.sineapps.com/news.php (Daily Asterisk News - html) http://freevoip.gedameurope.com (Free Asterisk Voip Community) http://www.sineapps.com/rssfeed.php (Daily Asterisk News - rss) ___ --Bandwidth and Colocation sponsored by Easynews.com -- Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[Asterisk-Users] Script for load testing
Guys. Do any have some already made scripts for load testing or creating lots of calls for load testing an asterisk install? Wanted to check with you first, since probably somebody has done this before. ___ --Bandwidth and Colocation sponsored by Easynews.com -- Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[Asterisk-Users] Script to test channel bank
I have an Adtran 600 (12 x FXS, 12 x FXO) connected via Sangoma A101 to an Asterisk server which is in the lab for testing. The channel bank is disconnecting every few hours without apparent reason and no-one can tell why, not even Sangoma who have worked very hard to determine the cause of the problem. Any experience with this? I would like to load test the channel bank by hacing a script that places calls to all the ports in rotation, simulating the load of a busy office. Is there anything like that? Chris Mason NetConcepts Int: (305) 704-7249 Fax: (815)301-9759 ___ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[Asterisk-Users] Script routing Logic Question in .conf files
The question is in the logical route that asterisk takes when reading and executing the scripts. Please see the (?) questions beside the lines. The goal is not to comment the lines exten = snip in the [ext-local] everytime that I make a change using the AMP GUI. Also it would be nice to be able to give priority to the *_custom.conf if possible. Extensions_additional.conf [aa_1] include = aa_1-custom exten = 1,1,Goto(ext-local,7726258,1) ; exten = 2,1,Goto(ext-local,7726259,1) ; this take the call to the [ext-local] exten = 3,1,Goto(ext-local,7726257,1) ; exten = fax,1,Goto(ext-fax,in_fax,1) ; [ext-local] include = ext-local-custom ; ? should this not be held in priority first over any of the contents in [ext-local] ? exten = 7726257,1,Macro(exten-vm,[EMAIL PROTECTED],7726257) exten = 7726258,1,Macro(exten-vm,[EMAIL PROTECTED],7726258) ? I am able to monitor the call if I comment the line out ? as it then seems to go to the [ext-local-custom] located in the extentions_custom.conf ? ;exten = 7726259,1,Macro(exten-vm,[EMAIL PROTECTED],7726259) ;exten = 7726259,1,SetVar(CALLFILENAME=${CALLERIDNUM}) ;exten = 7726259,2,SetVar(CALLTIME=${DATETIME}) ;exten = 7726259,3,SetVar(CALLPATH=/var/www/html/monitor/7726259) ;exten = 7726259,4,Monitor(wav,${CALLPATH}/${CALLTIME}-${CALLFILENAME},m) ;exten = 7726259,5,DIAL(SIP/7726259,15,t) ;exten = 7726259,6,Macro(exten-vm,[EMAIL PROTECTED],7726259) exten = 9873022,1,Macro(exten-vm,[EMAIL PROTECTED],9873022) extentions_custom.conf [ext-local-custom] ;test to see if this stays exten = 7726259,1,SetVar(CALLFILENAME=${CALLERIDNUM}) exten = 7726259,2,SetVar(CALLTIME=${DATETIME}) exten = 7726259,3,SetVar(CALLPATH=/var/www/html/monitor/7726259) exten = 7726259,4,Monitor(wav,${CALLPATH}/${CALLTIME}-${CALLFILENAME},m) exten = 7726259,5,DIAL(SIP/7726259,15,t) exten = 7726259,6,Macro(exten-vm,[EMAIL PROTECTED],7726259) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Tuesday, April 12, 2005 7:40 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [Asterisk-Users] overwriting config file problem extensions_additional.conf and extensions.conf are for AMP only and should not be changed. extensions_custom.conf is for user mods. There are some default modes in there already. It is posible to do almost anything from extensions_custom.conf because as you noticed all of the AMP contexts have an include like include = ext-local-custom to link them to extensions_custom.conf --- Robert Webb [EMAIL PROTECTED] wrote: On Tue, 12 Apr 2005 14:05:06 -0500 mr. barker [EMAIL PROTECTED] wrote: I am using [EMAIL PROTECTED] When I manually add anything to the extensions_additional.conf file it gets rewritten when I add an extension using the web interface I am trying to include the monitor function .. I got that working however it gets deleted when I add something using the web interface I see that it can include = ext-local-custom is this the file that should be used to add custom scripting ? If so where would it be located? It would be located in the /etc/asterisk directory. It is not created by default, that I can see, so you will need to create one and add your cusom config in it. Or else just modify the extensions.conf file and add it there then do an include of your custom section. ___ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users __ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ ___ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Script Perl Autodialer
Hi, The problem is that when opening the zap channel, originate thinks that the call has been answered and send the call to the beginning of the context out. And what I really want is to make this but when the destiny person answered and not when the zap channel opens. as already in the docs, on analog zap interfaces you simply cannot do that, since on analog there's no way (apart dsp) to guess when the called party has answered So what can I do to solve it ou? go digital (isdn bri/pri, voip, whatever) Matteo -- ___ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
RE:[Asterisk-Users] Script to Authenticate User and Dial Out
That seems great, except for some reason, its not working. I'm able to dial any extension on the system, not the ones I'm trying to define in a context. Here's what I have that accepts the incoming calls: [did] exten = 9995,1,Answer exten = 9995,n,Background(welcome) exten = 9995,n,WaitExten include = didcalling The context didcalling has the contexts you suggested. However, since I can make any call on the system (in the default context), its pointless. What am I doing wrong? Thanks, Josh ___ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[Asterisk-Users] Script to Authenticate User and Dial Out
Hello. I'm looking for a script that I can use that will ask users for a password, and then let them call any extension on the asterisk server. Does anyone know of a premade script that can do this, or a resource I could use to make my own? Thanks, Josh ___ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
RE: [Asterisk-Users] Script to Authenticate User and Dial Out
DISA? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Josh Alberts Sent: Lunes, 21 de Marzo de 2005 01:55 p.m. To: asterisk-users@lists.digium.com Subject: [Asterisk-Users] Script to Authenticate User and Dial Out Hello. I'm looking for a script that I can use that will ask users for a password, and then let them call any extension on the asterisk server. Does anyone know of a premade script that can do this, or a resource I could use to make my own? Thanks, Josh ___ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Script to Authenticate User and Dial Out
I've used the exact method MF describes here in production, works great, and should even work if you move to an ARA environment. -mike MF Hulber wrote: It seems the simplest approach is to create an extension(s) with the password(s) and then if the incoming caller gets it correct, jump them to another context. Otherwise stay in the default context and give default prompts. I suppose you can find a way to read the password from a DB or file or as you say, put it in a script. [maincontext] exten = ,1,Goto(youwin,s,1) exten = ,1,Goto(youwin,s,1) exten = s,1,Backgroun(vm-password) exten = i,1,Goto(maincontext,s,1) [youwin] exten = s,1,Background(extension) exten = 1,1,... exten = 2,1,... exten = 3,1,... Josh Alberts wrote: Hello. I'm looking for a script that I can use that will ask users for a password, and then let them call any extension on the asterisk server. Does anyone know of a premade script that can do this, or a resource I could use to make my own? Thanks, Josh ___ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users ___ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] SCRIPT: Fax Remvoal Please Call: 1-800...
--On Thursday, December 09, 2004 19:19 -0700 Joseph [EMAIL PROTECTED] wrote: On Thu, 2004-12-09 at 18:11 -0800, Lee Howard wrote: On 2004.12.09 17:56 Joseph wrote: At time to time I receive some junk faxes from some advertising companies that play smart and don't provide any TSI number so I can not bock them by the number in Hylafax. Do they not provide Caller*ID either? No they don't provide any caller ID, if they did they would be on my junk_fax_list long time ago. I think it is illegal to send faxes with-out any identifier like caller ID. Though I don't know who to complain to about it. It's illegal to send junk faxes though, PERIOD. If you didn't request the fax in the first place they can, and will face steep fines/penalties at the hands of the FCC, if you report them. So report them, include any information you can, and cooperate with the FCC if they want to continue gathering more evidence. Same thing with telemarketers. The FCC is actually pretty good about finding and hurting these sleezebags, contrary to popular government images, they do get stuff done. SPAM is another matter, but junk faxes and telemarketers have well established procedures for being dealt with. Despite calling their Fax Removal Service 1-800-... number several time they refuse to obey my request. Not that I particularly want to advocate litigiousness, but filing a complaint with FCC will get their attention very quickly, believe me. http://www.fcc.gov/cgb/consumerfacts/unwantedfaxes.html Thank you for the link, will save it for future reference and use it for sure. ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[Asterisk-Users] SCRIPT: Fax Remvoal Please Call: 1-800...
At time to time I receive some junk faxes from some advertising companies that play smart and don't provide any TSI number so I can not bock them by the number in Hylafax. Despite calling their Fax Removal Service 1-800-... number several time they refuse to obey my request. So I would like to setup a small script or context loop in extension.conf if possible and maybe run it overnight; maybe I get their attention if nothing else works! Does anybody have any idea how to do it? In extension.conf it would be something like: exten = 666,1,Dial(1800number) ; How to go next priority after 10sec.? exten = 666,2,Wait 10 ;wait for voice message to finish, and wait for tone exten = 666,3,Dial(my-fax-number) ;after about 10sec. exten = 666,4,Dial(1) ;to confirm selection exten = 666,5,Hangup exten = 666,6,Goto(s,1) Any improvements are welcome. -- #Joseph ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] SCRIPT: Fax Remvoal Please Call: 1-800...
exten = 666,1,Dial(1800number,180,D(1yourfaxnumber1) exten = 666,2,Hangup i don't know if you can add another priority after hangup. Regards, Marc P.S.: try 'show application dial' for details Joseph wrote: At time to time I receive some junk faxes from some advertising companies that play smart and don't provide any TSI number so I can not bock them by the number in Hylafax. Despite calling their Fax Removal Service 1-800-... number several time they refuse to obey my request. So I would like to setup a small script or context loop in extension.conf if possible and maybe run it overnight; maybe I get their attention if nothing else works! Does anybody have any idea how to do it? In extension.conf it would be something like: exten = 666,1,Dial(1800number) ; How to go next priority after 10sec.? exten = 666,2,Wait 10 ;wait for voice message to finish, and wait for tone exten = 666,3,Dial(my-fax-number) ;after about 10sec. exten = 666,4,Dial(1) ;to confirm selection exten = 666,5,Hangup exten = 666,6,Goto(s,1) Any improvements are welcome. -- CTOMarc Storck MS Networks SA [EMAIL PROTECTED] Internet Service Provider http://www.luxadmin.org 15, route d'Esch Phone: +352 2727 3030 L-4544 Belvaux Fax: +352 2727 3060 -- LuxAdmin powered service --- http://www.Gateway.lu Your gateway to the net Advantages of ADSL solutions by LuxAdmin: - price: cheap and clear - products: proven quality - support: friendly and helpful --- ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] SCRIPT: Fax Remvoal Please Call: 1-800...
On 2004.12.09 17:56 Joseph wrote: At time to time I receive some junk faxes from some advertising companies that play smart and don't provide any TSI number so I can not bock them by the number in Hylafax. Do they not provide Caller*ID either? Despite calling their Fax Removal Service 1-800-... number several time they refuse to obey my request. Not that I particularly want to advocate litigiousness, but filing a complaint with FCC will get their attention very quickly, believe me. http://www.fcc.gov/cgb/consumerfacts/unwantedfaxes.html Lee. ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] SCRIPT: Fax Remvoal Please Call: 1-800...
On Thu, 2004-12-09 at 18:11 -0800, Lee Howard wrote: On 2004.12.09 17:56 Joseph wrote: At time to time I receive some junk faxes from some advertising companies that play smart and don't provide any TSI number so I can not bock them by the number in Hylafax. Do they not provide Caller*ID either? No they don't provide any caller ID, if they did they would be on my junk_fax_list long time ago. I think it is illegal to send faxes with-out any identifier like caller ID. Though I don't know who to complain to about it. Despite calling their Fax Removal Service 1-800-... number several time they refuse to obey my request. Not that I particularly want to advocate litigiousness, but filing a complaint with FCC will get their attention very quickly, believe me. http://www.fcc.gov/cgb/consumerfacts/unwantedfaxes.html Thank you for the link, will save it for future reference and use it for sure. -- #Joseph ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] SCRIPT: Fax Remvoal Please Call: 1-800...
On 2004.12.09 18:19 Joseph wrote: I think it is illegal to send faxes with-out any identifier like caller ID. I think the historic US regulations (FCC code) have required all fax sending devices to include an identification line (header or tagline) within the first inch or so at the top of the page. To my knowledge this regulation does not require a TSI signal or a Caller*ID signal to be transmitted. ITU T.30 stipulates that CSI/TSI only include numbers and the characters + . -, but most devices don't limit them to that, and so many fax senders will include company names and other vague information in the TSI string like Via Fax. The FCC code, however, does not permit a fax sender to send unsolicited faxes and requires a sender to terminate sending them immediately upon request, punishable by a minimum $500 per instance. New FCC code that may not be in-effect yet, requires the sender to have an in-writing agreement with the receiver before transmitting any unsolicited faxes. Not like that will make any difference, though. Lee. ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[Asterisk-Users] Script to import Master.csv in the MySQL database - a short HowTo
Hi, I hope this can help others, so this is it. Use it at your own risk. I have test it on 3 separate systems without any problem. Take care to edit the following files taking into consideration your own settings. If you have all the CDR info in the Master.csv too, then delete all the data from the 'cdr' table in MySQL before running the script bellow in oder to prevent dupplicate records. In my example, I have the following config: CDR database:asteriskcdrdb CDR table:cdr CVS file: /var/log/asterisk/cdr-csv/Master.csv 1. Create a file named 'impcdr2sql' with the following content: #!/bin/bash # make a copy of the original Master.csv file to Master.csv.mod cp -vf /var/log/asterisk/cdr-csv/Master.csv /var/log/asterisk/cdr-csv/Master.csv.mod # format the file to comply with the MySQL data (delete '' chars when need it) # use a VIM script (nofielddelims.vim) for this purpose ex /var/log/asterisk/cdr-csv/Master.csv.mod -c :source nofielddelims.vim -c :exit # run the MySQL commands from the cmd.sql file mysql cmd.sql 2. Enter the command to make the script executable: chmod 755 impcdr2sql 3. Create a file named 'nofielddelims.vim' with the following content: Delete '' chars at the beginning of the line :%s/^// Delete '' chars at the end of the line :%s/$// Delete '' chars near the ',' char :%s/,/,/g :%s/,/,/g Replace '' by '' :%s///g 4. Create a file named 'cmd.sql' with the following content: use asteriskcdrdb; ALTER TABLE `cdr` ADD `tmp1` VARCHAR(30) DEFAULT x NOT NULL; ALTER TABLE `cdr` ADD `tmp2` VARCHAR(30) DEFAULT y NOT NULL; LOAD DATA INFILE '/var/log/asterisk/cdr-csv/Master.csv.mod' replace INTO TABLE cdr FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' (accountcode,src,dst,dcontext,clid,channel,dstchannel,lastapp,lastdata,calld ate,tmp1,tmp2,duration,billsec,disposition,amaflags,uniq ueid,userfield); ALTER TABLE `cdr` DROP `tmp1`; ALTER TABLE `cdr` DROP `tmp2`; 5. Keep all the files in the same directory. All you need to do is to run the script: ./impcdr2sql as root or as an user with full rights on the asteriskcdrdb database and cdr table E... voila! All your old data from Master.csv is now in the MySQL database in the correct format (I hope). Please feel free to make any improovments you want. I'm not a Linux expert. Best regards to you all, Dan ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[Asterisk-Users] Script to export Master.csv to asteriskcdrdb
Does somebody have a script to export Master.csv data to a new asteriskcdrdb mysql database? Please help ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[Asterisk-Users] script in perl or PGSQL to predictive dialing - progesive dialing.
I find the example to predictive dialing or progresive dialing. I wish to do webpage used by extensions or operators.. where them says click ...and the asterisk dial to a customer and the extension same time. (If the call is answered). Thanks. ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users