wrote out some logic using voipms to get sms messages and configure did numbers to use sms

This commit is contained in:
anons-voip 2024-06-10 21:08:03 -04:00
parent 4ddb1d3446
commit 0107ed6e84

16
app/sms.py Normal file
View 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)