Skip to content

Commit

Permalink
Merge pull request #6 from ImAshishRastogi/main
Browse files Browse the repository at this point in the history
release/1.0.4
  • Loading branch information
AshishRastogiAtExotel authored May 20, 2024
2 parents 922c533 + 5c36948 commit 0550870
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 2 deletions.
1 change: 1 addition & 0 deletions Exotel-Voice-Sample/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file.
* [AP2AP-245](https://exotel.atlassian.net/browse/AP2AP-245) : using new bluetooth toggeling APIs to topgle audio
* [AP2AP-207](https://exotel.atlassian.net/browse/AP2AP-207) : integrated call kit UI
* [VST-668](https://exotel.atlassian.net/browse/VST-668) : resolved ios simulator build issue and added xcframework .
* using new stop and onDeitinialized API introduced in sdk version 1.0.4

## [v1.0 build 92] 28-08-2023

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public class VoiceAppService {
VoiceAppLogger.debug(TAG: TAG, message: "Start: De-Initialize Voice App Service")

UserDefaults.standard.reset()
reset()
stop()

if exotelVoiceClient?.isInitialized() ?? false {
VoiceAppLogger.error(TAG: TAG, message: "Failed to De-Initialize Voice App Service")
Expand Down Expand Up @@ -145,6 +145,23 @@ public class VoiceAppService {
VoiceAppLogger.debug(TAG: TAG, message: "End: Reset in Sample App Service")
}

public func stop() {
VoiceAppLogger.debug(TAG: TAG, message: "Stop Sample application Service")

if(nil == exotelVoiceClient || !(exotelVoiceClient?.isInitialized() ?? false)) {
VoiceAppLogger.debug(TAG: TAG, message: "SDK is not yet initialized")
}
do {
try exotelVoiceClient?.stop()
} catch let resetError as ExotelVoiceError {
VoiceAppLogger.debug(TAG: TAG, message: "Exception in stop: \(resetError.getErrorMessage())")
} catch let error {
VoiceAppLogger.debug(TAG: TAG, message: "\(error.localizedDescription)")
}

VoiceAppLogger.debug(TAG: TAG, message: "End: Stop in Sample App Service")
}

private func dialSDK(destination: String, _ message: String) throws -> Call? {
var call: Call?
VoiceAppLogger.debug(TAG: TAG, message: "In Dial API in Sample Service, SDK state: \(exotelVoiceClient?.isInitialized() ?? false)")
Expand Down Expand Up @@ -392,10 +409,15 @@ extension VoiceAppService: ExotelVoiceClientEventListener {
}

public func onInitializationFailure(error: ExotelVoiceError) {
VoiceAppLogger.debug(TAG: TAG, message: "Initialization Failure")
VoiceAppLogger.debug(TAG: TAG, message: "Initialization Failure : \(error.getErrorMessage())")
NotificationCenter.default.post(name: NSNotification.Name(rawValue: initFailedKey), object: nil, userInfo: ["payload": error])
}

public func onDeinitialized() {
VoiceAppLogger.debug(TAG: TAG, message: "onDeinitialized")
NotificationCenter.default.post(name: NSNotification.Name(rawValue: initFailedKey), object: nil, userInfo: ["payload": "deinialized"])
}

public func onLog(level: LogLevel, tag: String, message: String) {
if (LogLevel.DEBUG == level) {
VoiceAppLogger.debug(TAG: tag, message: message)
Expand Down
14 changes: 14 additions & 0 deletions Exotel-Voice-Sample/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
PWD=$(shell pwd)
get_latest_version_cmd := curl --silent https://github.com/exotel/exotel-voip-sdk-ios/releases | grep -o '\/tag\/.*' | awk -F'[<>]' '{print $$2}' | head -n 1
EXOTEL_SDK_VERSION := $(shell $(get_latest_version_cmd))
GIT_URL := https://github.com/exotel/exotel-voip-sdk-ios/releases/download/$(EXOTEL_SDK_VERSION)/ExotelVoice-$(EXOTEL_SDK_VERSION).tar.gz

clean :
rm -rf ExotelVoice.xcframework
deps: clean
curl -L $(GIT_URL) -o ExotelVoice.tar.gz
tar -xzf ExotelVoice.tar.gz
rm -rf *.tar.gz
rm -rf __MACOSX

echo "Latest version: $latest_version"
Binary file added SDK/ExotelVoice-1.0.4.tar.gz
Binary file not shown.
Binary file removed SDK/ExotelVoice.-1.0.3.xcframework.zip
Binary file not shown.

0 comments on commit 0550870

Please sign in to comment.