Re: [Asterisk-Users] iptables rules that work?
Brian, Try these: ... -A INPUT -s x.x.x.x -p udp -m udp --dport 5060 -j ACCEPT -A INPUT -s x.x.x.x -p udp -m udp --dport 1:2 -j ACCEPT -A INPUT -s x.x.x.x -p tcp -m tcp --dport 22 --syn -j ACCEPT ... Sunny --- Brian West [EMAIL PROTECTED] wrote: I'm trying to get some iptables rules that work with asterisk but for some reason I keep blocking everything and or locking myself out of the box.. mybad does anyone have any configs they would like to share that allow asterisk and ssh from x ip? TIA bkw ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users = Sunny Woo email: [EMAIL PROTECTED] ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [Asterisk-Users] Asterisk and VMWare
Your machine is way underpower and underRAM, I am amazed you can even run VMWARE and a Linux guest on it. Have you try: 1. run VMWARE in Full screen windows. 2. is your Linux kernel SMP? (see VM knowledge base) 3. what about your Linux guest CPU usage? Swap usage? Windows might report 5% but its what the linux guest sees that counts. VMWARE is a very good emulation but it is still an emulation. Doing near real time codec conversion on a AMD 1GH machine with 386MB might be too much. 4. Did you do bridge networking on the guest OS? NAT will invoke additional performance penalty, and have a big effect on your SIP call. 5. What about the other cards in your system? Do they need a lot of interrupts from the PC? Check your perfmon for interrupts per second. CPU usage is only one piece of the pie. On Sun, 2003-07-13 at 23:22, Dan wrote: This is a solutioin for my question? I don't want another box in my house running 24/7... Why to buy another disk as the system MUST run Win XP for some other important reasons?? Dan . - Original Message - From: Brancaleoni Matteo [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 14, 2003 12:05 AM Subject: Re: [Asterisk-Users] Asterisk and VMWare buy a 30$ hd, install linux on it and use it natively. Matteo. Il sab, 2003-07-12 alle 21:49, Dan ha scritto: Hi, I have installed Asterisk in a VM under VMWare Workstation 4.x (on WinXP). The computer is an Athlon @1GHz with 384MB RAM, 128MB allocated for RH9. Linux is fully installed (but without any X stuff). I have the latest Astrisk distribution (DL today) I have no Digium card installed on this machine. When I call Echotest, Asterisk play the message a l ittle bit choppy, but the echotest is perfect (no interruptions). The processor is used max 5% (peak) by the VMWare engine during the message playing. I have used a Cisco 7960 (G711) to call the Echotest. It seems that the GSM to G711 conversion inside VMWare virtual machine is the cause of this. It can be done something to improve this behaviour? Thanks, Dan ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users -- Matteo Brancaleoni Espia System Administrator - IT services Website : http://www.espia.it Email : [EMAIL PROTECTED] ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users -- Sunny Woo [EMAIL PROTECTED] ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users
[Asterisk-Users] AGI script sample using bash shell script
Hi, A quick and dirty (aka Rapid Application Developement) AGI script implement using bash shell. No need to invoke a 10MB perl engine to process simple asterisk agi scripts. I found it to be very useful in learning the AGI interface. For example, I learn that AGI won't execute the next command until you read the results from STDIN. Enjoy, Sunny Woo Solution Consultant Avantnix === agi-test-bash.agi == #!/bin/bash declare -a array while read -e ARG [ $ARG ] ; do array=(` echo $ARG | sed -e 's/://'`) export ${array[0]}=${array[1]} done # following variables are available from asterisk echo $agi_request 2 echo $agi_channel 2 echo $agi_language 2 echo $agi_type 2 echo $agi_uniqueid 2 echo $agi_callerid 2 echo $agi_dnid 2 echo $agi_rdnis 2 echo $agi_context 2 echo $agi_extension 2 echo $agi_priority 2 echo $agi_enhanced 2 checkresults() { while read line do case ${line:0:4} in 200 ) echo $line 2 return;; 510 ) echo $line 2 return;; 520 ) echo $line 2 return;; * ) echo $line 2;; #keep on reading those Invlid command #command syntax until 520 End ... esac done } echo 1. Testing 'sendfile' ... 2 echo STREAM FILE beep \\ checkresults echo 2. Testing 'sendtext' ... 2 echo SEND TEXT \hello world\ checkresults echo 3. Testing 'sendmage' ... 2 echo SEND IMAGE asterisk-image checkresults echo 4. Testing 'saynumber' ... 2 echo SAY NUMBER 192837465 \\ checkresults echo 5. Testing 'waitdtmf' ... 2 echo WAIT FOR DIGIT 1000 checkresults echo 6. Testing 'record' ... 2 echo RECORD FILE testagi gsm 1234 3000 checkresults echo 6a. Testing 'record' playback 2 echo STREAM FILE testagi \\ checkresults echo === Complete 2 === agi-test-bash.agi == -- Sunny Woo [EMAIL PROTECTED] #!/bin/bash declare -a array while read -e ARG [ $ARG ] ; do array=(` echo $ARG | sed -e 's/://'`) export ${array[0]}=${array[1]} done # following variables are available from asterisk echo $agi_request 2 echo $agi_channel 2 echo $agi_language 2 echo $agi_type 2 echo $agi_uniqueid 2 echo $agi_callerid 2 echo $agi_dnid 2 echo $agi_rdnis 2 echo $agi_context 2 echo $agi_extension 2 echo $agi_priority 2 echo $agi_enhanced 2 checkresults() { while read line do case ${line:0:4} in 200 ) echo $line 2 return;; 510 ) echo $line 2 return;; 520 ) echo $line 2 return;; * ) echo $line 2;; #keep on reading those Invlid command #command syntax until 520 End ... esac done } echo 1. Testing 'sendfile' ... 2 echo STREAM FILE beep \\ checkresults echo 2. Testing 'sendtext' ... 2 echo SEND TEXT \hello world\ checkresults echo 3. Testing 'sendmage' ... 2 echo SEND IMAGE asterisk-image checkresults echo 4. Testing 'saynumber' ... 2 echo SAY NUMBER 192837465 \\ checkresults echo 5. Testing 'waitdtmf' ... 2 echo WAIT FOR DIGIT 1000 checkresults echo 6. Testing 'record' ... 2 echo RECORD FILE testagi gsm 1234 3000 checkresults echo 6a. Testing 'record' playback 2 echo STREAM FILE testagi \\ checkresults echo === Complete 2
Re: [Asterisk-Users] AGI script sample using bash shell script
[EMAIL PROTECTED], During development of the bash script, I have problem reading the whole string from the STDIN and I notice the next command won't get executed. Notice the case statements that I have to implement to handle the read line. This is because normally Asterisk will return one line 200 However, if the command is not properly written, like SAY NUMBER instead of SAY NUMBER 123 \\ , then Asterisk will return multiline usage information back ... something like 520-blah blah blah\n blah blah blah blah\n ... 520 End of ...\n The next command will not get executed until you read the last line. Suggestions, play around with this: echo SAY NUMBER 123 \\ Asterisk says 123 read line Asterisk return 200 echo SAY NUMBER 123 read line Asterisk return usage info. but we only read one line echo SAY NUMBER 345 \\ this will not be executed read line Hope this helps, Sunny Woo Solutions Consultant Avantnix Hey does that mean that whole perl script won execute or the next AGI command wont execute. Cuz may be I get this problem too. ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users ___ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users