The SIP protocol and some of its applications are worth learning. In this regard, we will explain the configuration of rtp sip today. SIP (Session Initiation Protocol) is usually used for VOIP calls, call establishment, call negotiation, and call termination. it helps two terminals to recognize each other, but it does not process media. When A call is established, it directly transmits media through real-time transmission protocol (RTP) between telephone A and telephone B.
SIP and RTP
SIP is a signaling protocol at the application layer. it uses port 5060 (usually) for communication. SIP can be transmitted through UDP and TCP transport layer protocols. asterisk does not currently have TCP for transmitting SIP information.
RTP is used to transmit media (VOICE) between endpoints, and RTP in Asterisk uses a large number of unprivileged ports (10,000 to 20,000 by default)
Advantages of SIP: common accepted and flexible structure. Other VOIP protocols include H.323, IAX, and MGCP.
Rtp sip Configuration
In the/etc/asterisk/sip. conf file:
- [General]
- Context = default
- Srvlookup = yet; Establish a logic and DNS address method. You can achieve this address and obtain Many DNS benefits.
- [10000]
- Username = 10000; User Name
- Type = friend; user \ peer \ friend can be defined)
- Secret = 123456; Authentication Password
- Record_out = Always
- Record_in = Never; call recording
- Callgroup; call group. The default value is "1"
- Pickupgroup; Generation Group
- Disallow; encoding not allowed
- Allow; encoding allowed
- Port = 5060; port number
- Qualify = yes; monitor the latency between the Asterisk server and the phone (2,000 by default; yes can be replaced by milliseconds)
- Context = default; command location
- Host = dynamic; requires the number to be registered so that Asterisk can find the phone number. (static requires no registration)
- Dtmfmode = rfc2833;
- Mailbox= 10000 @ device
- Callerid = test1 <10000>
- Canreinvite = no;
User types are used to authenticate incoming calls; end types are used to call outgoing calls; and friend types are both used. (This is commonly used in sip. conf and iax. in conf), here we will present all the rtp sip configuration processes to everyone, and hope to help everyone.