Openser中文网

专注于VoIP,Opensips,Kamailio等技术,QQ群:QQ群:293697898

三、路由类型(机翻,时间有限,机翻为主)


tags:OpenSIPS core 创建时间:2023-10-27 11:06:01

三、路由类型 OpenSIPS 路由逻辑使用多种类型的路由。每种类型的路由都由特定事件触发,并允许您处理特定类型的消息(请求或回复)。

  1. route

请求路由块。它包含要对 SIP 请求执行的一组操作。

触发者:接收来自网络的外部请求。

处理:触发 SIP 请求。

类型 :最初是无状态的,可以使用 TM 函数强制为有状态。

默认操作:如果请求既没有转发也没有回复,路由将简单地在最后丢弃请求。

由“route{...}”或“route[0]{...}”标识的主“路由”块为每个SIP请求执行。

执行主路由块后的隐式操作是丢弃 SIP 请求。若要发送回复或转发请求,必须



二、OpenSIPS内核参数(机翻,时间有限,机翻为主)


tags:OpenSIPS core 创建时间:2023-10-27 11:03:11

  1. 核心参数

可以在配置文件中设置的全局参数。接受的值是,取决于实际参数字符串,数字和是/否。如果需要将“yes”或“no”指定为字符串的一部分,请用双引号括起来。

1.1 abort_on_assert 默认值:假

仅当启用断言时才相关。设置为 true 以使 OpenSIPS 在脚本断言失败时立即关闭。

用法示例:

abort_on_assert = true

1.2 advertised_address

它可以是 IP 地址或字符串,表示 Via 标头中通告的地址和 其他目标肿块(例如 RR 标头)。如果为空或未设置(默认值)套接字 使用发送请求的地址。

警告:



一、OpenSIPS脚本语法(机翻,时间有限,机翻为主)


tags:OpenSIPS 脚本语法 创建时间:2023-10-27 10:58:40

  1. 脚本格式

OpenSIP 配置脚本有三个主要逻辑部分:

全局参数

模块部分

路由逻辑

1.1 全局参数

通常,在第一部分,您声明OpenSIPS全局参数 - 这些全局或核心参数会影响OpenSIPS核心和可能的模块。

配置网络侦听器、可用的传输协议、分叉(和进程数)、日志记录和其他全局内容由这些全局参数提供。

例:

