Skip to content

Commit 5fdff35

Browse files
committed
update
1 parent 405ecea commit 5fdff35

File tree

8 files changed

+180
-27
lines changed

8 files changed

+180
-27
lines changed

config.yaml

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@ params:
4747
assets:
4848
# disableHLJS: true # to disable highlight.js
4949
# disableFingerprinting: true
50-
favicon: "/cowboy.ico"
51-
favicon16x16: "/cowboy.ico"
52-
favicon32x32: "/cowboy.ico"
53-
apple_touch_icon: "/cowboy.ico"
54-
safari_pinned_tab: "/cowboy.ico"
50+
favicon: "/favicon.ico"
51+
favicon16x16: "/favicon.ico"
52+
favicon32x32: "/favicon.ico"
53+
apple_touch_icon: "/favicon.ico"
54+
safari_pinned_tab: "/favicon.ico"
5555

5656
label:
5757
text: "洞香春"
58-
icon: "/cowboy.ico"
58+
icon: "/favicon.ico"
5959
iconHeight: 35
6060

6161
# profile-mode
@@ -76,8 +76,8 @@ params:
7676
# home-info mode
7777
homeInfoParams:
7878
enabled: false
79-
Title: "Eddie(艾迪)"
80-
Content: "当你在穿山越岭的另一边, 我在孤独的路上没有尽头"
79+
Title: "艾迪(Eddie)的博客"
80+
Content: "7年VoIP工作经验,前端/软交换开发。热爱开源,热爱分享。 微信:suguswang177, 欢迎交流"
8181

