wrote out some logic using voipms to get sms messages and configure did numbers to use sms
This commit is contained in:
parent
4ddb1d3446
commit
0107ed6e84
1 changed files with 16 additions and 0 deletions
16
app/sms.py
Normal file
16
app/sms.py
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
from voipms.api import Client
|
||||||
|
|
||||||
|
def get_sms(client, did):
|
||||||
|
params = {
|
||||||
|
"did":did,
|
||||||
|
"type":1,
|
||||||
|
"all_messages":1
|
||||||
|
}
|
||||||
|
return client.dids.sms.fetch(params=params)
|
||||||
|
|
||||||
|
def enable_sms(client, did):
|
||||||
|
params = {
|
||||||
|
"did":did,
|
||||||
|
"enable":1,
|
||||||
|
}
|
||||||
|
return client.dids.sms.set(params=params)
|
Loading…
Reference in a new issue