@@ -1005,9 +1005,43 @@ def dial(self, session_id, token, sip_uri, options=[]):
10051005 Boolean 'secure': A Boolean flag that indicates whether the media must be transmitted
10061006 encrypted (true) or not (false, the default)
10071007
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
10091042 """
10101043 payload = {"sessionId" : session_id , "token" : token , "sip" : {"uri" : sip_uri }}
1044+ observeForceMute = False
10111045
10121046 if "from" in options :
10131047 payload ["sip" ]["from" ] = options ["from" ]
@@ -1021,6 +1055,10 @@ def dial(self, session_id, token, sip_uri, options=[]):
10211055 if "secure" in options :
10221056 payload ["sip" ]["secure" ] = options ["secure" ]
10231057
1058+ if "observeForceMute" in options :
1059+ observeForceMute = True
1060+ payload ["sip" ]["observeForceMute" ] = options ["observeForceMute" ]
1061+
10241062 endpoint = self .endpoints .dial_url ()
10251063
10261064 logger .debug (
0 commit comments