@@ -298,7 +298,7 @@ - (void)callWithVideo:(BOOL)video
298298#endif
299299
300300 MXWeakify (self);
301- [self ->callStackCall createCall: self offer : ^(NSString *sdp) {
301+ [self ->callStackCall createOffer : ^(NSString *sdp) {
302302 MXStrongifyAndReturnIfNil (self);
303303
304304 [self setState: MXCallStateCreateOffer reason: nil ];
@@ -388,7 +388,7 @@ - (void)answer
388388 [self setState: MXCallStateConnecting reason: nil ];
389389
390390 MXWeakify (self);
391- [self ->callStackCall createAnswer: self success: ^(NSString *sdpAnswer) {
391+ [self ->callStackCall createAnswer: ^(NSString *sdpAnswer) {
392392 MXStrongifyAndReturnIfNil (self);
393393
394394 MXLogDebug (@" [MXCall][%@ ] answer - Created SDP:\n %@ " , self.callId , sdpAnswer);
@@ -840,7 +840,7 @@ - (void)setState:(MXCallState)state reason:(MXEvent *)event
840840 incoming: self .isIncoming];
841841
842842 // Terminate the call at the stack level
843- [callStackCall endCall: self ];
843+ [callStackCall end ];
844844 }
845845 else if (MXCallStateInviteSent == state)
846846 {
@@ -1158,7 +1158,7 @@ - (void)handleCallInvite:(MXEvent *)event
11581158 [self .audioOutputRouter reroute ];
11591159#endif
11601160
1161- [self ->callStackCall handleCall: self offer :self ->callInviteEventContent.offer.sdp
1161+ [self ->callStackCall handleAnswer :self ->callInviteEventContent.offer.sdp
11621162 success: ^{
11631163 MXStrongifyAndReturnIfNil (self);
11641164
@@ -1251,7 +1251,7 @@ - (void)handleCallAnswer:(MXEvent *)event
12511251 [self setState: MXCallStateConnecting reason: event];
12521252
12531253 MXWeakify (self);
1254- [self ->callStackCall handleAnswer: self offer: content.answer.sdp
1254+ [self ->callStackCall handleAnswer: content.answer.sdp
12551255 success: ^{}
12561256 failure: ^(NSError *error) {
12571257 MXStrongifyAndReturnIfNil (self);
@@ -1449,14 +1449,14 @@ - (void)handleCallNegotiate:(MXEvent *)event
14491449 self.isVideoCall = content.isVideoCall ;
14501450
14511451 MXWeakify (self);
1452- [self ->callStackCall handleCall: self offer : content.sessionDescription.sdp
1452+ [self ->callStackCall handleOffer : content.sessionDescription.sdp
14531453 success: ^{
14541454 MXStrongifyAndReturnIfNil (self);
14551455
14561456 // TODO: Get offer type from handleOffer and decide auto-accept it or not
14571457 // auto-accept negotiations for now
14581458 MXWeakify (self);
1459- [self ->callStackCall createAnswer: self success: ^(NSString * _Nonnull sdpAnswer) {
1459+ [self ->callStackCall createAnswer: ^(NSString * _Nonnull sdpAnswer) {
14601460 MXStrongifyAndReturnIfNil (self);
14611461
14621462 MXLogDebug (@" [MXCall][%@ ] handleCallNegotiate: answer negotiation - Created SDP:\n %@ " , self.callId , sdpAnswer);
@@ -1497,7 +1497,7 @@ - (void)handleCallNegotiate:(MXEvent *)event
14971497 else if (content.sessionDescription .type == MXCallSessionDescriptionTypeAnswer)
14981498 {
14991499 MXWeakify (self);
1500- [self ->callStackCall handleAnswer: self offer: content.sessionDescription.sdp
1500+ [self ->callStackCall handleAnswer: content.sessionDescription.sdp
15011501 success: ^{}
15021502 failure: ^(NSError *error) {
15031503 MXStrongifyAndReturnIfNil (self);
@@ -1631,7 +1631,7 @@ - (void)terminateWithReason:(MXEvent *)event
16311631 localIceGatheringTimer = nil ;
16321632
16331633 // Terminate the call at the stack level
1634- [callStackCall endCall: self ];
1634+ [callStackCall end ];
16351635
16361636 // Determine call end reason
16371637 if (event)
@@ -1731,7 +1731,7 @@ - (void)expireCallInvite
17311731 if (!_isIncoming)
17321732 {
17331733 // Terminate the call at the stack level we initiated
1734- [callStackCall endCall: self ];
1734+ [callStackCall end ];
17351735 }
17361736
17371737 // If the call is not aleady ended
0 commit comments