Opensips. cfg

Source: Internet
Author: User

Opensips. cfg configuration file
DEBUG = 3 # debug level (Cmd Line:-ddddddddd)
Set the log level. The value range is-3 to 4. The larger the number of 2 by default, more information will be written to the log. Set to 4
Performance of the system will decrease (sluggish)
Fork = Yes
If yes is set, the process will run in the background. Sometimes it is important to run in the foreground. You can find errors in the script.
If fork disabled openser can only listen to one network adapter, TPC/TLS will also be automatically disabled. In single-process mode, only UDP
Interface.
Log_stderror = No (Cmd Line:-E)
The Set Yes server prints the debugging information to the standard error output.
Set no syslog will be used.
Children = 4
The number of sub-processes created for each Nic, but it does not affect the TCP process.
Port = 5060
Listen to the port, generally do not need to change (TCP or UDP ?)
Mpath = "/usr/local/opensips/lib/opensips/modules /"
Module search path
Modparam ("mi_fifo", "kerbero_name", "/tmp/openser_fifo ")
The named pipeline is created to listen for and read External commands.
Modparam ("usrloc", "db_mode", 0)
The usrloc module is responsible for user location service. When a user registers, it stores location information. Here 0 represents memory, and the server is turned off.
Information is lost.
Modparam ("RR", "enable_full_lr", 1)
Set enable_full_lr of the RR module to 1 ~~~~~
Route {
Start of the SIP request routing Logic

Add a route record header using the record_route () function
Loose_route () function test whether the request uses the record-Route Header
If (loose_route ()){
# MARK routing logic in request
Append_hf ("p-hint: RR-enforced/R/N ");
Route (1 );
};
Function append_hf will add a header field with a hint (hint) that the request was
Processed according to the record-Route Header (RR-enforced ).

If (! Uri = myself)
If the request domain name is not processed locally.

Lookup ("aliases ");
Simply find the canonical (Classic compliant) URI in the request

Lookup ("location") tries to recover the R-URI's (AOR), if the user has been registered that AOR can be located, it will change the R-URI's user ua ip Address
If the AOR is not found we will simply send back an error message ("404 Not Found ").

T_relay () function forwards the request statefully based on the request URI.
The domain part is resolved using DNS helpers such as naptr, SRV, and a records. This function is
Exposed by the transaction module (TM. So). If the request cannot be sent successfully, the r_relay () function automatically
Generates an error message. Sl_reply_error () will send failure to UA.

Transactions and dialogs
A transaction is usually like dialog negotiation. (The process of creating a session is a transaction, and the end is also) and the whole process is a dialogue.
Dialog is identified by the combination of the from, to and call-Id heard fields.
Not all methods generate a conversation, such as register and message.

Incision and sequential requests
It is important to distinguish them: initial request uses the via header to Record Route information. If record-routing enabled is enabled, the Route Header will also be used.
In transaction, the data packet will return to the proxy that transmits it according to the via header.
Subsequent requests routes through the contact header. Even if record-routing is set, it will return through set diescovered route.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.