@telnyx/react-voice-commons-sdk 0.1.4 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -16
- package/README.md +469 -469
- package/TelnyxVoiceCommons.podspec +31 -31
- package/android/build/.transforms/35d64beab84343a7420320f8057c40b9/results.bin +1 -0
- package/android/build/.transforms/35d64beab84343a7420320f8057c40b9/transformed/classes/classes_dex/classes.dex +0 -0
- package/android/build/.transforms/81896f393ea3c2e44a76283db01ad461/results.bin +1 -0
- package/android/build/.transforms/81896f393ea3c2e44a76283db01ad461/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/BuildConfig.dex +0 -0
- package/android/build/.transforms/81896f393ea3c2e44a76283db01ad461/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/CallForegroundService$Companion.dex +0 -0
- package/android/build/.transforms/81896f393ea3c2e44a76283db01ad461/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/CallForegroundService.dex +0 -0
- package/android/build/.transforms/81896f393ea3c2e44a76283db01ad461/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/TelnyxFirebaseMessagingService.dex +0 -0
- package/android/build/.transforms/81896f393ea3c2e44a76283db01ad461/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/TelnyxMainActivity$Companion.dex +0 -0
- package/android/build/.transforms/81896f393ea3c2e44a76283db01ad461/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/TelnyxMainActivity.dex +0 -0
- package/android/build/.transforms/81896f393ea3c2e44a76283db01ad461/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/TelnyxNotificationActionReceiver.dex +0 -0
- package/android/build/.transforms/81896f393ea3c2e44a76283db01ad461/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/TelnyxNotificationHelper$Companion.dex +0 -0
- package/android/build/.transforms/81896f393ea3c2e44a76283db01ad461/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/TelnyxNotificationHelper.dex +0 -0
- package/android/build/.transforms/81896f393ea3c2e44a76283db01ad461/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/VoicePnBridgeModule$Companion.dex +0 -0
- package/android/build/.transforms/81896f393ea3c2e44a76283db01ad461/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/VoicePnBridgeModule.dex +0 -0
- package/android/build/.transforms/81896f393ea3c2e44a76283db01ad461/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/VoicePnBridgePackage.dex +0 -0
- package/android/build/.transforms/81896f393ea3c2e44a76283db01ad461/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/VoicePnManager.dex +0 -0
- package/android/build/.transforms/81896f393ea3c2e44a76283db01ad461/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
- package/android/build/.transforms/8ebc6907344eccd2b9c23d903854d4fb/results.bin +1 -0
- package/android/build/.transforms/8ebc6907344eccd2b9c23d903854d4fb/transformed/classes/classes_dex/classes.dex +0 -0
- package/android/build/.transforms/af1ab9e262e91ec4942977987fb9a0ae/results.bin +1 -0
- package/android/build/.transforms/af1ab9e262e91ec4942977987fb9a0ae/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/BuildConfig.dex +0 -0
- package/android/build/.transforms/af1ab9e262e91ec4942977987fb9a0ae/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/TelnyxFirebaseMessagingService.dex +0 -0
- package/android/build/.transforms/af1ab9e262e91ec4942977987fb9a0ae/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/TelnyxMainActivity$Companion.dex +0 -0
- package/android/build/.transforms/af1ab9e262e91ec4942977987fb9a0ae/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/TelnyxMainActivity.dex +0 -0
- package/android/build/.transforms/af1ab9e262e91ec4942977987fb9a0ae/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/TelnyxNotificationActionReceiver.dex +0 -0
- package/android/build/.transforms/af1ab9e262e91ec4942977987fb9a0ae/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/TelnyxNotificationHelper$Companion.dex +0 -0
- package/android/build/.transforms/af1ab9e262e91ec4942977987fb9a0ae/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/TelnyxNotificationHelper.dex +0 -0
- package/android/build/.transforms/af1ab9e262e91ec4942977987fb9a0ae/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/VoicePnBridgeModule.dex +0 -0
- package/android/build/.transforms/af1ab9e262e91ec4942977987fb9a0ae/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/VoicePnBridgePackage.dex +0 -0
- package/android/build/.transforms/af1ab9e262e91ec4942977987fb9a0ae/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/VoicePnManager.dex +0 -0
- package/android/build/.transforms/af1ab9e262e91ec4942977987fb9a0ae/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
- package/android/build/generated/source/buildConfig/debug/com/telnyx/react_voice_commons/BuildConfig.java +10 -0
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +42 -0
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +18 -0
- package/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +6 -0
- package/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +1 -0
- package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
- package/android/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +0 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +1 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +2 -0
- package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +2 -0
- package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +2 -0
- package/android/build/intermediates/incremental/packageDebugAssets/merger.xml +2 -0
- package/android/build/intermediates/java_res/debug/processDebugJavaRes/out/META-INF/telnyx_react-voice-commons-sdk_debug.kotlin_module +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/telnyx/react_voice_commons/BuildConfig.class +0 -0
- package/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +2 -0
- package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +75 -0
- package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +42 -0
- package/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +1 -0
- package/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +1 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/META-INF/telnyx_react-voice-commons-sdk_debug.kotlin_module +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/telnyx/react_voice_commons/BuildConfig.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/telnyx/react_voice_commons/CallForegroundService$Companion.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/telnyx/react_voice_commons/CallForegroundService.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/telnyx/react_voice_commons/TelnyxFirebaseMessagingService.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/telnyx/react_voice_commons/TelnyxMainActivity$Companion.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/telnyx/react_voice_commons/TelnyxMainActivity.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/telnyx/react_voice_commons/TelnyxNotificationActionReceiver.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/telnyx/react_voice_commons/TelnyxNotificationHelper$Companion.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/telnyx/react_voice_commons/TelnyxNotificationHelper.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/telnyx/react_voice_commons/VoicePnBridgeModule$Companion.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/telnyx/react_voice_commons/VoicePnBridgeModule.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/telnyx/react_voice_commons/VoicePnBridgePackage.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/telnyx/react_voice_commons/VoicePnManager.class +0 -0
- package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +1 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +2 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
- package/android/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
- package/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
- package/android/build/outputs/logs/manifest-merger-debug-report.txt +82 -0
- package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/android/build/tmp/kotlin-classes/debug/META-INF/telnyx_react-voice-commons-sdk_debug.kotlin_module +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/telnyx/react_voice_commons/CallForegroundService$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/telnyx/react_voice_commons/CallForegroundService.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/telnyx/react_voice_commons/TelnyxFirebaseMessagingService.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/telnyx/react_voice_commons/TelnyxMainActivity$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/telnyx/react_voice_commons/TelnyxMainActivity.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/telnyx/react_voice_commons/TelnyxNotificationActionReceiver.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/telnyx/react_voice_commons/TelnyxNotificationHelper$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/telnyx/react_voice_commons/TelnyxNotificationHelper.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/telnyx/react_voice_commons/VoicePnBridgeModule$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/telnyx/react_voice_commons/VoicePnBridgeModule.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/telnyx/react_voice_commons/VoicePnBridgePackage.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/telnyx/react_voice_commons/VoicePnManager.class +0 -0
- package/android/build.gradle +45 -0
- package/android/local.properties +8 -0
- package/android/src/main/AndroidManifest.xml +38 -0
- package/android/src/main/java/com/telnyx/react_voice_commons/CallForegroundService.kt +83 -0
- package/android/src/main/java/com/telnyx/react_voice_commons/TelnyxFirebaseMessagingService.kt +179 -0
- package/android/src/main/java/com/telnyx/react_voice_commons/TelnyxMainActivity.kt +216 -0
- package/android/src/main/java/com/telnyx/react_voice_commons/TelnyxNotificationActionReceiver.kt +177 -0
- package/android/src/main/java/com/telnyx/react_voice_commons/TelnyxNotificationHelper.kt +277 -0
- package/android/src/main/java/com/telnyx/react_voice_commons/VoicePnBridgeModule.kt +247 -0
- package/android/src/main/java/com/telnyx/react_voice_commons/VoicePnBridgePackage.kt +17 -0
- package/android/src/main/java/com/telnyx/react_voice_commons/VoicePnManager.kt +154 -0
- package/ios/CallKitBridge.m +43 -43
- package/ios/CallKitBridge.swift +874 -874
- package/ios/VoicePnBridge.m +30 -30
- package/ios/VoicePnBridge.swift +86 -86
- package/lib/callkit/callkit-coordinator.d.ts +114 -110
- package/lib/callkit/callkit-coordinator.js +706 -664
- package/lib/callkit/callkit.d.ts +41 -41
- package/lib/callkit/callkit.js +242 -252
- package/lib/callkit/index.js +47 -15
- package/lib/callkit/use-callkit.d.ts +19 -19
- package/lib/callkit/use-callkit.js +310 -270
- package/lib/context/TelnyxVoiceContext.d.ts +9 -9
- package/lib/context/TelnyxVoiceContext.js +13 -10
- package/lib/hooks/use-callkit-coordinator.d.ts +17 -9
- package/lib/hooks/use-callkit-coordinator.js +50 -45
- package/lib/hooks/useAppReadyNotifier.js +15 -13
- package/lib/hooks/useAppStateHandler.d.ts +11 -6
- package/lib/hooks/useAppStateHandler.js +110 -95
- package/lib/index.d.ts +21 -3
- package/lib/index.js +201 -50
- package/lib/internal/CallKitHandler.d.ts +6 -6
- package/lib/internal/CallKitHandler.js +104 -96
- package/lib/internal/callkit-manager.d.ts +57 -57
- package/lib/internal/callkit-manager.js +316 -299
- package/lib/internal/calls/call-state-controller.d.ts +78 -73
- package/lib/internal/calls/call-state-controller.js +326 -265
- package/lib/internal/session/session-manager.d.ts +71 -71
- package/lib/internal/session/session-manager.js +437 -360
- package/lib/internal/user-defaults-helpers.js +39 -49
- package/lib/internal/voice-pn-bridge.d.ts +112 -104
- package/lib/internal/voice-pn-bridge.js +193 -203
- package/lib/models/call-state.d.ts +46 -46
- package/lib/models/call-state.js +74 -70
- package/lib/models/call.d.ts +173 -157
- package/lib/models/call.js +492 -448
- package/lib/models/config.d.ts +18 -11
- package/lib/models/config.js +35 -37
- package/lib/models/connection-state.d.ts +10 -10
- package/lib/models/connection-state.js +16 -16
- package/lib/telnyx-voice-app.d.ts +28 -28
- package/lib/telnyx-voice-app.js +561 -509
- package/lib/telnyx-voip-client.d.ts +174 -167
- package/lib/telnyx-voip-client.js +397 -385
- package/package.json +116 -115
- package/src/callkit/callkit-coordinator.ts +830 -830
- package/src/internal/calls/call-state-controller.ts +407 -407
- package/src/internal/session/session-manager.ts +483 -483
- package/src/internal/voice-pn-bridge.ts +266 -266
- package/src/models/call-state.ts +105 -105
- package/src/models/call.ts +502 -502
- package/src/telnyx-voice-app.tsx +787 -788
- package/src/telnyx-voip-client.ts +551 -551
- package/src/types/telnyx-sdk.d.ts +93 -93
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3
3
|
exports.TelnyxVoipClient = void 0;
|
|
4
4
|
exports.createTelnyxVoipClient = createTelnyxVoipClient;
|
|
5
5
|
exports.createBackgroundTelnyxVoipClient = createBackgroundTelnyxVoipClient;
|
|
6
|
-
const connection_state_1 = require(
|
|
7
|
-
const config_1 = require(
|
|
8
|
-
const session_manager_1 = require(
|
|
9
|
-
const call_state_controller_1 = require(
|
|
6
|
+
const connection_state_1 = require('./models/connection-state');
|
|
7
|
+
const config_1 = require('./models/config');
|
|
8
|
+
const session_manager_1 = require('./internal/session/session-manager');
|
|
9
|
+
const call_state_controller_1 = require('./internal/calls/call-state-controller');
|
|
10
10
|
/**
|
|
11
11
|
* The main public interface for the react-voice-commons module.
|
|
12
12
|
*
|
|
@@ -19,412 +19,424 @@ const call_state_controller_1 = require("./internal/calls/call-state-controller"
|
|
|
19
19
|
* into their chosen state management solution naturally.
|
|
20
20
|
*/
|
|
21
21
|
class TelnyxVoipClient {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
22
|
+
/**
|
|
23
|
+
* Creates a new TelnyxVoipClient instance.
|
|
24
|
+
*
|
|
25
|
+
* @param options Configuration options for the client
|
|
26
|
+
*/
|
|
27
|
+
constructor(options = {}) {
|
|
28
|
+
this._disposed = false;
|
|
29
|
+
this._options = {
|
|
30
|
+
enableAppStateManagement: true,
|
|
31
|
+
debug: false,
|
|
32
|
+
...options,
|
|
33
|
+
};
|
|
34
|
+
// Initialize core components
|
|
35
|
+
this._sessionManager = new session_manager_1.SessionManager();
|
|
36
|
+
this._callStateController = new call_state_controller_1.CallStateController(
|
|
37
|
+
this._sessionManager
|
|
38
|
+
);
|
|
39
|
+
// Set up callback to initialize call state controller listeners when client is ready
|
|
40
|
+
this._sessionManager.setOnClientReady(() => {
|
|
41
|
+
console.log(
|
|
42
|
+
'🔧 TelnyxVoipClient: Client ready, initializing call state controller listeners'
|
|
43
|
+
);
|
|
44
|
+
this._callStateController.initializeClientListeners();
|
|
45
|
+
});
|
|
46
|
+
if (this._options.debug) {
|
|
47
|
+
console.log('TelnyxVoipClient initialized with options:', this._options);
|
|
45
48
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
49
|
+
}
|
|
50
|
+
// ========== Observable Streams ==========
|
|
51
|
+
/**
|
|
52
|
+
* Stream of connection state changes.
|
|
53
|
+
*
|
|
54
|
+
* Emits the current status of the connection to the Telnyx backend.
|
|
55
|
+
* Values include connecting, connected, disconnected, and error states.
|
|
56
|
+
* Listen to this to show connection indicators in your UI.
|
|
57
|
+
*/
|
|
58
|
+
get connectionState$() {
|
|
59
|
+
return this._sessionManager.connectionState$;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Stream of all current calls.
|
|
63
|
+
*
|
|
64
|
+
* Emits a list of all current Call objects. Use this for applications
|
|
65
|
+
* that need to support multiple simultaneous calls (e.g., call waiting,
|
|
66
|
+
* conference calls).
|
|
67
|
+
*/
|
|
68
|
+
get calls$() {
|
|
69
|
+
return this._callStateController.calls$;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Stream of the currently active call.
|
|
73
|
+
*
|
|
74
|
+
* A convenience stream that emits the currently active Call object.
|
|
75
|
+
* It emits null when no call is in progress. Ideal for applications
|
|
76
|
+
* that only handle a single call at a time.
|
|
77
|
+
*/
|
|
78
|
+
get activeCall$() {
|
|
79
|
+
return this._callStateController.activeCall$;
|
|
80
|
+
}
|
|
81
|
+
// ========== Synchronous State Access ==========
|
|
82
|
+
/**
|
|
83
|
+
* Current connection state (synchronous access).
|
|
84
|
+
*/
|
|
85
|
+
get currentConnectionState() {
|
|
86
|
+
return this._sessionManager.currentState;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Current list of calls (synchronous access).
|
|
90
|
+
*/
|
|
91
|
+
get currentCalls() {
|
|
92
|
+
return this._callStateController.currentCalls;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Current active call (synchronous access).
|
|
96
|
+
*/
|
|
97
|
+
get currentActiveCall() {
|
|
98
|
+
return this._callStateController.currentActiveCall;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Current session ID (UUID) for this connection.
|
|
102
|
+
*/
|
|
103
|
+
get sessionId() {
|
|
104
|
+
return this._sessionManager.sessionId;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Configuration options for this client instance.
|
|
108
|
+
*/
|
|
109
|
+
get options() {
|
|
110
|
+
return this._options;
|
|
111
|
+
}
|
|
112
|
+
// ========== Authentication Methods ==========
|
|
113
|
+
/**
|
|
114
|
+
* Connects to the Telnyx platform using credential authentication.
|
|
115
|
+
*
|
|
116
|
+
* @param config The credential configuration containing SIP username and password
|
|
117
|
+
* @returns A Promise that completes when the connection attempt is initiated
|
|
118
|
+
*
|
|
119
|
+
* Listen to connectionState$ to monitor the actual connection status.
|
|
120
|
+
* Credentials are automatically stored for future reconnection.
|
|
121
|
+
*/
|
|
122
|
+
async login(config) {
|
|
123
|
+
this._throwIfDisposed();
|
|
124
|
+
const errors = (0, config_1.validateConfig)(config);
|
|
125
|
+
if (errors.length > 0) {
|
|
126
|
+
throw new Error(`Invalid configuration: ${errors.join(', ')}`);
|
|
56
127
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
*
|
|
60
|
-
* Emits a list of all current Call objects. Use this for applications
|
|
61
|
-
* that need to support multiple simultaneous calls (e.g., call waiting,
|
|
62
|
-
* conference calls).
|
|
63
|
-
*/
|
|
64
|
-
get calls$() {
|
|
65
|
-
return this._callStateController.calls$;
|
|
128
|
+
if (this._options.debug) {
|
|
129
|
+
console.log('TelnyxVoipClient: Logging in with credentials for user:', config.sipUser);
|
|
66
130
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
131
|
+
// Store credentials for future reconnection
|
|
132
|
+
await this._storeCredentials(config);
|
|
133
|
+
await this._sessionManager.connectWithCredential(config);
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Connects to the Telnyx platform using token authentication.
|
|
137
|
+
*
|
|
138
|
+
* @param config The token configuration containing the authentication token
|
|
139
|
+
* @returns A Promise that completes when the connection attempt is initiated
|
|
140
|
+
*
|
|
141
|
+
* Listen to connectionState$ to monitor the actual connection status.
|
|
142
|
+
* Token is automatically stored for future reconnection.
|
|
143
|
+
*/
|
|
144
|
+
async loginWithToken(config) {
|
|
145
|
+
this._throwIfDisposed();
|
|
146
|
+
const errors = (0, config_1.validateConfig)(config);
|
|
147
|
+
if (errors.length > 0) {
|
|
148
|
+
throw new Error(`Invalid configuration: ${errors.join(', ')}`);
|
|
76
149
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
* Current connection state (synchronous access).
|
|
80
|
-
*/
|
|
81
|
-
get currentConnectionState() {
|
|
82
|
-
return this._sessionManager.currentState;
|
|
150
|
+
if (this._options.debug) {
|
|
151
|
+
console.log('TelnyxVoipClient: Logging in with token');
|
|
83
152
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
153
|
+
// Store token for future reconnection
|
|
154
|
+
await this._storeToken(config);
|
|
155
|
+
await this._sessionManager.connectWithToken(config);
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Disconnects from the Telnyx platform.
|
|
159
|
+
*
|
|
160
|
+
* This method terminates the connection, ends any active calls, and
|
|
161
|
+
* cleans up all related resources.
|
|
162
|
+
*/
|
|
163
|
+
async logout() {
|
|
164
|
+
if (this._disposed) {
|
|
165
|
+
return;
|
|
89
166
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
*/
|
|
93
|
-
get currentActiveCall() {
|
|
94
|
-
return this._callStateController.currentActiveCall;
|
|
167
|
+
if (this._options.debug) {
|
|
168
|
+
console.log('TelnyxVoipClient: Logging out');
|
|
95
169
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
170
|
+
await this._sessionManager.disconnect();
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Attempts to reconnect using previously stored configuration.
|
|
174
|
+
*
|
|
175
|
+
* This method is used for auto-reconnection scenarios where the app
|
|
176
|
+
* comes back to the foreground and needs to restore the connection.
|
|
177
|
+
*
|
|
178
|
+
* @returns Promise<boolean> - true if reconnection was successful, false otherwise
|
|
179
|
+
*/
|
|
180
|
+
async loginFromStoredConfig() {
|
|
181
|
+
this._throwIfDisposed();
|
|
182
|
+
if (this._options.debug) {
|
|
183
|
+
console.log('TelnyxVoipClient: Attempting to login from stored config');
|
|
101
184
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
* Credentials are automatically stored for future reconnection.
|
|
117
|
-
*/
|
|
118
|
-
async login(config) {
|
|
119
|
-
this._throwIfDisposed();
|
|
120
|
-
const errors = (0, config_1.validateConfig)(config);
|
|
121
|
-
if (errors.length > 0) {
|
|
122
|
-
throw new Error(`Invalid configuration: ${errors.join(', ')}`);
|
|
123
|
-
}
|
|
185
|
+
try {
|
|
186
|
+
// Try to retrieve stored credentials and token from AsyncStorage
|
|
187
|
+
const AsyncStorage = require('@react-native-async-storage/async-storage').default;
|
|
188
|
+
const storedUsername = await AsyncStorage.getItem('@telnyx_username');
|
|
189
|
+
const storedPassword = await AsyncStorage.getItem('@telnyx_password');
|
|
190
|
+
const storedCredentialToken = await AsyncStorage.getItem('@credential_token');
|
|
191
|
+
const storedPushToken = await AsyncStorage.getItem('@push_token');
|
|
192
|
+
// Check if we have credential-based authentication data
|
|
193
|
+
if (storedUsername && storedPassword) {
|
|
194
|
+
// Create credential config from stored data
|
|
195
|
+
const { createCredentialConfig } = require('./models/config');
|
|
196
|
+
const config = createCredentialConfig(storedUsername, storedPassword, {
|
|
197
|
+
pushNotificationDeviceToken: storedPushToken,
|
|
198
|
+
});
|
|
124
199
|
if (this._options.debug) {
|
|
125
|
-
|
|
200
|
+
console.log(
|
|
201
|
+
'TelnyxVoipClient: Reconnecting with stored credentials for user:',
|
|
202
|
+
storedUsername
|
|
203
|
+
);
|
|
126
204
|
}
|
|
127
|
-
// Store credentials for future reconnection
|
|
128
|
-
await this._storeCredentials(config);
|
|
129
205
|
await this._sessionManager.connectWithCredential(config);
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
*/
|
|
140
|
-
async loginWithToken(config) {
|
|
141
|
-
this._throwIfDisposed();
|
|
142
|
-
const errors = (0, config_1.validateConfig)(config);
|
|
143
|
-
if (errors.length > 0) {
|
|
144
|
-
throw new Error(`Invalid configuration: ${errors.join(', ')}`);
|
|
145
|
-
}
|
|
206
|
+
return true;
|
|
207
|
+
}
|
|
208
|
+
// Check if we have token-based authentication data
|
|
209
|
+
if (storedCredentialToken) {
|
|
210
|
+
// Create token config from stored data
|
|
211
|
+
const { createTokenConfig } = require('./models/config');
|
|
212
|
+
const config = createTokenConfig(storedCredentialToken, {
|
|
213
|
+
pushNotificationDeviceToken: storedPushToken,
|
|
214
|
+
});
|
|
146
215
|
if (this._options.debug) {
|
|
147
|
-
|
|
216
|
+
console.log('TelnyxVoipClient: Reconnecting with stored token');
|
|
148
217
|
}
|
|
149
|
-
// Store token for future reconnection
|
|
150
|
-
await this._storeToken(config);
|
|
151
218
|
await this._sessionManager.connectWithToken(config);
|
|
219
|
+
return true;
|
|
220
|
+
}
|
|
221
|
+
// No stored authentication data found
|
|
222
|
+
if (this._options.debug) {
|
|
223
|
+
console.log('TelnyxVoipClient: No stored credentials or token found');
|
|
224
|
+
}
|
|
225
|
+
return false;
|
|
226
|
+
} catch (error) {
|
|
227
|
+
if (this._options.debug) {
|
|
228
|
+
console.log('TelnyxVoipClient: Failed to login from stored config:', error);
|
|
229
|
+
}
|
|
230
|
+
return false;
|
|
152
231
|
}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
232
|
+
}
|
|
233
|
+
// ========== Call Management Methods ==========
|
|
234
|
+
/**
|
|
235
|
+
* Initiates a new outgoing call.
|
|
236
|
+
*
|
|
237
|
+
* @param destination The destination number or SIP URI to call
|
|
238
|
+
* @param callerName Optional caller name to display
|
|
239
|
+
* @param callerNumber Optional caller ID number
|
|
240
|
+
* @param customHeaders Optional custom headers to include with the call
|
|
241
|
+
* @returns A Promise that completes with the Call object once the invitation has been sent
|
|
242
|
+
*
|
|
243
|
+
* The call's state can be monitored through the returned Call object's streams.
|
|
244
|
+
*/
|
|
245
|
+
async newCall(destination, callerName, callerNumber, customHeaders) {
|
|
246
|
+
this._throwIfDisposed();
|
|
247
|
+
if (!destination || destination.trim() === '') {
|
|
248
|
+
throw new Error('Destination is required');
|
|
167
249
|
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
*
|
|
171
|
-
* This method is used for auto-reconnection scenarios where the app
|
|
172
|
-
* comes back to the foreground and needs to restore the connection.
|
|
173
|
-
*
|
|
174
|
-
* @returns Promise<boolean> - true if reconnection was successful, false otherwise
|
|
175
|
-
*/
|
|
176
|
-
async loginFromStoredConfig() {
|
|
177
|
-
this._throwIfDisposed();
|
|
178
|
-
if (this._options.debug) {
|
|
179
|
-
console.log('TelnyxVoipClient: Attempting to login from stored config');
|
|
180
|
-
}
|
|
181
|
-
try {
|
|
182
|
-
// Try to retrieve stored credentials and token from AsyncStorage
|
|
183
|
-
const AsyncStorage = require('@react-native-async-storage/async-storage').default;
|
|
184
|
-
const storedUsername = await AsyncStorage.getItem('@telnyx_username');
|
|
185
|
-
const storedPassword = await AsyncStorage.getItem('@telnyx_password');
|
|
186
|
-
const storedCredentialToken = await AsyncStorage.getItem('@credential_token');
|
|
187
|
-
const storedPushToken = await AsyncStorage.getItem('@push_token');
|
|
188
|
-
// Check if we have credential-based authentication data
|
|
189
|
-
if (storedUsername && storedPassword) {
|
|
190
|
-
// Create credential config from stored data
|
|
191
|
-
const { createCredentialConfig } = require('./models/config');
|
|
192
|
-
const config = createCredentialConfig(storedUsername, storedPassword, {
|
|
193
|
-
pushNotificationDeviceToken: storedPushToken,
|
|
194
|
-
});
|
|
195
|
-
if (this._options.debug) {
|
|
196
|
-
console.log('TelnyxVoipClient: Reconnecting with stored credentials for user:', storedUsername);
|
|
197
|
-
}
|
|
198
|
-
await this._sessionManager.connectWithCredential(config);
|
|
199
|
-
return true;
|
|
200
|
-
}
|
|
201
|
-
// Check if we have token-based authentication data
|
|
202
|
-
if (storedCredentialToken) {
|
|
203
|
-
// Create token config from stored data
|
|
204
|
-
const { createTokenConfig } = require('./models/config');
|
|
205
|
-
const config = createTokenConfig(storedCredentialToken, {
|
|
206
|
-
pushNotificationDeviceToken: storedPushToken,
|
|
207
|
-
});
|
|
208
|
-
if (this._options.debug) {
|
|
209
|
-
console.log('TelnyxVoipClient: Reconnecting with stored token');
|
|
210
|
-
}
|
|
211
|
-
await this._sessionManager.connectWithToken(config);
|
|
212
|
-
return true;
|
|
213
|
-
}
|
|
214
|
-
// No stored authentication data found
|
|
215
|
-
if (this._options.debug) {
|
|
216
|
-
console.log('TelnyxVoipClient: No stored credentials or token found');
|
|
217
|
-
}
|
|
218
|
-
return false;
|
|
219
|
-
}
|
|
220
|
-
catch (error) {
|
|
221
|
-
if (this._options.debug) {
|
|
222
|
-
console.log('TelnyxVoipClient: Failed to login from stored config:', error);
|
|
223
|
-
}
|
|
224
|
-
return false;
|
|
225
|
-
}
|
|
250
|
+
if (this.currentConnectionState !== connection_state_1.TelnyxConnectionState.CONNECTED) {
|
|
251
|
+
throw new Error(`Cannot make call when connection state is: ${this.currentConnectionState}`);
|
|
226
252
|
}
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
* Initiates a new outgoing call.
|
|
230
|
-
*
|
|
231
|
-
* @param destination The destination number or SIP URI to call
|
|
232
|
-
* @param callerName Optional caller name to display
|
|
233
|
-
* @param callerNumber Optional caller ID number
|
|
234
|
-
* @param customHeaders Optional custom headers to include with the call
|
|
235
|
-
* @returns A Promise that completes with the Call object once the invitation has been sent
|
|
236
|
-
*
|
|
237
|
-
* The call's state can be monitored through the returned Call object's streams.
|
|
238
|
-
*/
|
|
239
|
-
async newCall(destination, callerName, callerNumber, customHeaders) {
|
|
240
|
-
this._throwIfDisposed();
|
|
241
|
-
if (!destination || destination.trim() === '') {
|
|
242
|
-
throw new Error('Destination is required');
|
|
243
|
-
}
|
|
244
|
-
if (this.currentConnectionState !== connection_state_1.TelnyxConnectionState.CONNECTED) {
|
|
245
|
-
throw new Error(`Cannot make call when connection state is: ${this.currentConnectionState}`);
|
|
246
|
-
}
|
|
247
|
-
if (this._options.debug) {
|
|
248
|
-
console.log('TelnyxVoipClient: Creating new call to:', destination);
|
|
249
|
-
}
|
|
250
|
-
return await this._callStateController.newCall(destination, callerName, callerNumber, customHeaders);
|
|
253
|
+
if (this._options.debug) {
|
|
254
|
+
console.log('TelnyxVoipClient: Creating new call to:', destination);
|
|
251
255
|
}
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
if (currentState !== connection_state_1.TelnyxConnectionState.CONNECTED) {
|
|
274
|
-
// Try to login from stored config - now the push flags should be set
|
|
275
|
-
const loginSuccess = await this.loginFromStoredConfig();
|
|
276
|
-
if (!loginSuccess) {
|
|
277
|
-
console.warn('TelnyxVoipClient: Could not login from stored config for push notification');
|
|
278
|
-
return;
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
catch (error) {
|
|
283
|
-
console.error('TelnyxVoipClient: Error handling push notification:', error);
|
|
284
|
-
throw error;
|
|
285
|
-
}
|
|
256
|
+
return await this._callStateController.newCall(
|
|
257
|
+
destination,
|
|
258
|
+
callerName,
|
|
259
|
+
callerNumber,
|
|
260
|
+
customHeaders
|
|
261
|
+
);
|
|
262
|
+
}
|
|
263
|
+
// ========== Push Notification Methods ==========
|
|
264
|
+
/**
|
|
265
|
+
* Handle push notification payload.
|
|
266
|
+
*
|
|
267
|
+
* This is the unified entry point for all push notifications. It intelligently
|
|
268
|
+
* determines whether to show a new incoming call UI or to process an already
|
|
269
|
+
* actioned (accepted/declined) call upon app launch.
|
|
270
|
+
*
|
|
271
|
+
* @param payload The push notification payload
|
|
272
|
+
*/
|
|
273
|
+
async handlePushNotification(payload) {
|
|
274
|
+
this._throwIfDisposed();
|
|
275
|
+
if (this._options.debug) {
|
|
276
|
+
console.log('TelnyxVoipClient: Handling push notification:', payload);
|
|
286
277
|
}
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
278
|
+
try {
|
|
279
|
+
// First, pass the push notification to the session manager for processing
|
|
280
|
+
// This will set the isCallFromPush flag on the TelnyxRTC client
|
|
281
|
+
await this._sessionManager.handlePushNotification(payload);
|
|
282
|
+
// Connect if not already connected
|
|
283
|
+
const currentState = this.currentConnectionState;
|
|
284
|
+
if (currentState !== connection_state_1.TelnyxConnectionState.CONNECTED) {
|
|
285
|
+
// Try to login from stored config - now the push flags should be set
|
|
286
|
+
const loginSuccess = await this.loginFromStoredConfig();
|
|
287
|
+
if (!loginSuccess) {
|
|
288
|
+
console.warn(
|
|
289
|
+
'TelnyxVoipClient: Could not login from stored config for push notification'
|
|
290
|
+
);
|
|
291
|
+
return;
|
|
297
292
|
}
|
|
298
|
-
|
|
293
|
+
}
|
|
294
|
+
} catch (error) {
|
|
295
|
+
console.error('TelnyxVoipClient: Error handling push notification:', error);
|
|
296
|
+
throw error;
|
|
299
297
|
}
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* Disables push notifications for the current session.
|
|
301
|
+
*
|
|
302
|
+
* This method sends a request to the Telnyx backend to disable push
|
|
303
|
+
* notifications for the current registered device/session.
|
|
304
|
+
*/
|
|
305
|
+
disablePushNotifications() {
|
|
306
|
+
this._throwIfDisposed();
|
|
307
|
+
if (this._options.debug) {
|
|
308
|
+
console.log('TelnyxVoipClient: Disabling push notifications');
|
|
308
309
|
}
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
310
|
+
this._sessionManager.disablePushNotifications();
|
|
311
|
+
}
|
|
312
|
+
// ========== CallKit Integration Methods ==========
|
|
313
|
+
/**
|
|
314
|
+
* Set a call to connecting state (used for push notification calls when answered via CallKit)
|
|
315
|
+
* @param callId The ID of the call to set to connecting state
|
|
316
|
+
* @internal
|
|
317
|
+
*/
|
|
318
|
+
setCallConnecting(callId) {
|
|
319
|
+
this._callStateController.setCallConnecting(callId);
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* Find a call by its underlying Telnyx call object
|
|
323
|
+
* @param telnyxCall The Telnyx call object to find
|
|
324
|
+
* @internal
|
|
325
|
+
*/
|
|
326
|
+
findCallByTelnyxCall(telnyxCall) {
|
|
327
|
+
return this._callStateController.findCallByTelnyxCall(telnyxCall);
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* Queue an answer action for when the call invite arrives (for CallKit integration)
|
|
331
|
+
* This should be called when the user answers from CallKit before the socket connection is established
|
|
332
|
+
* @param customHeaders Optional custom headers to include with the answer
|
|
333
|
+
*/
|
|
334
|
+
queueAnswerFromCallKit(customHeaders = {}) {
|
|
335
|
+
this._throwIfDisposed();
|
|
336
|
+
if (this._options.debug) {
|
|
337
|
+
console.log('TelnyxVoipClient: Queuing answer action from CallKit', customHeaders);
|
|
316
338
|
}
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
if (this._options.debug) {
|
|
325
|
-
console.log('TelnyxVoipClient: Queuing answer action from CallKit', customHeaders);
|
|
326
|
-
}
|
|
327
|
-
const telnyxClient = this._sessionManager.telnyxClient;
|
|
328
|
-
if (telnyxClient && typeof telnyxClient.queueAnswerFromCallKit === 'function') {
|
|
329
|
-
telnyxClient.queueAnswerFromCallKit(customHeaders);
|
|
330
|
-
}
|
|
331
|
-
else {
|
|
332
|
-
console.warn('TelnyxVoipClient: TelnyxRTC client not available or method not found for queueAnswerFromCallKit');
|
|
333
|
-
}
|
|
339
|
+
const telnyxClient = this._sessionManager.telnyxClient;
|
|
340
|
+
if (telnyxClient && typeof telnyxClient.queueAnswerFromCallKit === 'function') {
|
|
341
|
+
telnyxClient.queueAnswerFromCallKit(customHeaders);
|
|
342
|
+
} else {
|
|
343
|
+
console.warn(
|
|
344
|
+
'TelnyxVoipClient: TelnyxRTC client not available or method not found for queueAnswerFromCallKit'
|
|
345
|
+
);
|
|
334
346
|
}
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
const telnyxClient = this._sessionManager.telnyxClient;
|
|
345
|
-
if (telnyxClient && typeof telnyxClient.queueEndFromCallKit === 'function') {
|
|
346
|
-
telnyxClient.queueEndFromCallKit();
|
|
347
|
-
}
|
|
348
|
-
else {
|
|
349
|
-
console.warn('TelnyxVoipClient: TelnyxRTC client not available or method not found for queueEndFromCallKit');
|
|
350
|
-
}
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* Queue an end action for when the call invite arrives (for CallKit integration)
|
|
350
|
+
* This should be called when the user ends from CallKit before the socket connection is established
|
|
351
|
+
*/
|
|
352
|
+
queueEndFromCallKit() {
|
|
353
|
+
this._throwIfDisposed();
|
|
354
|
+
if (this._options.debug) {
|
|
355
|
+
console.log('TelnyxVoipClient: Queuing end action from CallKit');
|
|
351
356
|
}
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
*/
|
|
360
|
-
dispose() {
|
|
361
|
-
if (this._disposed) {
|
|
362
|
-
return;
|
|
363
|
-
}
|
|
364
|
-
if (this._options.debug) {
|
|
365
|
-
console.log('TelnyxVoipClient: Disposing client');
|
|
366
|
-
}
|
|
367
|
-
this._disposed = true;
|
|
368
|
-
this._callStateController.dispose();
|
|
369
|
-
this._sessionManager.dispose();
|
|
357
|
+
const telnyxClient = this._sessionManager.telnyxClient;
|
|
358
|
+
if (telnyxClient && typeof telnyxClient.queueEndFromCallKit === 'function') {
|
|
359
|
+
telnyxClient.queueEndFromCallKit();
|
|
360
|
+
} else {
|
|
361
|
+
console.warn(
|
|
362
|
+
'TelnyxVoipClient: TelnyxRTC client not available or method not found for queueEndFromCallKit'
|
|
363
|
+
);
|
|
370
364
|
}
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
// Clear any existing token since we're using credentials
|
|
384
|
-
await AsyncStorage.removeItem('@credential_token');
|
|
385
|
-
if (this._options.debug) {
|
|
386
|
-
console.log('TelnyxVoipClient: Stored credentials for user:', config.sipUser);
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
catch (error) {
|
|
390
|
-
if (this._options.debug) {
|
|
391
|
-
console.log('TelnyxVoipClient: Failed to store credentials:', error);
|
|
392
|
-
}
|
|
393
|
-
// Don't throw here - storage failure shouldn't prevent login
|
|
394
|
-
}
|
|
365
|
+
}
|
|
366
|
+
// ========== Lifecycle Methods ==========
|
|
367
|
+
/**
|
|
368
|
+
* Dispose of the client and clean up all resources.
|
|
369
|
+
*
|
|
370
|
+
* After calling this method, the client instance should not be used anymore.
|
|
371
|
+
* This is particularly important for background clients that should be
|
|
372
|
+
* disposed after handling push notifications.
|
|
373
|
+
*/
|
|
374
|
+
dispose() {
|
|
375
|
+
if (this._disposed) {
|
|
376
|
+
return;
|
|
395
377
|
}
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
*/
|
|
399
|
-
async _storeToken(config) {
|
|
400
|
-
try {
|
|
401
|
-
const AsyncStorage = require('@react-native-async-storage/async-storage').default;
|
|
402
|
-
await AsyncStorage.setItem('@credential_token', config.token);
|
|
403
|
-
if (config.pushNotificationDeviceToken) {
|
|
404
|
-
await AsyncStorage.setItem('@push_token', config.pushNotificationDeviceToken);
|
|
405
|
-
}
|
|
406
|
-
// Clear any existing credentials since we're using token
|
|
407
|
-
await AsyncStorage.removeItem('@telnyx_username');
|
|
408
|
-
await AsyncStorage.removeItem('@telnyx_password');
|
|
409
|
-
if (this._options.debug) {
|
|
410
|
-
console.log('TelnyxVoipClient: Stored authentication token');
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
catch (error) {
|
|
414
|
-
if (this._options.debug) {
|
|
415
|
-
console.log('TelnyxVoipClient: Failed to store token:', error);
|
|
416
|
-
}
|
|
417
|
-
// Don't throw here - storage failure shouldn't prevent login
|
|
418
|
-
}
|
|
378
|
+
if (this._options.debug) {
|
|
379
|
+
console.log('TelnyxVoipClient: Disposing client');
|
|
419
380
|
}
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
381
|
+
this._disposed = true;
|
|
382
|
+
this._callStateController.dispose();
|
|
383
|
+
this._sessionManager.dispose();
|
|
384
|
+
}
|
|
385
|
+
// ========== Private Methods ==========
|
|
386
|
+
/**
|
|
387
|
+
* Store credential configuration for automatic reconnection
|
|
388
|
+
*/
|
|
389
|
+
async _storeCredentials(config) {
|
|
390
|
+
try {
|
|
391
|
+
const AsyncStorage = require('@react-native-async-storage/async-storage').default;
|
|
392
|
+
await AsyncStorage.setItem('@telnyx_username', config.sipUser);
|
|
393
|
+
await AsyncStorage.setItem('@telnyx_password', config.sipPassword);
|
|
394
|
+
if (config.pushNotificationDeviceToken) {
|
|
395
|
+
await AsyncStorage.setItem('@push_token', config.pushNotificationDeviceToken);
|
|
396
|
+
}
|
|
397
|
+
// Clear any existing token since we're using credentials
|
|
398
|
+
await AsyncStorage.removeItem('@credential_token');
|
|
399
|
+
if (this._options.debug) {
|
|
400
|
+
console.log('TelnyxVoipClient: Stored credentials for user:', config.sipUser);
|
|
401
|
+
}
|
|
402
|
+
} catch (error) {
|
|
403
|
+
if (this._options.debug) {
|
|
404
|
+
console.log('TelnyxVoipClient: Failed to store credentials:', error);
|
|
405
|
+
}
|
|
406
|
+
// Don't throw here - storage failure shouldn't prevent login
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
/**
|
|
410
|
+
* Store token configuration for automatic reconnection
|
|
411
|
+
*/
|
|
412
|
+
async _storeToken(config) {
|
|
413
|
+
try {
|
|
414
|
+
const AsyncStorage = require('@react-native-async-storage/async-storage').default;
|
|
415
|
+
await AsyncStorage.setItem('@credential_token', config.token);
|
|
416
|
+
if (config.pushNotificationDeviceToken) {
|
|
417
|
+
await AsyncStorage.setItem('@push_token', config.pushNotificationDeviceToken);
|
|
418
|
+
}
|
|
419
|
+
// Clear any existing credentials since we're using token
|
|
420
|
+
await AsyncStorage.removeItem('@telnyx_username');
|
|
421
|
+
await AsyncStorage.removeItem('@telnyx_password');
|
|
422
|
+
if (this._options.debug) {
|
|
423
|
+
console.log('TelnyxVoipClient: Stored authentication token');
|
|
424
|
+
}
|
|
425
|
+
} catch (error) {
|
|
426
|
+
if (this._options.debug) {
|
|
427
|
+
console.log('TelnyxVoipClient: Failed to store token:', error);
|
|
428
|
+
}
|
|
429
|
+
// Don't throw here - storage failure shouldn't prevent login
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
/**
|
|
433
|
+
* Throw an error if the client has been disposed
|
|
434
|
+
*/
|
|
435
|
+
_throwIfDisposed() {
|
|
436
|
+
if (this._disposed) {
|
|
437
|
+
throw new Error('TelnyxVoipClient has been disposed');
|
|
427
438
|
}
|
|
439
|
+
}
|
|
428
440
|
}
|
|
429
441
|
exports.TelnyxVoipClient = TelnyxVoipClient;
|
|
430
442
|
// ========== Factory Functions ==========
|
|
@@ -432,11 +444,11 @@ exports.TelnyxVoipClient = TelnyxVoipClient;
|
|
|
432
444
|
* Create a new TelnyxVoipClient instance for normal app usage
|
|
433
445
|
*/
|
|
434
446
|
function createTelnyxVoipClient(options) {
|
|
435
|
-
|
|
447
|
+
return new TelnyxVoipClient(options);
|
|
436
448
|
}
|
|
437
449
|
/**
|
|
438
450
|
* Create a new TelnyxVoipClient instance for background push notification handling
|
|
439
451
|
*/
|
|
440
452
|
function createBackgroundTelnyxVoipClient(options) {
|
|
441
|
-
|
|
453
|
+
return new TelnyxVoipClient(options);
|
|
442
454
|
}
|