代码之家  ›  专栏  ›  技术社区  ›  kadamb DEEPAK PAMWANI

在Kannel上接收短信,但无法在URL上转发。

  •  0
  • kadamb DEEPAK PAMWANI  · 技术社区  · 7 年前

    我已经配置并连接了一个SMSC,以便在Kannel上正确地接收SMS。 我能够成功地接收短消息,正如我从访问日志中看到的那样,但不会受到API的攻击。

    这是配置文件:

    group = smsc
    smsc = smpp
    smsc-id = XXXXXX
    host = abc.abc.abc.abc
    port = 1111
    transceiver-mode = true
    throughput = 10
    smsc-username = xxxxx
    smsc-password = xxxxx
    reconnect-delay = 60
    system-type = XXXXXX
    allowed-smsc-id = XXXXXX
    #get-url = "https://example.org/sms-receive?sender=%P&recipient=%p&timestamp=%t&smstext=%a" //tried this too, but didnt work
    
    
    group = sms-service
    keyword-regex = .*
    catch-all = true
    forced-smsc = XXXXXX
    get-url = "https://example.org/sms-receive?sender=%P&recipient=%p&timestamp=%t&smstext=%a" //tried this too, but didnt work
    #post-url = "https://example.org/sms-receive?sender=%P&recipient=%p&timestamp=%t&smstext=%a" //tried this too, but didnt work
    

    我的访问日志中有以下内容:

    2018-09-11 13:08:38 Receive SMS [SMSC:XXXXXX] [SVC:] [ACT:xxxxx] [BINF:CMT] [FID:] [META:?smpp?] [from:91xxxxxxxxxx] [to:+91xxxxxxxxxx] [flags:-1:0:-1:0:-1] [msg:16:Hello World] [udh:0:]
    

    我做错了什么或是错过了什么?

    1 回复  |  直到 7 年前
        1
  •  0
  •   kadamb DEEPAK PAMWANI    7 年前

    对于任何一个发现自己也有同样问题的人,我发现了我遗漏了什么。

    我还需要在主配置文件中添加以下块:

    group = smsbox-route
    smsbox-id = smsbox
    smsc-id = XXXXXX; //name of the smsc
    

    刚添加这个块,我就开始收到我的回调URL。

    原始问题中的conf没有任何问题,只是缺少一个块。

    希望这能帮助别人:)