Hi Eduard, 
I think you have messed something in your configurations. Can you please check  
if your configs are correct? In my example 1234 was the opensmppbox-id, which 
receives incoming message. Otherwise you can share your configs which lead to 
error. 
 In this case maybe I can tell you why you are receiving mentioned errors.

Best regards,
Ruben Melikyan

> On Mar 2, 2019, at 17:31, Хиль Эдуард <i.am.t...@mail.ru> wrote:
> 
> Hey, Ruben! Thank you for your advice and configs example!
> 
> I have tried that configuration, and i got an errors:
> 
> WARNING: Cannot find SMSCConn for message to <+99887766>, rejected.
> WARNING: Message rejected by bearerbox, no router!
> 
> But if i remove "allowed-smsc-id = loop1" on loopback settings, i sees 
> another error
> 
> WARNING: Could not route message to smsbox id <1234>, smsbox is gone!
> 
> I have stuck on this error for this time... so i have tried another way: i 
> have removed "smsbox-route" complitely, and on opensmppbox settings added 
> "route-to-smsc = loop1" and it works, i see how kannel POST my sms:
> 
> POST 
> /sendsms.php?src=%2B1122334455&dst=%2B99887766&time=2019-03-02+12:55:02&coding=0&smsc=loop1&charset=UTF-8
>  HTTP/1.1
> 
> but and in this case all not so fine... as you can see, there is 
> "&smsc=loop1" thats mean, kannel will put loop1 in all cases, and if on my 
> opensmppbox connects many clients - all of them will be "loop1" and i can't 
> distinguish between them. In this case the only right decision is somehow 
> chagne my API logic? And all this solution with opensmppbox "route-to-smsc" 
> option is correct? Maybe i must somehow solve "Could not route message to 
> smsbox id" error and then doing how said Ruben?
> 
> Суббота, 2 марта 2019, 16:04 +05:00 от Ruben Melikyan <r...@mobbis.am>:
> 
> Hi Eduard,
> 
>  
> 
> You should config loopback smsc which will handle your incoming message from 
> opensmppbox to your service.
> 
>  
> 
> Config example:
> 
> #-----OPENSMPPBOX-----
> 
> group = opensmppbox
> 
> opensmppbox-id = 1234
> 
> opensmppbox-port = …
> 
> bearerbox-host = …
> 
> bearerbox-port = …
> 
> log-level = …
> 
> log-file = ….
> 
> our-system-id = ….
> 
> smpp-logins = …..
> 
> use-systemid-as-smsboxid=true
> 
> source-addr-ton = …
> 
> source-addr-npi = …
> 
> dest-addr-ton = ….
> 
> dest-addr-npi = ….
> 
>  
> 
> #-----SMSC smpp LOOP1-----
> 
> group = smsc
> 
> smsc = loopback
> 
> smsc-id = loop1
> 
> reroute-dlr=true
> 
> allowed-smsc-id = loop1
> 
>  
> 
>  
> 
> # ------  SMS SERVICE ------
> 
> group = sms-service
> 
> keyword = default
> 
> catch-all=yes
> 
> max-messages = 4
> 
> omit-empty = true
> 
> assume-plain-text = yes
> 
> concatenation = true
> 
> max-messages = 4
> 
> post-url =….
> 
>  
> 
> # ------  SMS ROUTING ------
> 
>  
> 
> group = smsbox-route
> 
> smsbox-id = 1234
> 
> smsc-id = loop1
> 
>  
> 
>  
> 
>  
> 
>  
> 
> Best regards
> 
> Ruben Melikyan
> 
>  
> 
>  
> 
> From: users [mailto:users-boun...@kannel.org] On Behalf Of Хиль Эдуард
> Sent: Saturday, 2 March, 2019 13:08
> To: users@kannel.org
> Subject: route from opensmppbox to internal API
> 
>  
> 
> Hi there!
> Let's imagine, that i have on my kannel one smsc and one sms-service with 
> config:
> 
> group = sms-service
> keyword = default
> post-url = 
> "http://127.0.0.1/sendsms.php?src=%P&dst=%p&time=%t&coding=%c&smsc=%n&charset=%C";
> concatenation = true
> max-messages = 0
> 
> In this case, when kannel calls this API, he used POST method and on this API 
> (on PHP page) i have some code "file_get_contents('php://input')" where i can 
> get text of SMS from html-body. All works correct and i'm satisfied.
> But now, i have opensmppbox and i must somehow route sms from opensmppbox to 
> this API. I have find 2 methods: with "smsc http" and "smsc http with 
> system-type generic", but in this both cases kannel uses GET method, and i 
> must use %b variable that put text in http link (for example: 
> ...&smsc=%n&charset=%C%text=%b), but i can't, cuz there are length and 
> charset troubles - i can't put on my link sms message with over 900 symbols 
> with strange codepage :'( 
> So, maybe there are some other methods to route SMS from opensmppbox to 
> kannel sms-service? Or maybe kannel can use POST method not only on 
> sms-service group?
> 
> -- 
> Best regards,
> Me.
> 
> 
> 
> -- 
> Best regards,
> Me.

Reply via email to