@@ -1005,9 +1005,43 @@ def dial(self, session_id, token, sip_uri, options=[]):
1005
1005
Boolean 'secure': A Boolean flag that indicates whether the media must be transmitted
1006
1006
encrypted (true) or not (false, the default)
1007
1007
1008
- :rtype: A SipCall object, which contains data of the SIP call: id, connectionId and streamId
1008
+ Boolean 'observeForceMute': A Boolean flag that determines whether the SIP endpoint should
1009
+ honor the force mute action. Defaults to False if moderator does not want to observe force
1010
+ mute a stream and set to True if the moderator wants to observe force mute a stream.
1011
+
1012
+ This is an example of what the payload POST data body could look like:
1013
+
1014
+ {
1015
+ "sessionId": "Your OpenTok session ID",
1016
+ "token": "Your valid OpenTok token",
1017
+ "sip": {
1018
+ "uri": "sip:[email protected] ;transport=tls",
1019
+
1020
+ "headers": {
1021
+ "headerKey": "headerValue"
1022
+ },
1023
+ "auth": {
1024
+ "username": "username",
1025
+ "password": "password"
1026
+ },
1027
+ "secure": true|false,
1028
+ "observeForceMute": true|false
1029
+ }
1030
+ }
1031
+
1032
+ :rtype: A SipCall object, which contains data of the SIP call: id, connectionId and streamId.
1033
+ This is what the response body should look like after returning with a status code of 200:
1034
+
1035
+ {
1036
+ "id": "b0a5a8c7-dc38-459f-a48d-a7f2008da853",
1037
+ "connectionId": "e9f8c166-6c67-440d-994a-04fb6dfed007",
1038
+ "streamId": "482bce73-f882-40fd-8ca5-cb74ff416036",
1039
+ }
1040
+
1041
+ Note: Your response will have a different: id, connectionId and streamId
1009
1042
"""
1010
1043
payload = {"sessionId" : session_id , "token" : token , "sip" : {"uri" : sip_uri }}
1044
+ observeForceMute = False
1011
1045
1012
1046
if "from" in options :
1013
1047
payload ["sip" ]["from" ] = options ["from" ]
@@ -1021,6 +1055,11 @@ def dial(self, session_id, token, sip_uri, options=[]):
1021
1055
if "secure" in options :
1022
1056
payload ["sip" ]["secure" ] = options ["secure" ]
1023
1057
1058
+ if "observeForceMute" in options :
1059
+ observeForceMute = True
1060
+ payload ["sip" ]["observeForceMute" ] = options ["observeForceMute" ]
1061
+
1062
+
1024
1063
endpoint = self .endpoints .dial_url ()
1025
1064
1026
1065
logger .debug (
0 commit comments