8282
socialIcons:
8383
- name: github
@@ -118,23 +118,23 @@ menu:
118118
- identifier: id_fs
119119
name: "FreeSWITCH"
120120
url: /freeswitch/
121-
weight: 10
122-
- identifier: id_books
123-
name: "读书"
124-
url: /books/
125-
weight: 8
126-
- identifier: id_vim
127-
name: "VIM"
128-
url: /vim/
129-
weight: 10
130-
- identifier: id_fe
131-
name: "前端"
132-
url: /fe/
133-
weight: 10
121+
weight: 3
122+
# - identifier: id_books
123+
# name: "读书"
124+
# url: /books/
125+
# weight: 8
126+
# - identifier: id_vim
127+
# name: "VIM"
128+
# url: /vim/
129+
# weight: 10
130+
# - identifier: id_fe
131+
# name: "前端"
132+
# url: /fe/
133+
# weight: 10
134134
- identifier: id_kama
135135
name: "Kamailio"
136136
url: /kamailio/
137-
weight: 10
137+
weight: 2
138138
# - identifier: id_km_wiki_56
139139
# name: "Kamailio 5.6 wiki"
140140
# url: /kamailio/56/
@@ -150,7 +150,7 @@ menu:
150150
- identifier: id_opensips
151151
name: "OpenSIPS"
152152
url: /opensips/
153-
weight: 10
153+
weight: 1
154154
# - identifier: id_network
155155
# name: "Network"
156156
# url: /network/
@@ -159,10 +159,10 @@ menu:
159159
# name: "Golang"
160160
# url: /golang/
161161
# weight: 10
162-
- identifier: id_categories
163-
name: "分类"
164-
url: /categories/
165-
weight: 10
162+
# - identifier: id_categories
163+
# name: "分类"
164+
# url: /categories/
165+
# weight: 10
166166
- identifier: id_tags
167167
name: "标签"
168168
url: /tags/
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
title: "【案例分享】JSSIP 电话无法挂断问题"
3+
date: "2025-07-15 20:00:08"
4+
draft: false
5+
type: posts
6+
tags:
7+
- jssip
8+
- 案例分享
9+
- 无法挂断
10+
categories:
11+
- all
12+
---
13+
14+
当听到分机无法挂断电话时,通常有以下几种可能的原因:
15+
16+
1. 在做Record-Route时,使用了错误的内外网IP地址。导致BYE请求按照route头发送时,无法正确找到对应的服务器。
17+
2. Contact头部的URI不正确,导致BYE请求无法找到对应的服务器。
18+
19+
时序图如下;
20+
21+
```mermaid
22+
sequenceDiagram
23+
autonumber
24+
participant u1 as user1
25+
participant o as opensips
26+
participant u2 as user2
27+
28+
u1->>o: INVITE
29+
o->>u2: INVITE
30+
u2-->>o: 200 OK
31+
o-->>u1: 200 OK
32+
u1->>o: ACK
33+
o->>u2: ACK
34+
u2->>o: BYE
35+
o-->>u2: 477 Send failed (477/TM)
36+
```
37+
38+
477错误一般是按照route头或者contact转发时,找不到对应的socket。 在使用tcp作为传输协议时,例如tcp/tls/wss注册的分机比较常见。
39+
40+
有以下可能
41+
1. 分机到opensips的tcp连接断开
42+
2. contact使用错误的transport参数
43+
44+
从过观察第2个信令的Conact头,发现transport=ws, User-Agent=JSSip。 正常情况下,jssip应该使用wss作为transport。
45+
46+
所以解决办法是,在jssip的配置中,将transport改为wss。
47+
48+
还有一个解决方案, 就是让jssip通过nginx转发wss请求,让nginx转发到opensips的ws端口, 也能解决问题。
49+
50+
```mermaid
51+
sequenceDiagram
52+
autonumber
53+
54+
jssip ->> nginx: wss
55+
nginx ->> opensips: ws
56+
```
57+
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: "RTPEngine 录制 PCAP 文件"
3+
date: "2025-07-15 19:26:06"
4+
draft: false
5+
type: posts
6+
tags:
7+
- rtpengine
8+
- 录音
9+
categories:
10+
- rtpengine
11+
---
12+
13+
# 为什要用 RTPEngine 来录制 PCAP 文件?
14+
15+
一般我们用 Freeswitch 来作为录音服务器, 但是某些场景,例如备份录音,需要在不同节点进行录音。
16+
17+
如果直接录制成 wav 文件,那么比较占用资源,而且备份录音用的几率也是比较小的。
18+
19+
因此录制成 PCAP 文件,可以节省资源,后期 pcap 转语音也能比较容易的实现。
20+
21+
# 实现步骤
22+
23+
1. 配置rtpengine启动参数
24+
25+
```
26+
--pcaps-dir=/var/log/records --record-method=pcap --recording-format=eht
27+
```
28+
29+
2. 在opensips在做SDP Offer
30+
31+
```
32+
rtpengine_offer("record-call=yes");
33+
```
34+
35+
3. 录音文件位置
36+
37+
录音文件在`/var/log/records`目录下,文件名是呼叫的sip Call-ID-16hex随机数.pcap
38+
39+
```sh
40+
call1-1234567890abcdef.pcap
41+
call2-1234567890abcdef.pcap
42+
```
43+
44+
4. 录音文件内容
45+
46+
录音文件用wireshark分析,可以听到主被叫双方的声音。
47+
48+
49+
5. 其他
50+
51+
除了录音文件,一些录音的元数据,例如SDP之类的信息,会被记录到录音的目录下。
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
title: "【案例分享】外线呼入,SIP分机为何无响应?"
3+
date: "2025-07-15 19:39:57"
4+
draft: false
5+
type: posts
6+
tags:
7+
- 案例分享
8+
- 无法应答
9+
categories:
10+
- all
11+
---
12+
13+
# 案例分享
14+
15+
最近有客户反馈,自己的话机最近一两周都没有收到来电了,感觉很奇怪,他自己呼叫400号码,然后转分机,也接不通。
16+
17+
## 组网结构
18+
19+
```mermaid
20+
flowchart LR
21+
ua1(分机)
22+
fw1(防火墙)
23+
uas1(SIP服务器)
24+
25+
ua1 --> fw1
26+
fw1 --> uas1
27+
```
28+
29+
## 排查思路
30+
31+
1. 首先排查服务端,从日志来看,分机的注册是正常的,每隔30多秒就注册一次。
32+
2. 然后排查呼叫信令图,发现发送给分机的INVITE, 分机那边没有任何反应
33+
3. 接着请求客户远程协助,在分机上抓包,发现只能抓到注册包,没有INVITE的回应。
34+
4. 询问客户,他们公司有没有使用防火墙,客户说有。
35+
5. 然后让客户检查他们防火墙的设置,关闭SIP ALG功能,但是也无效
36+
6. 然后让客户找网络负责人,在防火墙上抓包,发现防火墙收到了INVITE,但是没有转发给内部分机, 原因未知
37+
7. 最后找防火墙厂商,发现是防火墙的UDP组包没有开启,开启UDP分片重组后,呼入电话能正常进线
38+
39+
40+
41+
## 总结
42+
43+
此刻,我回想起曾经写的 [UDP分片导致SIP消息丢失](https://wdd.js.org/opensips/ch7/big-udp-msg/)
44+
45+
没想到,在防火墙上也遇到了同样的问题。

static/cowboy.ico

-16.6 KB
Binary file not shown.

static/favicon.ico

16.6 KB
Binary file not shown.

static/logo.ico

-12.6 KB
Binary file not shown.

static/yellowstone.ico

-16.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)