If using the http API the international '+' character of phone number is lost. M

Home Forums iSMS If using the http API the international '+' character of phone number is lost. M

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #6130
    Arnd –
    Participant

    Hi all,
    I have an issue if I use the HTTP API to send a message. The ‘+’ character of the phone number is lost.
    FW: 1.51.28
    International numbers are allowed.

    Example API:
    http://192.168.2.1:81/sendmsg?user=admin&passwd=admin&cat=1&to=”+49175xxxxxxx”&text=”Test-Text”

    The message will not be send. In the logs I find the following:

    SMS Failure Logs
    Dec 11 16:05:08 modem: faillog: [FAILED TO] : 49175xxxxxxx : [MSG] : “Test-Text”

    SMS Live Log
    Dec 11 16:01:34 modem: livelog: [SEND] : AT+CMGS=49175xxxxxxx
    Dec 11 16:01:35 modem: livelog: [RECV] :
    >
    Dec 11 16:01:35 modem: livelog: [SEND] : “Test-Text”
    Dec 11 16:02:35 modem: livelog: [SEND] : AT+CMGS=49175xxxxxxx
    Dec 11 16:02:36 modem: livelog: [RECV] :
    >
    Dec 11 16:02:36 modem: livelog: [SEND] : “Test-Text”
    Dec 11 16:03:36 modem: livelog: [SEND] : AT+CMGS=49175xxxxxxx
    Dec 11 16:03:37 modem: livelog: [RECV] :
    >
    Dec 11 16:03:37 modem: livelog: [SEND] : “Test-Text”
    Dec 11 16:04:37 modem: livelog: [SEND] : AT+CMGS=49175xxxxxxx
    Dec 11 16:04:38 modem: livelog: [RECV] :
    >
    Dec 11 16:04:38 modem: livelog: [SEND] : “Test-Text”
    Dec 11 16:05:08 modem: livelog: [SEND] : AT+CFUN=0
    Dec 11 16:05:09 modem: livelog: [SEND] : AT+CFUN=0
    Dec 11 16:05:10 modem: livelog: [RECV] :
    +CME ERROR: 515
    OK
    Dec 11 16:05:10 modem: livelog: [SEND] : Modem Reset successful
    Dec 11 16:05:13 modem: livelog: [SEND] : ATE0
    Dec 11 16:05:16 modem: livelog: [RECV] :
    OK

    If I send a message via the web interface the ‘+’ character is available and all looks OK:

    SMS Live Log
    Dec 11 16:06:08 modem: livelog: [SEND] : AT+CMGS=+49175xxxxxxx
    Dec 11 16:06:09 modem: livelog: [RECV] :
    >
    Dec 11 16:06:09 modem: livelog: [SEND] : test
    Dec 11 16:06:13 modem: livelog: [RECV] :
    +CMGS: 106

    Do I have to change some settings?….

    Thanks,
    Arnd

    #6131
    Bryon Davis
    Moderator

    Hi Arnd,

    The + sign should be URL encoded as %2B in HTTP API requests.

    Try:
    http://192.168.2.1:81/sendmsg?user=admin&passwd=admin&cat=1&to=“%2B49175xxxxxxx”&text=”Test-Text”

    Regards,
    Bryon

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.