Created
May 20, 2015 07:21
-
-
Save hasham2/231f8cd79b2113ea418e to your computer and use it in GitHub Desktop.
This is how call session is being initiated however the parameter has passed to method does not contain required values
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # this is where call session is started from but the parameter hash does | |
| # contain the required key / values | |
| def startCallSession(data) | |
| @current_call.callSessionId = data['sessionId'] | |
| updateCallStatus('call started') | |
| callScreen = InCallScreen.new(nav_bar: false, modal: true) | |
| callScreen.connectWith(data['sessionId'], andToken: data['token']) | |
| callScreen.client_time_available = data['fromSecondsAvailable'] | |
| App.delegate.presentModal(callScreen) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Apparently the didAccept method calls the startCallSession in Call Manager class | |
| def didAccept | |
| SystemSounds.stop() | |
| CC.notifier.show('Accepting Call') | |
| request = SocketTimerRequest.alloc.init(CommClear::SocketManager::Event::CALL_ACCEPT, @incomingCallData) do |msg| | |
| CC.notifier.dismiss | |
| User.current.goBusy | |
| parent_screen.dismissViewControllerAnimated(true, completion: lambda { | |
| # here is start Call Session is being called from | |
| CC.callManager.startCallSession(msg) | |
| }) | |
| end | |
| request.fireWithTimeout(30) do | |
| CC.notifier.dismiss | |
| User.current.goOnline | |
| CC.callManager.callAcceptFailed | |
| close | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment