New gateway Dinstar

(Dennis Van Brusselen) #1


For the last couple of days i’m trying to configure a new SMS gateway with a DINSTAR DWG2000D.

Dinstar has a nice and understandable API. HTTP for transport, JSON for the data…

Some examples;

2.1 Request POST http://gateway_ip/api/send_sms

text= content
port= sim card port for sending
param array= user_id , number,

The only problem i’m facing for the moment is that there is an http digest authentication configured on the Dinstar gateway, i don’t have the possibility to send username and password over the API interface.

GET /api/send_sms?text=%23param%23&number=&param=text_param&param=user_id&param=number&user=&text_param=&password=*&port=0&port=1&port=2&port=3&port=4&port=5&port=6&port=7&port=8&port=9&port=10&port=11 HTTP/1.1

HTTP/1.1 401 Unauthorized

Is there a possibility to send the credentials first to the Dinstar ?

When i launch this CURL script it works perfectly.

curl -i -H “Accept: application/json” -H “Content-Type: application/json” -X POST -d ‘{“user-id”:“13”,“text”:"#param#",“port”:[0,1,2,3,4,5,6,7,8,9,10,11],“param”:[{“number”:"*********",“text_param”:["******TEST"],“user_id”:100}]}’ -u USER:PASSWORD http://192.168.X.X/api/send_sms/

Can someone tell me where i can find the configuration files for all the different gateways in playsms?


(Anton Raharja) #2

Usually in registry or their own db table. Checkout Kannel gateway plugin, the use of registry functions.


(Haroon Rashidi) #3

I am trying to send sms with Dinstar DWG-2000-1G new api with http address but not working

please help me

(Omar Dione) #4

Hello anton please can you help me i have the same problem as Dennis_Van_Brusselen. When i try to access to API the response i received is 401 Unauthorized.

(Edilson Spessoto) #5

Hello Omar.

I think you have to modify playSMS so that it sends first the Dinstar´s needed authentication.

(Omar Dione) #6

Hi Edilson,

Please can u show me how to achieve this? Following the new API user guide I use Gateway gateway = new Gateway(host, port, userAuth, passwdAuth). How can I modify playSMS to send first Dinstar’s needed authentication?