Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
7f3c466c
提交
7f3c466c
authored
4月 07, 2008
作者:
Shane Burrell
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
sctplib changes
git-svn-id:
http://svn.openzap.org/svn/openzap/trunk@448
a93c3328-9c30-0410-af19-c9cd2b2d52af
上级
41d67eed
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
54 行增加
和
11 行删除
+54
-11
zap_types.h
libs/freetdm/src/include/zap_types.h
+2
-1
m3ua_client.h
libs/freetdm/src/m3ua_client.h
+51
-9
zap_m3ua.c
libs/freetdm/src/zap_m3ua.c
+1
-1
没有找到文件。
libs/freetdm/src/include/zap_types.h
浏览文件 @
7f3c466c
...
@@ -164,7 +164,8 @@ typedef enum {
...
@@ -164,7 +164,8 @@ typedef enum {
ZAP_SIGTYPE_ISDN
,
ZAP_SIGTYPE_ISDN
,
ZAP_SIGTYPE_RBS
,
ZAP_SIGTYPE_RBS
,
ZAP_SIGTYPE_ANALOG
,
ZAP_SIGTYPE_ANALOG
,
ZAP_SIGTYPE_SS7BOOST
ZAP_SIGTYPE_SS7BOOST
,
ZAP_SIGTYPE_M3UA
}
zap_signal_type_t
;
}
zap_signal_type_t
;
typedef
enum
{
typedef
enum
{
...
...
libs/freetdm/src/m3ua_client.h
浏览文件 @
7f3c466c
...
@@ -46,16 +46,58 @@
...
@@ -46,16 +46,58 @@
#include <sys/types.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/in.h>
#include <netinet/sctp.h>
#include <sctp.h>
//#include <netinet/sctp.h>
#include <arpa/inet.h>
#include <arpa/inet.h>
#include <stdarg.h>
#include <stdarg.h>
#include <netdb.h>
#include <netdb.h>
#include <sigboost.h>
//
#include <sigboost.h>
#include <sys/time.h>
#include <sys/time.h>
#define MAX_DIALED_DIGITS 31
#define MAX_CALLING_NAME 31
/* Next two defines are used to create the range of values for call_setup_id
* in the t_sigboost structure.
* 0..((CORE_MAX_SPANS * CORE_MAX_CHAN_PER_SPAN) - 1) */
#define CORE_MAX_SPANS 200
#define CORE_MAX_CHAN_PER_SPAN 30
#define MAX_PENDING_CALLS CORE_MAX_SPANS * CORE_MAX_CHAN_PER_SPAN
/* 0..(MAX_PENDING_CALLS-1) is range of call_setup_id below */
#define SIZE_RDNIS 80
//#undef MSGWINDOW
#define MSGWINDOW
typedef
struct
{
uint32_t
event_id
;
uint32_t
fseqno
;
#ifdef MSGWINDOW
uint32_t
bseqno
;
#endif
uint16_t
call_setup_id
;
uint32_t
trunk_group
;
uint32_t
span
;
uint32_t
chan
;
uint8_t
called_number_digits_count
;
char
called_number_digits
[
MAX_DIALED_DIGITS
+
1
];
/* it's a null terminated string */
uint8_t
calling_number_digits_count
;
/* it's an array */
char
calling_number_digits
[
MAX_DIALED_DIGITS
+
1
];
/* it's a null terminated string */
uint8_t
release_cause
;
struct
timeval
tv
;
/* ref. Q.931 Table 4-11 and Q.951 Section 3 */
uint8_t
calling_number_screening_ind
;
uint8_t
calling_number_presentation
;
char
redirection_string
[
SIZE_RDNIS
];
/* it's a null terminated string */
}
t_m3ua
;
typedef
t_m3ua
m3uac_event_t
;
typedef
t_m3ua
m3uac_event_t
;
typedef
uint32_t
m3uac_event_id_t
;
typedef
uint32_t
m3uac_event_id_t
;
typedef
struct
m3uac_ip_cfg
typedef
struct
m3uac_ip_cfg
{
{
char
local_ip
[
25
];
char
local_ip
[
25
];
...
@@ -85,27 +127,27 @@ struct m3uac_connection {
...
@@ -85,27 +127,27 @@ struct m3uac_connection {
typedef
enum
{
typedef
enum
{
MSU_FLAG_EVENT
=
(
1
<<
0
)
MSU_FLAG_EVENT
=
(
1
<<
0
)
}
ss7b
c_flag_t
;
}
m3ua
c_flag_t
;
typedef
struct
m3uac_connection
m3uac_connection_t
;
typedef
struct
m3uac_connection
m3uac_connection_t
;
static
inline
void
sctp_no_nagle
(
int
socket
)
static
inline
void
sctp_no_nagle
(
int
socket
)
{
{
int
flag
=
1
;
//
int flag = 1;
setsockopt
(
socket
,
IPPROTO_SCTP
,
SCTP_NODELAY
,
(
char
*
)
&
flag
,
sizeof
(
int
));
//
setsockopt(socket, IPPROTO_SCTP, SCTP_NODELAY, (char *) &flag, sizeof(int));
}
}
int
m3uac_connection_close
(
m3uac_connection_t
*
mcon
);
int
m3uac_connection_close
(
m3uac_connection_t
*
mcon
);
int
m3uac_connection_open
(
m3uac_connection_t
*
mcon
,
char
*
local_ip
,
int
local_port
,
char
*
ip
,
int
port
);
int
m3uac_connection_open
(
m3uac_connection_t
*
mcon
,
char
*
local_ip
,
int
local_port
,
char
*
ip
,
int
port
);
m3uac_event_t
*
ss7b
c_connection_read
(
m3uac_connection_t
*
mcon
,
int
iteration
);
m3uac_event_t
*
m3ua
c_connection_read
(
m3uac_connection_t
*
mcon
,
int
iteration
);
m3uac_event_t
*
ss7b
c_connection_readp
(
m3uac_connection_t
*
mcon
,
int
iteration
);
m3uac_event_t
*
m3ua
c_connection_readp
(
m3uac_connection_t
*
mcon
,
int
iteration
);
int
m3uac_connection_write
(
m3uac_connection_t
*
mcon
,
ss7b
c_event_t
*
event
);
int
m3uac_connection_write
(
m3uac_connection_t
*
mcon
,
m3ua
c_event_t
*
event
);
void
m3uac_event_init
(
m3uac_event_t
*
event
,
m3uac_event_id_t
event_id
,
int
chan
,
int
span
);
void
m3uac_event_init
(
m3uac_event_t
*
event
,
m3uac_event_id_t
event_id
,
int
chan
,
int
span
);
void
m3uac_call_init
(
m3uac_event_t
*
event
,
const
char
*
calling
,
const
char
*
called
,
int
setup_id
);
void
m3uac_call_init
(
m3uac_event_t
*
event
,
const
char
*
calling
,
const
char
*
called
,
int
setup_id
);
const
char
*
m3uac_event_id_name
(
uint32_t
event_id
);
const
char
*
m3uac_event_id_name
(
uint32_t
event_id
);
int
m3uac_exec_command
(
m3uac_connection_t
*
mcon
,
int
span
,
int
chan
,
int
id
,
int
cmd
,
int
cause
);
int
m3uac_exec_command
(
m3uac_connection_t
*
mcon
,
int
span
,
int
chan
,
int
id
,
int
cmd
,
int
cause
);
#endif
/* For Emacs:
/* For Emacs:
...
...
libs/freetdm/src/zap_m3ua.c
浏览文件 @
7f3c466c
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
#include "openzap.h"
#include "openzap.h"
//
#include "m3ua_client.h"
#include "m3ua_client.h"
#include "zap_m3ua.h"
#include "zap_m3ua.h"
struct
general_config
{
struct
general_config
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论