‘‘‘Asterisk Triangle IDescribeReads an integer n,n is an odd number, outputting a equilateral triangle consisting of an asterisk character, which requires:Line 1th 1 asterisks, line 2nd 3 asterisks, line 3rd 5 asterisks, and so on, and the last line is a total of n asterisks.InputExample 1:3OutputExample 2:***‘‘‘## n = eval (input ())n = Int (input ())For I in Range (round ((n+1)/2)): A = "*" * (i+1)-1)
==============================================
View hardware configuration # Dahdi_hardware==============================================View Dahdi Service ConfigurationMore/etc/dahdi/system.confShow the following content, obviously less my PSTN card configuration# Global DataLoadzone = usDefaultzone = usRebuilding the Dahdi service configuration#dahdi_genconfView Dahdi Service Configuration again# more/etc/dahdi/system.confShow# autogenerated by/usr/sbin/dahdi_genconf on Wed Aug 15 22:09:20 201
PHP uses the regular expression to replace the display function with an asterisk (*) for the four digits in the middle of the phone number.
Because the customer needs to maintain privacy, the mobile phone number cannot be completely displayed on the website, but it cannot be displayed, so many websites think of display but not complete display, in fact, it is very easy to use the asterisk to replace the d
When I was a beginner in php, I knew to use the replacement function to replace the specified number. But we need to simply replace the specified position. Below I will introduce several examples to show the asterisk. When I was a beginner in php, I knew to use the replacement function to replace the specified number. But we need to simply replace the specified position. Below I will introduce several examples to show the
In the definition, a function adds a star number before a parameter to convert multiple parameters passed in into an object, tuples, or dictionary, it can be said that these parameter values are collected and the function is defined. by adding a star number before the parameter, the passed parameters are converted into an object, tuples, or dictionary, it can be said that these parameter values are collected.
Adding an asterisk before the parameter
This article mainly introduces the PHP implementation of mobile phone number middle four with an asterisk (*) hidden custom function sharing, which is a more commonly used features, the need for friends can refer to the followingPHP shielded phone number middle four bits:Method 1:function Hidtel ($phone) {$IsWhat = Preg_match ('/(0[0-9]{2,3}[\-]?[ 2-9][0-9]{6,7}[\-]? [0-9]?) /I ', $phone); Fixed telephoneif ($IsWhat = = 1) {return Preg_replace ('/(0[0
replaced Negative-the number of characters to be replaced starting at the end of the string 0-Insert rather than replace
1, when start and charlist are positive, very good understanding, also very symbolic of human logic, start is starting from 0, such as, according to the conditions, the green will be replaced by the element
2, when start is negative, charlist is positive, also very good understanding
3, when start is a positive number, charlist is negative, this I start to understa
Is the call flowchart of Asterisk:
We use the call process of SIP as an example to describe the call process of other channels.
The call process (incoming) is as follows:
Do_monitor-> sipsock_read-> handle_request-> handle_request_invite-> sip_new/ast_pbx_start-> pbx_thread->__ ast_pbx_run
-> Ast_spawn_extension-> pbx_extension_helper-> pbx_exec-> execute dialplan
When the chan_sip module is loaded, an independent listening thread do_monitor is starte
Iptables fo Asterisk
Sip on UDP port 5060. Other sip servers may need TCP port 5060 as well
Iptables-A input-p udp-m udp-dport 5004: 5082-J accept
Iax2-The IAX protocol
Iptables-A input-p udp-m udp-dport 4569-J accept
IAX-most have switched to IAX V2, or ought
Iptables-A input-p udp-m udp-dport 5036-J accept
RTP-the media stream
Iptables-A input-p udp-m udp-dport restart :20000-J accept
MGCP-if you use media gateway control protocol in you
IptablesAndAsterisk:
Iptables fo asterisk
SIP on UDP port 5060. Other SIP servers may need TCP port 5060 as well
Iptables-a input-p udp-m udp-dport 5004: 5082-j ACCEPT
IAX2-the IAX protocol
Iptables-a input-p udp-m udp-dport 4569-j ACCEPT
IAX-most have switched to IAX v2, or ought
Iptables-a input-p udp-m udp-dport 5036-j ACCEPT
RTP-the media stream
Iptables-a input-p udp-m udp-dport restart :20000-j ACCEPT
MGCP-if you use media gateway cont
Several key points to improve asterisk server concurrency.
System hardware Optimizations
Operating system tuning
Network stack tuning,: tuning kernal TCP/IP stack.
Io subsystem file system optimization: Use ramfs,
Asterisk settings:Turn Off log files,Tune MySQL to its best,UseFastagi, use epoll,
Network hardware settings: IRQ
Http://wiki.kolmisoft.com/index.php/Asterisk_Background_perfo
Here I will attempt to describe how to make N-way CILS from 2-way CILS.
First, you need trunk version of Asterisk.
All work done by two applications: meetme and channelredirect. You need zaptel driver to have meetme working.
Question:For Asterisk 1.4 do wee need to replace 'channelredirect' as used below with 'managerredirect' as in bug/patch 6508?
Here is dialplan example: [Default]Exten => _ XXX, 1, set
Sneak in, see the snow forum above saw someone released a "Win7 Asterisk password Detection Tool", found that "there is a little" small use.The reason is not very useful: This program's ability is quite limited, can only see a portion of the software is not high-security password box inside the program,If you want to take it to see the QQ password, for granted, it is impossible.The program uses a very old technique to get the contents of another proce
numbers-the number of replaced characters starting at the end of the string 0-Insert rather than replace
1, when start and charlist are positive, very good understanding, but also very symbolic of human logic, start is starting from 0, the following figure, according to the conditions, green will be replaced by the elements
2, when the start is negative, charlist is positive, it is also very good to understand
3, when start is a positive number, charlist is negative, this I sta
Preface
Ask what is the use of this system. Previously said to do a SIP system server to test IP recorder applications. Before using the Raspberry Pi has been able to run smoothly. Next use Beaglebone-black to realize this function. Prepare a beaglebone-black board; a 4G MICRO-SD card; cable network or USB card installation system Download Beaglebone-asterisk image file
Since I am using the old version of BBB, I try to download the lower version of t
1 Public classshanjiaoxing2 {3 Public Static voidMain (string[] args)4 {5 for(inti=0;i )6 {7 for(intJ=0;j//the output spaces are decremented with the loop8 {9System.out.print ("");Ten } One for(intk=0;k//The output * number is incremented with the outer loop, and when k A { -System.out.print ("*"); - } the System.out.println (); - } - } -}Operation Result:Output Half triangle:1 Publi
This article mainly introduces the PHP mobile phone number middle four with asterisks * instead of display examples, with a certain reference value, interested in small partners can refer to
In the display user list of the scene, the general use of mobile phone number of the display need to handle the mobile phone number, the general is the middle of the four-bit into the asterisk * * * * * * * * * * *, I am using PHP to deal with the idea is to repl
use in the future.
2. Self-made asterisk replacement function
The Code is as follows:
ReplaceStar ($ str, $ start, $ length = 0)
The preceding two parameters are the same as those above, and the final parameters are different from those above.
1. When start and length are both positive numbers, the performance is the same as that of substr_replace.
2. When start is negative and length is positive, it performs the same as substr_replace.
Iii. so
Background
System Structure
Extension 1026 and extension 1027 are used in the existing telephone system, and an asterisk is implemented under extension 1026 and extension 1027. A: In the 1027 system, ext. B: 1011 in the 1026 system, ext. 1012 is now called B through a. Because the language menu is implemented in the 1026 system, first, you can use the 91026 incoming call 1026 system (with an external dialing 9), and then enter 1012 according to
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.