add group SMS
This commit is contained in:
parent
7c9c1fcd3b
commit
7002b4bf0d
|
|
@ -7203,9 +7203,16 @@ Name: <strong>''' + p.name + '''</strong> - Port: <strong>''' + str(
|
|||
print(u_role.role_id)
|
||||
if u_role.role_id == 1 or allow_user_sms == True:
|
||||
# def sms_que_add(_snd_call, _rcv_call, _snd_id, _rcv_id, _msg_type, _call_type, _server, _system_name, _msg):
|
||||
if api_data['type'] == 'group':
|
||||
sms_que_add(user, '', 0, api_data['dmr_id'], 'motorola', 'group', api_data['gateway'], '', 'From: ' + user + '. ' + api_data['sms'])
|
||||
msg = jsonify(status='Sucess',
|
||||
reason='Added Group SMS to que')
|
||||
response = make_response(msg, 200)
|
||||
|
||||
else:
|
||||
sms_que_add(user, '', 0, api_data['dmr_id'], 'motorola', 'unit', api_data['gateway'], '', 'From: ' + user + '. ' + api_data['sms'])
|
||||
msg = jsonify(status='Sucess',
|
||||
reason='Added SMS to que')
|
||||
reason='Added UNIT SMS to que')
|
||||
response = make_response(msg, 200)
|
||||
else:
|
||||
msg = jsonify(status='SMS disabled',
|
||||
|
|
|
|||
|
|
@ -1 +1,5 @@
|
|||
# UNIT SMS
|
||||
curl --header "Content-Type: application/json" --request POST --data '{"gateway": "Data", "dmr_id": 1234567, "sms": "this is a test"}' http://localhost:8080/api/<your_call>/<your_api_key>
|
||||
|
||||
#Group SMS
|
||||
curl --header "Content-Type: application/json" --request POST --data '{"gateway": "Data", "dmr_id": 1234567, "type":"group", "sms": "this is a test"}' http://localhost:8080/api/<your_call>/<your_api_key>
|
||||
|
|
|
|||
Loading…
Reference in New Issue