kneodev / ksmppd

Kurt's SMPP Daemon (SMPP Server for Kannel)
Other
57 stars 39 forks source link

SMS MO / Encoding issue #166

Open cl77 opened 7 months ago

cl77 commented 7 months ago

Hi there,

we have a little issue that clients do receive sms mo UTF-8 encoded.

We have created a dummy SMSC just for sms mo:

group = smsc
smsc = http
smsc-id = INJECT_SMS_MO
system-type = kannel
smsc-username = sms_mo
smsc-password = .....
port = 14000
send-url = "http://localhost:1234567"
log-level=0
log-file="/var/log/kannel/inject_sms_mo.log"
allowed-smsc-id=INJECT_SMS_MO

Then we re-route all sms mo to ksmppd:

group = smsbox-route
smsbox-id = ksmppd
smsc-id = INJECT_SMS_MO

KSMPPD then calls route.php to get the client who should receive the sms mo:

group=smpp-routing
routing-method=2
http-routing-url="https://our-domain.com/route.php"
http-num-callers=3
http-max-outstanding-requests=512

Works like a charm, a curl request to http://localhost:14000/cgi-bin/sendsms?... creates a sms mo which gets forwarded to client. E.G we send a SMS with coding=0 and content "€" thats what we receive: data: 1b 65 ("€" in gsm7).

But if we do send "€" with coding=2 we receive UTF-8 encoded content: data: e2 82 ac Same happens for concatenated gsm7 SMS.

We have also tried to write sms mo entries directly to smpp_store table with similar results. I think we tried every combination of coding, charset etc.

We're stuck now. Thanks in advance for any help!

BR
CL