Skip to content

Commit

Permalink
deploy: bb16768
Browse files Browse the repository at this point in the history
  • Loading branch information
wangduanduan committed Dec 27, 2024
1 parent 6b0c7f8 commit fb589ed
Show file tree
Hide file tree
Showing 55 changed files with 590 additions and 323 deletions.
2 changes: 1 addition & 1 deletion archives/index.html

Large diffs are not rendered by default.

24 changes: 10 additions & 14 deletions categories/all/index.html

Large diffs are not rendered by default.

19 changes: 18 additions & 1 deletion categories/all/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,24 @@
</image>
<generator>Hugo -- gohugo.io</generator>
<language>en</language>
<lastBuildDate>Sun, 22 Dec 2024 18:07:08 +0800</lastBuildDate><atom:link href="https://wdd.js.org/categories/all/index.xml" rel="self" type="application/rss+xml" />
<lastBuildDate>Fri, 27 Dec 2024 20:45:03 +0800</lastBuildDate><atom:link href="https://wdd.js.org/categories/all/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>源码笔记 - 自定义事件路由(上)</title>
<link>https://wdd.js.org/kamailio/customer-event-route/</link>
<pubDate>Fri, 27 Dec 2024 20:45:03 +0800</pubDate>

<guid>https://wdd.js.org/kamailio/customer-event-route/</guid>
<description>[[TOC]]
事件路由简介 在某些模块中,我们看到有一些模块自定义的事件路由。
例如dispatcher模块,或者rtpengine模块。
event_route[dispatcher:dst-down] { xlog(&amp;#34;L_ERR&amp;#34;, &amp;#34;Destination down: $rm $ru ($du)\n&amp;#34;); } event_route[rtpengine:dtmf-event] { xlog(&amp;#34;L_INFO&amp;#34;, &amp;#34;callid: $avp(dtmf_event_callid)\n&amp;#34;); xlog(&amp;#34;L_INFO&amp;#34;, &amp;#34;source_tag: $avp(dtmf_event_source_tag)\n&amp;#34;); xlog(&amp;#34;L_INFO&amp;#34;, &amp;#34;timestamp: $avp(dtmf_event_timestamp)\n&amp;#34;); xlog(&amp;#34;L_INFO&amp;#34;, &amp;#34;dtmf: $avp(dtmf_event)\n&amp;#34;); } disapcher模块 在dispatch.c文件中,我们看到如下代码
if(!ds_skip_dst(old_state) &amp;amp;&amp;amp; ds_skip_dst(idx-&amp;gt;dlist[i].flags)) { ds_run_route(msg, address, &amp;#34;dispatcher:dst-down&amp;#34;, rctx); } else { if(ds_skip_dst(old_state) &amp;amp;&amp;amp; !ds_skip_dst(idx-&amp;gt;dlist[i].flags)) ds_run_route(msg, address, &amp;#34;dispatcher:dst-up&amp;#34;, rctx); } ds_run_route还是定义在dispatch.c文件中,
static void ds_run_route(sip_msg_t *msg, str *uri, char *route, ds_rctx_t *rctx) 接着又一个重要调用。 这里似乎在查找路由。
route这个参数其实就是dispatcher:dst-down, 或者 dispatcher:dst-up,
那么event_rt又是什么鬼呢?
rt = route_lookup(&amp;amp;event_rt, route); event_rt是一个route_list的结构体</description>
</item>

<item>
<title>DMQ模块源码学习笔记</title>
<link>https://wdd.js.org/kamailio/dmq-note/</link>
Expand Down
20 changes: 14 additions & 6 deletions categories/all/page/2/index.html

Large diffs are not rendered by default.

11 changes: 6 additions & 5 deletions categories/all/page/3/index.html

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion categories/all/page/4/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<!doctype html><html lang=en dir=auto><head><meta charset=utf-8><meta http-equiv=x-ua-compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name=robots content="index, follow"><title>all | 洞香春</title><meta name=keywords content><meta name=description content="Eddie Wang的个人博客"><meta name=author content="Eddie Wang"><link rel=canonical href=https://wdd.js.org/categories/all/><link crossorigin=anonymous href=/assets/css/stylesheet.6d3944e058d85363bbe8a792a9b5f40002bca80be859dc19c466dd8de223973e.css integrity="sha256-bTlE4FjYU2O76KeSqbX0AAK8qAvoWdwZxGbdjeIjlz4=" rel="preload stylesheet" as=style><link rel=icon href=https://wdd.js.org/cowboy.ico><link rel=icon type=image/png sizes=16x16 href=https://wdd.js.org/cowboy.ico><link rel=icon type=image/png sizes=32x32 href=https://wdd.js.org/cowboy.ico><link rel=apple-touch-icon href=https://wdd.js.org/cowboy.ico><link rel=mask-icon href=https://wdd.js.org/cowboy.ico><meta name=theme-color content="#2e2e33"><meta name=msapplication-TileColor content="#2e2e33"><link rel=alternate type=application/rss+xml href=https://wdd.js.org/categories/all/index.xml><noscript><style>#theme-toggle,.top-link{display:none}</style></noscript><meta property="og:title" content="all"><meta property="og:description" content="Eddie Wang的个人博客"><meta property="og:type" content="website"><meta property="og:url" content="https://wdd.js.org/categories/all/"><meta property="og:image" content="https://wdd.js.org/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E"><meta property="og:site_name" content="洞香春"><meta name=twitter:card content="summary_large_image"><meta name=twitter:image content="https://wdd.js.org/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E"><meta name=twitter:title content="all"><meta name=twitter:description content="Eddie Wang的个人博客"></head><body class=list id=top><script>localStorage.getItem("pref-theme")==="dark"&&document.body.classList.add("dark")</script><header class=header><nav class=nav><div class=logo><a href=https://wdd.js.org accesskey=h title="洞香春 (Alt + H)"><img src=https://wdd.js.org/cowboy.ico alt aria-label=logo height=35>洞香春</a><div class=logo-switches><button id=theme-toggle accesskey=t title="(Alt + T)"><svg id="moon" xmlns="http://www.w3.org/2000/svg" width="24" height="18" viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"/></svg><svg id="sun" xmlns="http://www.w3.org/2000/svg" width="24" height="18" viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="5"/><line x1="12" y1="1" x2="12" y2="3"/><line x1="12" y1="21" x2="12" y2="23"/><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/><line x1="1" y1="12" x2="3" y2="12"/><line x1="21" y1="12" x2="23" y2="12"/><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/></svg></button></div></div><ul id=menu><li><a href=https://wdd.js.org/books/ title=百分之一阅读法><span>百分之一阅读法</span></a></li><li><a href=https://wdd.js.org/freeswitch/ title=FreeSWITCH><span>FreeSWITCH</span></a></li><li><a href=https://wdd.js.org/golang/ title=Golang><span>Golang</span></a></li><li><a href=https://wdd.js.org/kamailio/ title=Kamailio><span>Kamailio</span></a></li><li><a href=https://wdd.js.org/network/ title=Network><span>Network</span></a></li><li><a href=https://wdd.js.org/opensips/ title=OpenSIPS><span>OpenSIPS</span></a></li><li><a href=https://wdd.js.org/vim/ title=VIM><span>VIM</span></a></li><li><a href=https://wdd.js.org/categories/ title=分类><span>分类</span></a></li><li><a href=https://wdd.js.org/fe/ title=前端><span>前端</span></a></li><li><a href=https://wdd.js.org/search/ title=搜索><span>搜索</span></a></li><li><a href=https://wdd.js.org/tags/ title=标签><span>标签</span></a></li><li><a href=https://wdd.js.org/archives/ title=归档><span>归档</span></a></li><li><a href=https://wdd.js.org/about/ title=><span></span></a></li></ul></nav></header><main class=main><header class=page-header><div class=breadcrumbs><a href=https://wdd.js.org>Home</a>&nbsp;»&nbsp;<a href=https://wdd.js.org/categories/>Categories</a></div><h1>all</h1></header><article class="post-entry tag-entry"><header class=entry-header><h2>Pdf学习资料</h2></header><div class=entry-content><p>TelNYX.pdf OpenSIPS 2.3 mediasoup Cutting Edge WebRTC Video COnferencing FreeSWITCH-driven routing in OpenSIPS Voicenter: Contact center on Steroids Vlad_Paiu-Distributed_OpenSIPS_Systems_Cluecon14.pdf Vlad_Paiu-OpenSIPS_Summit_Austin_2015-Async.pdf Ionut_Ionita-OpenSIPS_Summit2017-Capturing_beyond_SIP FLAVIO_GONCALVES-Fraud_in_VoIP_Today.pdf Alexandr_Dubovikov-OpenSIPS_Summit2017-RTC_Threat_Intelligence_Exchange.pdf OpenSIPS_LoadBalancing.pdf Vlad_Paiu-OpenSIPS_Summit_2104-OpenSIPS_End_User_Services.pdf Razvan_Crainea-OpenSIPS_Summit2017-From_SIPI_Trunks_to_End_Users.pdf Razvan_Crainea-OpenSIPS_Summit-Scaling_Asterisk.pdf Vlad_Paiu-OpenSIPS_Summit-Service_Enabling_for_Asterisk.pdf Jonas_Borjesson-OpenSIPS_Summit_Austin_2015.pdf Michele_Pinasi-OpenSIPS_Summit2017-How_we_did_VoIP.pdf Bogdan_Iancu-OpenSIPS_Summit_Keynotes.pdf Giovanni_Maruzselli-OpenSIPS_Summit2017-Scaling_FreeSWITCHes.pdf Maksym_Sobolyev-OpenSIPS_Summit2017-Sippy_Labs_update.pdf docker-cluster.pdf voip malware attack tool .pdf Bogdan_Iancu-OpenSIPS_Summit-OpenSIPS_2_1.pdf Pete_Kelly-OpenSIPS_Workshop_Chicago_2015-Calling_Cards_B2BUA.pdf Bogdan_Iancu-OpenSIPS_Summit-keynotes.pdf Alex_Goulis-Opensips_CNAME.pdf OpenSIPS_2.0_Framework.pdf Norman_Brandinger-OpenSIPS_Summit_2014-Advanced_SIP_Routing_with_OpenSIPS_modules.pdf</p></div><footer class=entry-footer><span title='2022-12-03 16:02:18 +0800 CST'>2022-12-03 16:02:18</span>&nbsp;·&nbsp;1 min&nbsp;·&nbsp;Eddie Wang</footer><a class=entry-link aria-label="post link to Pdf学习资料" href=https://wdd.js.org/opensips/pdf/></a></article><article class="post-entry tag-entry"><header class=entry-header><h2>西安之旅 不仅有羊肉泡馍 也有长恨歌</h2></header><div class=entry-content><p>一年过半以后,偶然打开微信公众号,看到草稿箱里的篇文章。我才回想起去年带女友去西安的那个遥远的夏天。
<!doctype html><html lang=en dir=auto><head><meta charset=utf-8><meta http-equiv=x-ua-compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name=robots content="index, follow"><title>all | 洞香春</title><meta name=keywords content><meta name=description content="Eddie Wang的个人博客"><meta name=author content="Eddie Wang"><link rel=canonical href=https://wdd.js.org/categories/all/><link crossorigin=anonymous href=/assets/css/stylesheet.6d3944e058d85363bbe8a792a9b5f40002bca80be859dc19c466dd8de223973e.css integrity="sha256-bTlE4FjYU2O76KeSqbX0AAK8qAvoWdwZxGbdjeIjlz4=" rel="preload stylesheet" as=style><link rel=icon href=https://wdd.js.org/cowboy.ico><link rel=icon type=image/png sizes=16x16 href=https://wdd.js.org/cowboy.ico><link rel=icon type=image/png sizes=32x32 href=https://wdd.js.org/cowboy.ico><link rel=apple-touch-icon href=https://wdd.js.org/cowboy.ico><link rel=mask-icon href=https://wdd.js.org/cowboy.ico><meta name=theme-color content="#2e2e33"><meta name=msapplication-TileColor content="#2e2e33"><link rel=alternate type=application/rss+xml href=https://wdd.js.org/categories/all/index.xml><noscript><style>#theme-toggle,.top-link{display:none}</style></noscript><meta property="og:title" content="all"><meta property="og:description" content="Eddie Wang的个人博客"><meta property="og:type" content="website"><meta property="og:url" content="https://wdd.js.org/categories/all/"><meta property="og:image" content="https://wdd.js.org/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E"><meta property="og:site_name" content="洞香春"><meta name=twitter:card content="summary_large_image"><meta name=twitter:image content="https://wdd.js.org/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E"><meta name=twitter:title content="all"><meta name=twitter:description content="Eddie Wang的个人博客"></head><body class=list id=top><script>localStorage.getItem("pref-theme")==="dark"&&document.body.classList.add("dark")</script><header class=header><nav class=nav><div class=logo><a href=https://wdd.js.org accesskey=h title="洞香春 (Alt + H)"><img src=https://wdd.js.org/cowboy.ico alt aria-label=logo height=35>洞香春</a><div class=logo-switches><button id=theme-toggle accesskey=t title="(Alt + T)"><svg id="moon" xmlns="http://www.w3.org/2000/svg" width="24" height="18" viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"/></svg><svg id="sun" xmlns="http://www.w3.org/2000/svg" width="24" height="18" viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="5"/><line x1="12" y1="1" x2="12" y2="3"/><line x1="12" y1="21" x2="12" y2="23"/><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/><line x1="1" y1="12" x2="3" y2="12"/><line x1="21" y1="12" x2="23" y2="12"/><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/></svg></button></div></div><ul id=menu><li><a href=https://wdd.js.org/books/ title=百分之一阅读法><span>百分之一阅读法</span></a></li><li><a href=https://wdd.js.org/freeswitch/ title=FreeSWITCH><span>FreeSWITCH</span></a></li><li><a href=https://wdd.js.org/golang/ title=Golang><span>Golang</span></a></li><li><a href=https://wdd.js.org/kamailio/ title=Kamailio><span>Kamailio</span></a></li><li><a href=https://wdd.js.org/network/ title=Network><span>Network</span></a></li><li><a href=https://wdd.js.org/opensips/ title=OpenSIPS><span>OpenSIPS</span></a></li><li><a href=https://wdd.js.org/vim/ title=VIM><span>VIM</span></a></li><li><a href=https://wdd.js.org/categories/ title=分类><span>分类</span></a></li><li><a href=https://wdd.js.org/fe/ title=前端><span>前端</span></a></li><li><a href=https://wdd.js.org/search/ title=搜索><span>搜索</span></a></li><li><a href=https://wdd.js.org/tags/ title=标签><span>标签</span></a></li><li><a href=https://wdd.js.org/archives/ title=归档><span>归档</span></a></li><li><a href=https://wdd.js.org/about/ title=><span></span></a></li></ul></nav></header><main class=main><header class=page-header><div class=breadcrumbs><a href=https://wdd.js.org>Home</a>&nbsp;»&nbsp;<a href=https://wdd.js.org/categories/>Categories</a></div><h1>all</h1></header><article class="post-entry tag-entry"><header class=entry-header><h2>模块传参的重构</h2></header><div class=entry-content><p>写过opensips脚本的同学,往往对函数的传参感到困惑。
例如:
ds_select_dst()可以接受整数或者值为正数的变量作为第一个参数,但是nat_uac_test()的第一个参数就只能是整数,而不能是变量 为什么rl_check()可以接受格式化的字符串,而save()只能接受字符串。 为什么ds_select_dst("1", "4") 作为整数也要加上双引号? 为什么变量要加上双引号? ds_select_dst("$var(aa)", "4") 为什么t_on_branch("1")路由的钩子要加上双引号? 为什么route(go_to_something);这里又不需要加上引号? ds_select_dst("1", "0"); $var(aa)=1; ds_select_dst("$var(aa)", "0"); rl_check("gw_$ru", "$var(limit)"); #格式化的gw_$ru save("location"); #单纯的字符串作为参数 从3.0开始,传参可以更加自然。
整数可以直接传参,不用加双引号 do_something(1, 1); 输入或者输出的$var(), 不用加双引号,加了反而会报错 do_something($var(a), $var(b)); 格式化字符串,需要加双引号 do_something(1, "$var(bb)_$var(b)"); 参考 https://blog.opensips.org/2019/11/05/the-module-function-interface-rework-in-opensips-3-0/ https://www.opensips.org/Documentation/Script-Syntax-3-0#</p></div><footer class=entry-footer><span title='2022-12-03 21:01:02 +0800 CST'>2022-12-03 21:01:02</span>&nbsp;·&nbsp;1 min&nbsp;·&nbsp;Eddie Wang</footer><a class=entry-link aria-label="post link to 模块传参的重构" href=https://wdd.js.org/opensips/3x/module-args/></a></article><article class="post-entry tag-entry"><header class=entry-header><h2>Pdf学习资料</h2></header><div class=entry-content><p>TelNYX.pdf OpenSIPS 2.3 mediasoup Cutting Edge WebRTC Video COnferencing FreeSWITCH-driven routing in OpenSIPS Voicenter: Contact center on Steroids Vlad_Paiu-Distributed_OpenSIPS_Systems_Cluecon14.pdf Vlad_Paiu-OpenSIPS_Summit_Austin_2015-Async.pdf Ionut_Ionita-OpenSIPS_Summit2017-Capturing_beyond_SIP FLAVIO_GONCALVES-Fraud_in_VoIP_Today.pdf Alexandr_Dubovikov-OpenSIPS_Summit2017-RTC_Threat_Intelligence_Exchange.pdf OpenSIPS_LoadBalancing.pdf Vlad_Paiu-OpenSIPS_Summit_2104-OpenSIPS_End_User_Services.pdf Razvan_Crainea-OpenSIPS_Summit2017-From_SIPI_Trunks_to_End_Users.pdf Razvan_Crainea-OpenSIPS_Summit-Scaling_Asterisk.pdf Vlad_Paiu-OpenSIPS_Summit-Service_Enabling_for_Asterisk.pdf Jonas_Borjesson-OpenSIPS_Summit_Austin_2015.pdf Michele_Pinasi-OpenSIPS_Summit2017-How_we_did_VoIP.pdf Bogdan_Iancu-OpenSIPS_Summit_Keynotes.pdf Giovanni_Maruzselli-OpenSIPS_Summit2017-Scaling_FreeSWITCHes.pdf Maksym_Sobolyev-OpenSIPS_Summit2017-Sippy_Labs_update.pdf docker-cluster.pdf voip malware attack tool .pdf Bogdan_Iancu-OpenSIPS_Summit-OpenSIPS_2_1.pdf Pete_Kelly-OpenSIPS_Workshop_Chicago_2015-Calling_Cards_B2BUA.pdf Bogdan_Iancu-OpenSIPS_Summit-keynotes.pdf Alex_Goulis-Opensips_CNAME.pdf OpenSIPS_2.0_Framework.pdf Norman_Brandinger-OpenSIPS_Summit_2014-Advanced_SIP_Routing_with_OpenSIPS_modules.pdf</p></div><footer class=entry-footer><span title='2022-12-03 16:02:18 +0800 CST'>2022-12-03 16:02:18</span>&nbsp;·&nbsp;1 min&nbsp;·&nbsp;Eddie Wang</footer><a class=entry-link aria-label="post link to Pdf学习资料" href=https://wdd.js.org/opensips/pdf/></a></article><article class="post-entry tag-entry"><header class=entry-header><h2>西安之旅 不仅有羊肉泡馍 也有长恨歌</h2></header><div class=entry-content><p>一年过半以后,偶然打开微信公众号,看到草稿箱里的篇文章。我才回想起去年带女友去西安的那个遥远的夏天。
如今女友已经变成老婆,这篇文章我才想起来发表。
day 1 钟楼 鼓楼 回民街 那是六月末的时候,和女友一起坐火车去了趟西安。
为什么要去西安呢?据吃货女友说,西安有非常多的好吃的。所以人生是必须要去一趟的。
Expand Down
Loading

0 comments on commit fb589ed

Please sign in to comment.