```bash disable_tcp = yes listen = udp:192.168.3.40:5060 listen = udp:192.168.3.40:5070 fork = yes children = 4 log_stderror = no



RabbitMQ evolution with OpenSIPS 2.3


tags:MQ opensips 创建时间:2017-02-18 19:17:19

https://blog.opensips.org/2017/02/08/rabbitmq-evolution-with-opensips-2-3/

RabbitMQ is a powerful and widely used tool for message queuing integrations. And the usage of such a tool requires a more flexible support from OpenSIPS. Let’s see what 2.3 has to offer when comes to RabbitMQ based integrat



dispatcher 中的 分发逻辑是什么?


tags:opensips kamailio dispatcher模块 创建时间:2017-01-01 16:29:03

QQ群:293697898

在openser系列中,如果用dispatcher模块,总会看到类似以下这样的调用方式:

 ds_select_dst("1", "5");

第一个参数是网关组,第二个怎么选择呢?

“0” - hash over callid
“1” - hash over from uri.
“2” - hash over to uri.
“3” - hash over request-uri.
“4” - round-robin (next destination).
“5” - hash over


VoIP负载均衡方案


tags:VoIP负载均衡方案 创建时间:2016-10-20 07:56:17

负载均衡方案

前言

由于甲方的并发需求和单机挂载数量较多,故而我们采用多机挂多机的方案来实现负载相对均衡,而又由于甲方要求我们必须使用纯软应用,故而我们采用的有以下两种方式:注册式负载均衡、媒体式负载均衡。

方案简介

注册式负载均衡

结构图

说明:

  1. 所有的注册是由负载均衡服务器直接分发出去,由各媒体服务器进行管理

  2. 而媒体服务器通过数据库或内存数据库等共享注册数据

  3. 呼叫进入时,由各媒体服务器直接处理或者由外部呼叫进入时,分发给各不同的媒体服



SIP介绍 opensips构建电话系统第二版


tags:SIP介绍 opensips构建电话系统第二版 创建时间:2016-07-01 10:46:27

''

Before we dive into OpenSIPS, it is very important to understand some important concepts related to Session Initiation Protocol (SIP). In this chapter, we will cover a brief tutorial regarding the concepts used later in this book. By the end of this chapter, we will have covered the following t



Opensips-1.11版本安装过程


tags:opensips 安装 编译 创建时间:2016-01-28 15:50:48

一般都是安官网的流程去弄,但很多人说找不到或英文的原因弄不来,所以才整理一下。以下以centos6.x 64为例

1 . 安装步骤

a. epel 源

wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm 
rpm -ivh epel-release-6-8.noarch.rpm

注意:Error: Cannot retrieve metalink for repository: epel. Please verify its path and try ag



opensips 配置文件


tags:opensips 配置文件 创建时间:2016-01-18 17:16:55

The OpenSIPS configuration file contains all the parameters that control the OpenSIPS core and modules, along with the actual routing logic that OpenSIPS will use to route the SIP traffic.

Upon installation, the default configuration file path is :
[INSTALL_PATH]/etc/opensips/opensips.c


opensips生成配置文件


tags:opensips 配置文件 创建时间:2015-09-20 08:52:06

    Generating OpenSIPS config files is accomplished by using the menuconfig tool. Because the graphical interface is ncurses based, please make sure to first install the ncurses development library ( typically libncurses5-dev ).

1.  Using the Men


Opensips的RC文件


tags:opensips rc file 创建时间:2015-09-20 08:46:29

The opensipsctlrc is the file that contains all the configuration options for the opensipsctl, opensipsdbctl and osipsconsole tools.

Upon installation, the file is located in

[INSTALL_PATH]/etc/opensips/opensipsctlrc

The file contains control options for interacting with the databa


Opensips数据库字典


tags:Opensips database structs 创建时间:2015-09-19 20:47:09

List of Tables

1-1. Table "acc"
1-2. Table "acc" 
1-3. Table "missed_calls"
1-4. Table "missed_calls" 
2-1. Table "dbaliases"
2-2. Table "dbaliases" 
3-1. Table "subscriber"
3-2. Table "subscriber" 
4-1. Table "usr_preferences"
4-2. Table "usr_preferences"


Opensips事件接口


tags:Events Interface Opensips 事件接口 创建时间:2015-09-19 20:28:08

The Events Interface is an OpenSIPS interface that provides different ways to notify external applications about certain events triggered inside OpenSIPS. Overview

In order to notify an external application about OpenSIPS internal events, the Event Interface provides the following funct


Opensips核心管理接口


tags:Opensips 管理接口 创建时间:2015-09-19 20:21:47

MI (management interface) functions which are exported by OpenSIPS core.

1. arg

Returns the full list of arguments used when OpenSIPS was started. As in UNIX, the first argument is the name of executable binary.
Arguments: none
Output: multiple MI nodes where each node contain


Opensips的管理接口


tags:Opensips 管理接口 MI 创建时间:2015-09-19 20:16:23

The Management Interface (or MI) is an OpenSIPS interface that allows external applications to trigger predefined commands inside OpenSIPS.

Overview

Such commands typically allows an external app to :
push data into OpenSIPS (like setting debug level, registering a contact, etc)


Opensips的模块


tags:Opensips modules 模块 创建时间:2015-09-19 20:13:55

Module nameDescriptionStatus

opensips脚本转换


tags:opensips Transformations 脚本转换 创建时间:2015-09-19 20:10:39

A Transformation is basically a function that is applied to a variable(script variable, pseudo-variables, AVPS, static strings) to get a special value from it. The value of the original variable is not altered. Example of using different kind of variables in OpenSIPS script: # check if usern



Opensips脚本函数索引


tags:Script Function Index Opensips 创建时间:2015-09-19 20:01:40

FunctionModule
  

Opensips脚本操作


tags:Opensips 脚本操作 cfg 创建时间:2015-09-19 19:37:17

Assignments, string and arithmetic operations can be done directly in the configuration file.

1 . Assignment

Assignments can be done like in C, via '=' (equal) operator. Not that not all variables (from script) can be written, some are read-only. Check with listing of variables to see whic


opensips1.7核心变量


tags:opensips core Variables 创建时间:2015-09-19 19:24:48

OpenSIPS provides multiple type of variables to be used in the routing script. The difference between the types of variables comes from (1) the visibility of the variable (when it is visible), (2) what the variable is attached to (where the variable resides), (3) read-write status of the variable (s



opensips1.7核心函数


tags:Core functions opensips 核心函数 创建时间:2015-09-19 18:36:08

This section lists the all the functions exported by OpenSIPS core for script usage (to be used in opensips.cfg)

1 . add_local_rport()

Add 'rport' parameter to the Via header generated by server (see RFC3581 for its meaning). It affects only the current processed request.
Example of us


Opensips配置二台FreeSWITCH负载均衡


tags:opensips freeswitch 负载均衡 创建时间:2015-09-04 15:44:13

本文来自于FreeSWITCH官网: [https://wiki.freeswitch.org/wiki/Opensips][1]

After much searching and experimentation, I've found an opensips.cfg that distributes calls to two or more FreeSWITCH boxes. This guide assumes you have a MySQL server setup on the same machine you are installing. Special thanks to t



Copyright @ 2015 中国Openser中文网 保留所有权利.QQ群:293697898

沪ICP备11043919号-4

工信部备案查询

上海长宁区金钟路658弄11B-5E