2

我只是在提高我在 SMS 服务方面的技能,现在我正试图为此目的配置 JASMIN。

我在 ubuntu 18.04 上安装了 jasmin SMS 和 GUI 界面 PlaySMS。我也成功地使用 SMS 服务使用 SMPP 发送短信,现在我想了解更多细节。我想 grep SMS 属性并在将其发送给提供商之前设置一些规则。为此,我想知道如何将拦截器与 JASMIN 一起使用并进行配置。

我已经为此推荐了https://jasmin.readthedocs.io/ 。但是在这里,我没有得到这样的文件https://jasmin.readthedocs.io/en/latest/interception/index.html

这是一些日志,表明与拦截器的成功连接。

2020-05-11 15:01:50 INFO     8354 Interceptor configured and ready.
2020-05-11 15:01:51 INFO     8354 Authenticated Avatar: iadmin

根据参考链接,我还为 jasmin 中的 MT 路由添加了一些过滤器。这是这个的配置。

#Order Type                    Rate       Connector ID(s)                                  Filter(s)
#102   StaticMTRoute           3.45000    smppc(smpptest)                                  <TG (tag=21403)>
#101   StaticMTRoute           1.36000    smppc(smppclient1)                               <TG (tag=21401)>
#100   StaticMTRoute

现在,当我尝试发送短信时,它正在工作,但拦截器并没有以任何方式出现。如果有人可以纠正我的配置错误或任何其他满足我需求的想法,请告诉我。

在这里,我还分享了我的 SMPP 日志。

SMPP 日志:

2020-05-07 16:54:34 INFO     934 SMS-MT [cid:smpptest] [queue-msgid:af4e11d7-d83b-4988-9ee8-c0de955554b3] [smpp-msgid:8fcc3dab-d715-41fd-9cac-6f1bb2ec5b0a] [status:ESME_ROK] [prio:0] [dlr:SMSC_DELIVERY_RECEIPT_REQUESTED] [validity:none] [from:006542] [to:8965475636] [content:'Hi u there, good morning!! \x00admin']

2020-05-07 16:57:45 INFO     934 SMS-MT [cid:smpptest] [queue-msgid:1f58e285-a64d-4fb0-ae96-8f0f2ad6a4ee] [smpp-msgid:e6aa27cc-9b30-4878-8463-096f2949e0ae] [status:ESME_ROK] [prio:0] [dlr:SMSC_DELIVERY_RECEIPT_REQUESTED] [validity:none] [from:006542] [to:+21401896324] [content:'Hello , please hurry up, boss summons us ! \x00admin']
2020-05-07 16:59:42 INFO     934 SMS-MT [cid:smpptest] [queue-msgid:c112affd-7932-4f88-b20d-d5164fddbb72] [smpp-msgid:f0bbfdd2-ef91-4262-93b4-e5ba63cef259] [status:ESME_ROK] [prio:0] [dlr:SMSC_DELIVERY_RECEIPT_REQUESTED] [validity:none] [from:006542] [to:21401963874] [content:'Hello , please hurry up, boss summons us ! \x00admin']```
4

2 回答 2

0

尝试启用拦截器

sudo systemctl start jasmin-interceptord 

您还可以通过查看日志来查看状态

/var/log/jasmin/interceptor.log

希望这可以帮助

于 2020-06-24T01:11:30.640 回答
0

您是否创建了拦截规则以及拦截文件(python 文件)?

拦截器文件示例(/opt/jasmin-scripts/interception/mt-interceptor.py)

routable.pdu.params['source_addr'] = 'NewSource'
routable.lockPduParam('source_addr')

拦截器规则示例(在 Jasmin SMS Gateway 的 CLI 中)

telnet <ip> <port>
mtinterceptor -a
type DefaultInterceptor
script python3(/opt/jasmin-scripts/interception/mt-interceptor.py)
ok
persist
quit

您可能还需要重新启动 Jasmin SMS 拦截器

sudo systemctl start jasmin-interceptord
于 2021-07-22T17:48:15.060 回答