Some of the variables commonly used in opensips

Source: Internet
Author: User

The first thing to note is that these variables are case-sensitive.

$ru -Reference to request ' s URI

$ou -Reference to request ' s original URI

$oU -reference to username in Request ' s original URI

$fU -reference to username in URIs of ' from ' header

$fu -Reference to URI of ' from ' header

$si -Reference to IP source address of the message

$rd -reference to domain in request ' s URI

More:

Http://www.opensips.org/Documentation/Script-CoreVar

Common usage:

1. According to the user name to the master is called the limit

if ($fU = = "13100000000" && $oU = = "13100000001")

{

Do something

}

2. Make restrictions based on the main called IP

if ($si = = $rd)

{
Xlog ("You ' re in same subnet!");

Do something

}

Some of the variables commonly used in opensips

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.