Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
 into main
  • Loading branch information
Asahel-code committed Jun 29, 2023
2 parents 51ff5eb + e596798 commit 037c3b7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
19 changes: 16 additions & 3 deletions main.py → app.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ def ussd_callback():
service_code = request.values.get("serviceCode", None)
phone_number = request.values.get("phoneNumber", None)
text = request.values.get("text", "default")
<<<<<<< HEAD:main.py
=======
sms_phone_number = ["+254742079321"]
sms_phone_number.append(phone_number)
>>>>>>> e5967983369b587ce2d5b1e3f2bcbe6989d1b723:app.py

call_back_client(phone_number)

Expand All @@ -42,7 +47,11 @@ def ussd_callback():
response += "4. Mater Hospital"

elif text == "3":
<<<<<<< HEAD:main.py
call_to = "+2547********"
=======
call_to = "+254742079321"
>>>>>>> e5967983369b587ce2d5b1e3f2bcbe6989d1b723:app.py
make_call = VOICE(call_to)
make_call.call()

Expand All @@ -53,28 +62,32 @@ def ussd_callback():

# sub sub menu
elif text == "2*1":
<<<<<<< HEAD:main.py
call_to = "+2547********"
=======
call_to = "+254742079321"
>>>>>>> e5967983369b587ce2d5b1e3f2bcbe6989d1b723:app.py
make_call = VOICE(call_to)
make_call.call()

response = "END Call has been initiated. Please be patient as we connect you to Kenyatta Hospital."

elif text == "2*2":
call_to = "+2547*********"
call_to = "+254742079321"
make_call = VOICE(call_to)
make_call.call()

response = "END Call has been initiated. Please be patient as we connect you to Mama Lucy Hospital."

elif text == "2*3":
call_to = "+2547*********"
call_to = "+254742079321"
make_call = VOICE(call_to)
make_call.call()

response = "END Call has been initiated. Please be patient as we connect you to Mbagathi Hospital."

elif text == "2*4":
call_to = "+2547*********"
call_to = "+254742079321"
make_call = VOICE(call_to)
make_call.call()

Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
flask
africastalking
python-dotenv
python-dotenv
gunicorn

0 comments on commit 037c3b7

Please sign in to comment.