Question

I have kannel installed on my Server and I am using it to connect to an SMS Gateway using SMPP. When I am trying to send an SMS with "%" the SMS is not sent. But without "%" it works fine. Thanks

I have found a solution by converting the message to HTML using urlencode($message)

Cheers ^_^

Was it helpful?

Solution 2

I believe kannel is XML and as such, you must escape a percentage %.

Try replacing % with %

OTHER TIPS

You can also achieve it by changing the character-set default by adding following in your kannel.conf file

alt-charset = "ASCII"

use http method,

CALL METHOD cl_http_client=>if_http_client~escape_url

  EXPORTING

       unescaped = I_MESSAGE

   receiving

       escaped   = temp_str
     .

i_message is a message without URL content. input message along with special characters to this method, it will convert those characters which will avoid error.

try using %25 instead of % this is based on url encoding. it worked for me

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top