@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.
Files changed (237) hide show
  1. package/CHANGELOG.md +31 -16
  2. package/README.md +469 -469
  3. package/TelnyxVoiceCommons.podspec +31 -31
  4. package/android/build/.transforms/35d64beab84343a7420320f8057c40b9/results.bin +1 -0
  5. package/android/build/.transforms/35d64beab84343a7420320f8057c40b9/transformed/classes/classes_dex/classes.dex +0 -0
  6. package/android/build/.transforms/81896f393ea3c2e44a76283db01ad461/results.bin +1 -0
  7. package/android/build/.transforms/81896f393ea3c2e44a76283db01ad461/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/BuildConfig.dex +0 -0
  8. package/android/build/.transforms/81896f393ea3c2e44a76283db01ad461/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/CallForegroundService$Companion.dex +0 -0
  9. package/android/build/.transforms/81896f393ea3c2e44a76283db01ad461/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/CallForegroundService.dex +0 -0
  10. package/android/build/.transforms/81896f393ea3c2e44a76283db01ad461/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/TelnyxFirebaseMessagingService.dex +0 -0
  11. package/android/build/.transforms/81896f393ea3c2e44a76283db01ad461/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/TelnyxMainActivity$Companion.dex +0 -0
  12. package/android/build/.transforms/81896f393ea3c2e44a76283db01ad461/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/TelnyxMainActivity.dex +0 -0
  13. package/android/build/.transforms/81896f393ea3c2e44a76283db01ad461/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/TelnyxNotificationActionReceiver.dex +0 -0
  14. package/android/build/.transforms/81896f393ea3c2e44a76283db01ad461/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/TelnyxNotificationHelper$Companion.dex +0 -0
  15. package/android/build/.transforms/81896f393ea3c2e44a76283db01ad461/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/TelnyxNotificationHelper.dex +0 -0
  16. package/android/build/.transforms/81896f393ea3c2e44a76283db01ad461/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/VoicePnBridgeModule$Companion.dex +0 -0
  17. package/android/build/.transforms/81896f393ea3c2e44a76283db01ad461/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/VoicePnBridgeModule.dex +0 -0
  18. package/android/build/.transforms/81896f393ea3c2e44a76283db01ad461/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/VoicePnBridgePackage.dex +0 -0
  19. package/android/build/.transforms/81896f393ea3c2e44a76283db01ad461/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/VoicePnManager.dex +0 -0
  20. package/android/build/.transforms/81896f393ea3c2e44a76283db01ad461/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
  21. package/android/build/.transforms/8ebc6907344eccd2b9c23d903854d4fb/results.bin +1 -0
  22. package/android/build/.transforms/8ebc6907344eccd2b9c23d903854d4fb/transformed/classes/classes_dex/classes.dex +0 -0
  23. package/android/build/.transforms/af1ab9e262e91ec4942977987fb9a0ae/results.bin +1 -0
  24. package/android/build/.transforms/af1ab9e262e91ec4942977987fb9a0ae/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/BuildConfig.dex +0 -0
  25. package/android/build/.transforms/af1ab9e262e91ec4942977987fb9a0ae/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/TelnyxFirebaseMessagingService.dex +0 -0
  26. package/android/build/.transforms/af1ab9e262e91ec4942977987fb9a0ae/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/TelnyxMainActivity$Companion.dex +0 -0
  27. package/android/build/.transforms/af1ab9e262e91ec4942977987fb9a0ae/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/TelnyxMainActivity.dex +0 -0
  28. package/android/build/.transforms/af1ab9e262e91ec4942977987fb9a0ae/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/TelnyxNotificationActionReceiver.dex +0 -0
  29. package/android/build/.transforms/af1ab9e262e91ec4942977987fb9a0ae/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/TelnyxNotificationHelper$Companion.dex +0 -0
  30. package/android/build/.transforms/af1ab9e262e91ec4942977987fb9a0ae/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/TelnyxNotificationHelper.dex +0 -0
  31. package/android/build/.transforms/af1ab9e262e91ec4942977987fb9a0ae/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/VoicePnBridgeModule.dex +0 -0
  32. package/android/build/.transforms/af1ab9e262e91ec4942977987fb9a0ae/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/VoicePnBridgePackage.dex +0 -0
  33. package/android/build/.transforms/af1ab9e262e91ec4942977987fb9a0ae/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/telnyx/react_voice_commons/VoicePnManager.dex +0 -0
  34. package/android/build/.transforms/af1ab9e262e91ec4942977987fb9a0ae/transformed/bundleLibRuntimeToDirDebug/desugar_graph.bin +0 -0
  35. package/android/build/generated/source/buildConfig/debug/com/telnyx/react_voice_commons/BuildConfig.java +10 -0
  36. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +42 -0
  37. package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +18 -0
  38. package/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +6 -0
  39. package/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +1 -0
  40. package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
  41. package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
  42. package/android/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +0 -0
  43. package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +1 -0
  44. package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +2 -0
  45. package/android/build/intermediates/incremental/mergeDebugJniLibFolders/merger.xml +2 -0
  46. package/android/build/intermediates/incremental/mergeDebugShaders/merger.xml +2 -0
  47. package/android/build/intermediates/incremental/packageDebugAssets/merger.xml +2 -0
  48. package/android/build/intermediates/java_res/debug/processDebugJavaRes/out/META-INF/telnyx_react-voice-commons-sdk_debug.kotlin_module +0 -0
  49. package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/telnyx/react_voice_commons/BuildConfig.class +0 -0
  50. package/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +2 -0
  51. package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +75 -0
  52. package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +42 -0
  53. package/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +1 -0
  54. package/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +1 -0
  55. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/META-INF/telnyx_react-voice-commons-sdk_debug.kotlin_module +0 -0
  56. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/telnyx/react_voice_commons/BuildConfig.class +0 -0
  57. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/telnyx/react_voice_commons/CallForegroundService$Companion.class +0 -0
  58. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/telnyx/react_voice_commons/CallForegroundService.class +0 -0
  59. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/telnyx/react_voice_commons/TelnyxFirebaseMessagingService.class +0 -0
  60. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/telnyx/react_voice_commons/TelnyxMainActivity$Companion.class +0 -0
  61. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/telnyx/react_voice_commons/TelnyxMainActivity.class +0 -0
  62. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/telnyx/react_voice_commons/TelnyxNotificationActionReceiver.class +0 -0
  63. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/telnyx/react_voice_commons/TelnyxNotificationHelper$Companion.class +0 -0
  64. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/telnyx/react_voice_commons/TelnyxNotificationHelper.class +0 -0
  65. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/telnyx/react_voice_commons/VoicePnBridgeModule$Companion.class +0 -0
  66. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/telnyx/react_voice_commons/VoicePnBridgeModule.class +0 -0
  67. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/telnyx/react_voice_commons/VoicePnBridgePackage.class +0 -0
  68. package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/telnyx/react_voice_commons/VoicePnManager.class +0 -0
  69. package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
  70. package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +1 -0
  71. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
  72. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
  73. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
  74. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
  75. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
  76. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
  77. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len +0 -0
  78. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
  79. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
  80. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
  81. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
  82. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
  83. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
  84. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len +0 -0
  85. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
  86. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
  87. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
  88. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
  89. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
  90. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
  91. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len +0 -0
  92. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab +0 -0
  93. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream +0 -0
  94. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream.len +0 -0
  95. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len +0 -0
  96. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at +0 -0
  97. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i +0 -0
  98. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i.len +0 -0
  99. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
  100. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
  101. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
  102. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
  103. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
  104. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
  105. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +0 -0
  106. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
  107. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
  108. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
  109. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
  110. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
  111. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
  112. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len +0 -0
  113. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
  114. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
  115. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
  116. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
  117. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
  118. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
  119. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len +0 -0
  120. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
  121. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
  122. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
  123. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
  124. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
  125. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
  126. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
  127. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
  128. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
  129. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
  130. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
  131. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
  132. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
  133. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
  134. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +2 -0
  135. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
  136. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
  137. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
  138. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
  139. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
  140. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
  141. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
  142. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
  143. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
  144. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
  145. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
  146. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
  147. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
  148. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
  149. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
  150. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
  151. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
  152. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
  153. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
  154. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
  155. package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len +0 -0
  156. package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
  157. package/android/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
  158. package/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
  159. package/android/build/outputs/logs/manifest-merger-debug-report.txt +82 -0
  160. package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
  161. package/android/build/tmp/kotlin-classes/debug/META-INF/telnyx_react-voice-commons-sdk_debug.kotlin_module +0 -0
  162. package/android/build/tmp/kotlin-classes/debug/com/telnyx/react_voice_commons/CallForegroundService$Companion.class +0 -0
  163. package/android/build/tmp/kotlin-classes/debug/com/telnyx/react_voice_commons/CallForegroundService.class +0 -0
  164. package/android/build/tmp/kotlin-classes/debug/com/telnyx/react_voice_commons/TelnyxFirebaseMessagingService.class +0 -0
  165. package/android/build/tmp/kotlin-classes/debug/com/telnyx/react_voice_commons/TelnyxMainActivity$Companion.class +0 -0
  166. package/android/build/tmp/kotlin-classes/debug/com/telnyx/react_voice_commons/TelnyxMainActivity.class +0 -0
  167. package/android/build/tmp/kotlin-classes/debug/com/telnyx/react_voice_commons/TelnyxNotificationActionReceiver.class +0 -0
  168. package/android/build/tmp/kotlin-classes/debug/com/telnyx/react_voice_commons/TelnyxNotificationHelper$Companion.class +0 -0
  169. package/android/build/tmp/kotlin-classes/debug/com/telnyx/react_voice_commons/TelnyxNotificationHelper.class +0 -0
  170. package/android/build/tmp/kotlin-classes/debug/com/telnyx/react_voice_commons/VoicePnBridgeModule$Companion.class +0 -0
  171. package/android/build/tmp/kotlin-classes/debug/com/telnyx/react_voice_commons/VoicePnBridgeModule.class +0 -0
  172. package/android/build/tmp/kotlin-classes/debug/com/telnyx/react_voice_commons/VoicePnBridgePackage.class +0 -0
  173. package/android/build/tmp/kotlin-classes/debug/com/telnyx/react_voice_commons/VoicePnManager.class +0 -0
  174. package/android/build.gradle +45 -0
  175. package/android/local.properties +8 -0
  176. package/android/src/main/AndroidManifest.xml +38 -0
  177. package/android/src/main/java/com/telnyx/react_voice_commons/CallForegroundService.kt +83 -0
  178. package/android/src/main/java/com/telnyx/react_voice_commons/TelnyxFirebaseMessagingService.kt +179 -0
  179. package/android/src/main/java/com/telnyx/react_voice_commons/TelnyxMainActivity.kt +216 -0
  180. package/android/src/main/java/com/telnyx/react_voice_commons/TelnyxNotificationActionReceiver.kt +177 -0
  181. package/android/src/main/java/com/telnyx/react_voice_commons/TelnyxNotificationHelper.kt +277 -0
  182. package/android/src/main/java/com/telnyx/react_voice_commons/VoicePnBridgeModule.kt +247 -0
  183. package/android/src/main/java/com/telnyx/react_voice_commons/VoicePnBridgePackage.kt +17 -0
  184. package/android/src/main/java/com/telnyx/react_voice_commons/VoicePnManager.kt +154 -0
  185. package/ios/CallKitBridge.m +43 -43
  186. package/ios/CallKitBridge.swift +874 -874
  187. package/ios/VoicePnBridge.m +30 -30
  188. package/ios/VoicePnBridge.swift +86 -86
  189. package/lib/callkit/callkit-coordinator.d.ts +114 -110
  190. package/lib/callkit/callkit-coordinator.js +706 -664
  191. package/lib/callkit/callkit.d.ts +41 -41
  192. package/lib/callkit/callkit.js +242 -252
  193. package/lib/callkit/index.js +47 -15
  194. package/lib/callkit/use-callkit.d.ts +19 -19
  195. package/lib/callkit/use-callkit.js +310 -270
  196. package/lib/context/TelnyxVoiceContext.d.ts +9 -9
  197. package/lib/context/TelnyxVoiceContext.js +13 -10
  198. package/lib/hooks/use-callkit-coordinator.d.ts +17 -9
  199. package/lib/hooks/use-callkit-coordinator.js +50 -45
  200. package/lib/hooks/useAppReadyNotifier.js +15 -13
  201. package/lib/hooks/useAppStateHandler.d.ts +11 -6
  202. package/lib/hooks/useAppStateHandler.js +110 -95
  203. package/lib/index.d.ts +21 -3
  204. package/lib/index.js +201 -50
  205. package/lib/internal/CallKitHandler.d.ts +6 -6
  206. package/lib/internal/CallKitHandler.js +104 -96
  207. package/lib/internal/callkit-manager.d.ts +57 -57
  208. package/lib/internal/callkit-manager.js +316 -299
  209. package/lib/internal/calls/call-state-controller.d.ts +78 -73
  210. package/lib/internal/calls/call-state-controller.js +326 -265
  211. package/lib/internal/session/session-manager.d.ts +71 -71
  212. package/lib/internal/session/session-manager.js +437 -360
  213. package/lib/internal/user-defaults-helpers.js +39 -49
  214. package/lib/internal/voice-pn-bridge.d.ts +112 -104
  215. package/lib/internal/voice-pn-bridge.js +193 -203
  216. package/lib/models/call-state.d.ts +46 -46
  217. package/lib/models/call-state.js +74 -70
  218. package/lib/models/call.d.ts +173 -157
  219. package/lib/models/call.js +492 -448
  220. package/lib/models/config.d.ts +18 -11
  221. package/lib/models/config.js +35 -37
  222. package/lib/models/connection-state.d.ts +10 -10
  223. package/lib/models/connection-state.js +16 -16
  224. package/lib/telnyx-voice-app.d.ts +28 -28
  225. package/lib/telnyx-voice-app.js +561 -509
  226. package/lib/telnyx-voip-client.d.ts +174 -167
  227. package/lib/telnyx-voip-client.js +397 -385
  228. package/package.json +116 -115
  229. package/src/callkit/callkit-coordinator.ts +830 -830
  230. package/src/internal/calls/call-state-controller.ts +407 -407
  231. package/src/internal/session/session-manager.ts +483 -483
  232. package/src/internal/voice-pn-bridge.ts +266 -266
  233. package/src/models/call-state.ts +105 -105
  234. package/src/models/call.ts +502 -502
  235. package/src/telnyx-voice-app.tsx +787 -788
  236. package/src/telnyx-voip-client.ts +551 -551
  237. package/src/types/telnyx-sdk.d.ts +93 -93
@@ -1,11 +1,11 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ 'use strict';
2
+ Object.defineProperty(exports, '__esModule', { value: true });
3
3
  exports.CallStateController = void 0;
4
- const rxjs_1 = require("rxjs");
5
- const operators_1 = require("rxjs/operators");
6
- const call_1 = require("../../models/call");
7
- const call_state_1 = require("../../models/call-state");
8
- const callkit_coordinator_1 = require("../../callkit/callkit-coordinator");
4
+ const rxjs_1 = require('rxjs');
5
+ const operators_1 = require('rxjs/operators');
6
+ const call_1 = require('../../models/call');
7
+ const call_state_1 = require('../../models/call-state');
8
+ const callkit_coordinator_1 = require('../../callkit/callkit-coordinator');
9
9
  /**
10
10
  * Central state machine for call management.
11
11
  *
@@ -13,276 +13,337 @@ const callkit_coordinator_1 = require("../../callkit/callkit-coordinator");
13
13
  * and provides reactive streams for call-related state changes.
14
14
  */
15
15
  class CallStateController {
16
- constructor(_sessionManager) {
17
- this._sessionManager = _sessionManager;
18
- this._calls = new rxjs_1.BehaviorSubject([]);
19
- this._callMap = new Map();
20
- this._disposed = false;
21
- console.log('🔧 CallStateController: Constructor called - instance created');
22
- // Don't set up client listeners here - client doesn't exist yet
23
- // Will be called when client is available
24
- }
25
- /**
26
- * Observable stream of all current calls
27
- */
28
- get calls$() {
29
- return this._calls.asObservable().pipe((0, operators_1.distinctUntilChanged)());
30
- }
31
- /**
32
- * Observable stream of the currently active call
33
- */
34
- get activeCall$() {
35
- return this.calls$.pipe((0, operators_1.map)((calls) => {
36
- // Find the first call that is not terminated (includes RINGING, CONNECTING, ACTIVE, HELD)
37
- return (calls.find((call) => call.currentState === call_state_1.TelnyxCallState.RINGING ||
38
- call.currentState === call_state_1.TelnyxCallState.CONNECTING ||
39
- call.currentState === call_state_1.TelnyxCallState.ACTIVE ||
40
- call.currentState === call_state_1.TelnyxCallState.HELD) || null);
41
- }), (0, operators_1.distinctUntilChanged)());
16
+ constructor(_sessionManager) {
17
+ this._sessionManager = _sessionManager;
18
+ this._calls = new rxjs_1.BehaviorSubject([]);
19
+ this._callMap = new Map();
20
+ this._disposed = false;
21
+ console.log('🔧 CallStateController: Constructor called - instance created');
22
+ // Don't set up client listeners here - client doesn't exist yet
23
+ // Will be called when client is available
24
+ }
25
+ /**
26
+ * Observable stream of all current calls
27
+ */
28
+ get calls$() {
29
+ return this._calls.asObservable().pipe((0, operators_1.distinctUntilChanged)());
30
+ }
31
+ /**
32
+ * Observable stream of the currently active call
33
+ */
34
+ get activeCall$() {
35
+ return this.calls$.pipe(
36
+ (0, operators_1.map)((calls) => {
37
+ // Find the first call that is not terminated (includes RINGING, CONNECTING, ACTIVE, HELD)
38
+ return (
39
+ calls.find(
40
+ (call) =>
41
+ call.currentState === call_state_1.TelnyxCallState.RINGING ||
42
+ call.currentState === call_state_1.TelnyxCallState.CONNECTING ||
43
+ call.currentState === call_state_1.TelnyxCallState.ACTIVE ||
44
+ call.currentState === call_state_1.TelnyxCallState.HELD
45
+ ) || null
46
+ );
47
+ }),
48
+ (0, operators_1.distinctUntilChanged)()
49
+ );
50
+ }
51
+ /**
52
+ * Current list of calls (synchronous access)
53
+ */
54
+ get currentCalls() {
55
+ return this._calls.value;
56
+ }
57
+ /**
58
+ * Current active call (synchronous access)
59
+ */
60
+ get currentActiveCall() {
61
+ const calls = this.currentCalls;
62
+ return (
63
+ calls.find(
64
+ (call) =>
65
+ call.currentState === call_state_1.TelnyxCallState.RINGING ||
66
+ call.currentState === call_state_1.TelnyxCallState.CONNECTING ||
67
+ call.currentState === call_state_1.TelnyxCallState.ACTIVE ||
68
+ call.currentState === call_state_1.TelnyxCallState.HELD
69
+ ) || null
70
+ );
71
+ }
72
+ /**
73
+ * Set a call to connecting state (used for push notification calls when answered via CallKit)
74
+ * @param callId The ID of the call to set to connecting state
75
+ */
76
+ setCallConnecting(callId) {
77
+ const call = this._callMap.get(callId);
78
+ if (call) {
79
+ console.log('CallStateController: Setting call to connecting state:', callId);
80
+ call.setConnecting();
81
+ } else {
82
+ console.warn('CallStateController: Could not find call to set connecting:', callId);
42
83
  }
43
- /**
44
- * Current list of calls (synchronous access)
45
- */
46
- get currentCalls() {
47
- return this._calls.value;
84
+ }
85
+ /**
86
+ * Find a call by its underlying Telnyx call ID
87
+ * @param telnyxCall The Telnyx call object to find
88
+ */
89
+ findCallByTelnyxCall(telnyxCall) {
90
+ for (const call of this._callMap.values()) {
91
+ if (call.telnyxCall === telnyxCall || call.telnyxCall.callId === telnyxCall.callId) {
92
+ return call;
93
+ }
48
94
  }
49
- /**
50
- * Current active call (synchronous access)
51
- */
52
- get currentActiveCall() {
53
- const calls = this.currentCalls;
54
- return (calls.find((call) => call.currentState === call_state_1.TelnyxCallState.RINGING ||
55
- call.currentState === call_state_1.TelnyxCallState.CONNECTING ||
56
- call.currentState === call_state_1.TelnyxCallState.ACTIVE ||
57
- call.currentState === call_state_1.TelnyxCallState.HELD) || null);
95
+ return null;
96
+ }
97
+ /**
98
+ * Initialize client listeners when the Telnyx client becomes available
99
+ * This should be called by the session manager after client creation
100
+ */
101
+ initializeClientListeners() {
102
+ console.log('🔧 CallStateController: initializeClientListeners called');
103
+ console.log(
104
+ '🔧 CallStateController: Current client exists:',
105
+ !!this._sessionManager.telnyxClient
106
+ );
107
+ this._setupClientListeners();
108
+ // CallKit integration now handled by CallKitCoordinator
109
+ console.log('🔧 CallStateController: Using CallKitCoordinator for CallKit integration');
110
+ }
111
+ /**
112
+ * Initiate a new outgoing call
113
+ */
114
+ async newCall(destination, callerName, callerNumber, customHeaders) {
115
+ if (this._disposed) {
116
+ throw new Error('CallStateController has been disposed');
58
117
  }
59
- /**
60
- * Set a call to connecting state (used for push notification calls when answered via CallKit)
61
- * @param callId The ID of the call to set to connecting state
62
- */
63
- setCallConnecting(callId) {
64
- const call = this._callMap.get(callId);
65
- if (call) {
66
- console.log('CallStateController: Setting call to connecting state:', callId);
67
- call.setConnecting();
68
- }
69
- else {
70
- console.warn('CallStateController: Could not find call to set connecting:', callId);
71
- }
118
+ if (!this._sessionManager.telnyxClient) {
119
+ throw new Error('Telnyx client not available');
72
120
  }
73
- /**
74
- * Find a call by its underlying Telnyx call ID
75
- * @param telnyxCall The Telnyx call object to find
76
- */
77
- findCallByTelnyxCall(telnyxCall) {
78
- for (const call of this._callMap.values()) {
79
- if (call.telnyxCall === telnyxCall || call.telnyxCall.callId === telnyxCall.callId) {
80
- return call;
81
- }
82
- }
83
- return null;
121
+ try {
122
+ // Create the call using the Telnyx SDK
123
+ const callOptions = {
124
+ destinationNumber: destination,
125
+ callerIdName: callerName,
126
+ callerIdNumber: callerNumber,
127
+ customHeaders,
128
+ };
129
+ const telnyxCall = await this._sessionManager.telnyxClient.newCall(callOptions);
130
+ // Create our wrapper Call object
131
+ const call = new call_1.Call(
132
+ telnyxCall,
133
+ telnyxCall.callId || this._generateCallId(),
134
+ destination,
135
+ false, // outgoing call
136
+ false, // not reattached
137
+ callerName || destination, // use destination as fallback for caller name
138
+ callerNumber // original caller number
139
+ );
140
+ // Add to our call tracking
141
+ this._addCall(call);
142
+ return call;
143
+ } catch (error) {
144
+ console.error('Failed to create new call:', error);
145
+ throw error;
84
146
  }
85
- /**
86
- * Initialize client listeners when the Telnyx client becomes available
87
- * This should be called by the session manager after client creation
88
- */
89
- initializeClientListeners() {
90
- console.log('🔧 CallStateController: initializeClientListeners called');
91
- console.log('🔧 CallStateController: Current client exists:', !!this._sessionManager.telnyxClient);
92
- this._setupClientListeners();
93
- // CallKit integration now handled by CallKitCoordinator
94
- console.log('🔧 CallStateController: Using CallKitCoordinator for CallKit integration');
147
+ }
148
+ /**
149
+ * Set callbacks for waiting for invite logic (used for push notifications)
150
+ */
151
+ setWaitingForInviteCallbacks(callbacks) {
152
+ this._isWaitingForInvite = callbacks.isWaitingForInvite;
153
+ this._onInviteAutoAccepted = callbacks.onInviteAutoAccepted;
154
+ }
155
+ /**
156
+ * Dispose of the controller and clean up resources
157
+ */
158
+ dispose() {
159
+ if (this._disposed) {
160
+ return;
95
161
  }
96
- /**
97
- * Initiate a new outgoing call
98
- */
99
- async newCall(destination, callerName, callerNumber, customHeaders) {
100
- if (this._disposed) {
101
- throw new Error('CallStateController has been disposed');
102
- }
103
- if (!this._sessionManager.telnyxClient) {
104
- throw new Error('Telnyx client not available');
105
- }
106
- try {
107
- // Create the call using the Telnyx SDK
108
- const callOptions = {
109
- destinationNumber: destination,
110
- callerIdName: callerName,
111
- callerIdNumber: callerNumber,
112
- customHeaders,
113
- };
114
- const telnyxCall = await this._sessionManager.telnyxClient.newCall(callOptions);
115
- // Create our wrapper Call object
116
- const call = new call_1.Call(telnyxCall, telnyxCall.callId || this._generateCallId(), destination, false, // outgoing call
117
- false, // not reattached
118
- callerName || destination, // use destination as fallback for caller name
119
- callerNumber // original caller number
120
- );
121
- // Add to our call tracking
122
- this._addCall(call);
123
- return call;
124
- }
125
- catch (error) {
126
- console.error('Failed to create new call:', error);
127
- throw error;
128
- }
162
+ this._disposed = true;
163
+ // Dispose of all calls
164
+ this.currentCalls.forEach((call) => call.dispose());
165
+ this._callMap.clear();
166
+ // CallKit cleanup is now handled by CallKitCoordinator automatically
167
+ this._calls.complete();
168
+ }
169
+ /**
170
+ * Set up event listeners for the Telnyx client
171
+ */
172
+ _setupClientListeners() {
173
+ console.log('🔧 CallStateController: Setting up client listeners...');
174
+ if (!this._sessionManager.telnyxClient) {
175
+ console.log('🔧 CallStateController: No telnyxClient available yet, skipping listener setup');
176
+ return;
129
177
  }
130
- /**
131
- * Set callbacks for waiting for invite logic (used for push notifications)
132
- */
133
- setWaitingForInviteCallbacks(callbacks) {
134
- this._isWaitingForInvite = callbacks.isWaitingForInvite;
135
- this._onInviteAutoAccepted = callbacks.onInviteAutoAccepted;
178
+ console.log('🔧 CallStateController: TelnyxClient found, setting up incoming call listener');
179
+ console.log(
180
+ '🔧 CallStateController: Client instance:',
181
+ this._sessionManager.telnyxClient.constructor.name
182
+ );
183
+ // Listen for incoming calls
184
+ this._sessionManager.telnyxClient.on('telnyx.call.incoming', (telnyxCall, msg) => {
185
+ console.log('📞 CallStateController: Incoming call received:', telnyxCall.callId);
186
+ this._handleIncomingCall(telnyxCall, msg, false);
187
+ });
188
+ // Listen for reattached calls (after network reconnection)
189
+ this._sessionManager.telnyxClient.on('telnyx.call.reattached', (telnyxCall, msg) => {
190
+ console.log('📞 CallStateController: Reattached call received:', telnyxCall.callId);
191
+ this._handleIncomingCall(telnyxCall, msg, true);
192
+ });
193
+ // Verify listeners are set up
194
+ const incomingListeners =
195
+ this._sessionManager.telnyxClient.listenerCount('telnyx.call.incoming');
196
+ const reattachedListeners =
197
+ this._sessionManager.telnyxClient.listenerCount('telnyx.call.reattached');
198
+ console.log(
199
+ '🔧 CallStateController: Listeners registered - incoming:',
200
+ incomingListeners,
201
+ 'reattached:',
202
+ reattachedListeners
203
+ );
204
+ // Listen for other call events if needed
205
+ // this._sessionManager.telnyxClient.on('telnyx.call.stateChange', this._handleCallStateChange.bind(this));
206
+ console.log('🔧 CallStateController: Client listeners set up successfully');
207
+ }
208
+ /**
209
+ * Handle incoming call or reattached call
210
+ */
211
+ _handleIncomingCall(telnyxCall, inviteMsg, isReattached = false) {
212
+ const callId = telnyxCall.callId || this._generateCallId();
213
+ console.log(
214
+ '📞 CallStateController: Handling incoming call:',
215
+ callId,
216
+ 'isReattached:',
217
+ isReattached
218
+ );
219
+ console.log('📞 CallStateController: TelnyxCall object:', telnyxCall);
220
+ console.log('📞 CallStateController: Invite message:', inviteMsg);
221
+ // For reattached calls, remove existing call and create new one
222
+ if (isReattached && this._callMap.has(callId)) {
223
+ console.log('📞 CallStateController: Removing existing call for reattachment');
224
+ const existingCall = this._callMap.get(callId);
225
+ if (existingCall) {
226
+ console.log(
227
+ '📞 CallStateController: Existing call state before removal:',
228
+ existingCall.currentState
229
+ );
230
+ this._removeCall(callId);
231
+ }
136
232
  }
137
- /**
138
- * Dispose of the controller and clean up resources
139
- */
140
- dispose() {
141
- if (this._disposed) {
142
- return;
143
- }
144
- this._disposed = true;
145
- // Dispose of all calls
146
- this.currentCalls.forEach((call) => call.dispose());
147
- this._callMap.clear();
148
- // CallKit cleanup is now handled by CallKitCoordinator automatically
149
- this._calls.complete();
233
+ // Check if we already have this call (for non-reattached calls)
234
+ if (this._callMap.has(callId) && !isReattached) {
235
+ console.log('Call already exists:', callId);
236
+ return;
150
237
  }
151
- /**
152
- * Set up event listeners for the Telnyx client
153
- */
154
- _setupClientListeners() {
155
- console.log('🔧 CallStateController: Setting up client listeners...');
156
- if (!this._sessionManager.telnyxClient) {
157
- console.log('🔧 CallStateController: No telnyxClient available yet, skipping listener setup');
158
- return;
159
- }
160
- console.log('🔧 CallStateController: TelnyxClient found, setting up incoming call listener');
161
- console.log('🔧 CallStateController: Client instance:', this._sessionManager.telnyxClient.constructor.name);
162
- // Listen for incoming calls
163
- this._sessionManager.telnyxClient.on('telnyx.call.incoming', (telnyxCall, msg) => {
164
- console.log('📞 CallStateController: Incoming call received:', telnyxCall.callId);
165
- this._handleIncomingCall(telnyxCall, msg, false);
166
- });
167
- // Listen for reattached calls (after network reconnection)
168
- this._sessionManager.telnyxClient.on('telnyx.call.reattached', (telnyxCall, msg) => {
169
- console.log('📞 CallStateController: Reattached call received:', telnyxCall.callId);
170
- this._handleIncomingCall(telnyxCall, msg, true);
171
- });
172
- // Verify listeners are set up
173
- const incomingListeners = this._sessionManager.telnyxClient.listenerCount('telnyx.call.incoming');
174
- const reattachedListeners = this._sessionManager.telnyxClient.listenerCount('telnyx.call.reattached');
175
- console.log('🔧 CallStateController: Listeners registered - incoming:', incomingListeners, 'reattached:', reattachedListeners);
176
- // Listen for other call events if needed
177
- // this._sessionManager.telnyxClient.on('telnyx.call.stateChange', this._handleCallStateChange.bind(this));
178
- console.log('🔧 CallStateController: Client listeners set up successfully');
238
+ // Get caller information from the invite message (preferred) or fallback to TelnyxCall
239
+ let callerNumber = '';
240
+ let callerName = '';
241
+ if (inviteMsg && inviteMsg.params) {
242
+ callerNumber = inviteMsg.params.caller_id_number || '';
243
+ callerName = inviteMsg.params.caller_id_name || '';
244
+ console.log(
245
+ '📞 CallStateController: Extracted caller info from invite - Number:',
246
+ callerNumber,
247
+ 'Name:',
248
+ callerName
249
+ );
250
+ } else {
251
+ // Fallback to TelnyxCall properties
252
+ callerNumber = telnyxCall.remoteCallerIdNumber || '';
253
+ callerName = telnyxCall.remoteCallerIdName || '';
254
+ console.log(
255
+ '📞 CallStateController: Extracted caller info from TelnyxCall - Number:',
256
+ callerNumber,
257
+ 'Name:',
258
+ callerName
259
+ );
179
260
  }
180
- /**
181
- * Handle incoming call or reattached call
182
- */
183
- _handleIncomingCall(telnyxCall, inviteMsg, isReattached = false) {
184
- const callId = telnyxCall.callId || this._generateCallId();
185
- console.log('📞 CallStateController: Handling incoming call:', callId, 'isReattached:', isReattached);
186
- console.log('📞 CallStateController: TelnyxCall object:', telnyxCall);
187
- console.log('📞 CallStateController: Invite message:', inviteMsg);
188
- // For reattached calls, remove existing call and create new one
189
- if (isReattached && this._callMap.has(callId)) {
190
- console.log('📞 CallStateController: Removing existing call for reattachment');
191
- const existingCall = this._callMap.get(callId);
192
- if (existingCall) {
193
- console.log('📞 CallStateController: Existing call state before removal:', existingCall.currentState);
194
- this._removeCall(callId);
195
- }
196
- }
197
- // Check if we already have this call (for non-reattached calls)
198
- if (this._callMap.has(callId) && !isReattached) {
199
- console.log('Call already exists:', callId);
200
- return;
201
- }
202
- // Get caller information from the invite message (preferred) or fallback to TelnyxCall
203
- let callerNumber = '';
204
- let callerName = '';
205
- if (inviteMsg && inviteMsg.params) {
206
- callerNumber = inviteMsg.params.caller_id_number || '';
207
- callerName = inviteMsg.params.caller_id_name || '';
208
- console.log('📞 CallStateController: Extracted caller info from invite - Number:', callerNumber, 'Name:', callerName);
209
- }
210
- else {
211
- // Fallback to TelnyxCall properties
212
- callerNumber = telnyxCall.remoteCallerIdNumber || '';
213
- callerName = telnyxCall.remoteCallerIdName || '';
214
- console.log('📞 CallStateController: Extracted caller info from TelnyxCall - Number:', callerNumber, 'Name:', callerName);
215
- }
216
- // Use smart fallbacks - prefer caller number over "Unknown"
217
- const finalCallerNumber = callerNumber || 'Unknown Number';
218
- const finalCallerName = callerName || callerNumber || 'Unknown Caller';
219
- // Create our wrapper Call object
220
- const call = new call_1.Call(telnyxCall, callId, finalCallerNumber, // Use caller number as destination for incoming calls
221
- true, // incoming call
222
- isReattached, // pass the reattached flag
223
- finalCallerName, // use caller name or fallback to number
224
- finalCallerNumber // use caller number
261
+ // Use smart fallbacks - prefer caller number over "Unknown"
262
+ const finalCallerNumber = callerNumber || 'Unknown Number';
263
+ const finalCallerName = callerName || callerNumber || 'Unknown Caller';
264
+ // Create our wrapper Call object
265
+ const call = new call_1.Call(
266
+ telnyxCall,
267
+ callId,
268
+ finalCallerNumber, // Use caller number as destination for incoming calls
269
+ true, // incoming call
270
+ isReattached, // pass the reattached flag
271
+ finalCallerName, // use caller name or fallback to number
272
+ finalCallerNumber // use caller number
273
+ );
274
+ // Add to our call tracking - CallKit integration happens in _addCall
275
+ this._addCall(call);
276
+ }
277
+ /**
278
+ * Add a call to our tracking
279
+ */
280
+ _addCall(call) {
281
+ this._callMap.set(call.callId, call);
282
+ const currentCalls = this.currentCalls;
283
+ currentCalls.push(call);
284
+ this._calls.next([...currentCalls]);
285
+ // Integrate with CallKit using CallKitCoordinator
286
+ if (callkit_coordinator_1.callKitCoordinator.isAvailable()) {
287
+ // Get the underlying TelnyxCall for CallKitCoordinator
288
+ const telnyxCall = call.telnyxCall;
289
+ // Check if this call already has CallKit integration (e.g., from push notification)
290
+ const existingCallKitUUID =
291
+ callkit_coordinator_1.callKitCoordinator.getCallKitUUID(telnyxCall);
292
+ if (existingCallKitUUID) {
293
+ console.log(
294
+ 'CallStateController: Call already has CallKit integration, skipping duplicate report:',
295
+ existingCallKitUUID
225
296
  );
226
- // Add to our call tracking - CallKit integration happens in _addCall
227
- this._addCall(call);
228
- }
229
- /**
230
- * Add a call to our tracking
231
- */
232
- _addCall(call) {
233
- this._callMap.set(call.callId, call);
234
- const currentCalls = this.currentCalls;
235
- currentCalls.push(call);
236
- this._calls.next([...currentCalls]);
237
- // Integrate with CallKit using CallKitCoordinator
238
- if (callkit_coordinator_1.callKitCoordinator.isAvailable()) {
239
- // Get the underlying TelnyxCall for CallKitCoordinator
240
- const telnyxCall = call.telnyxCall;
241
- // Check if this call already has CallKit integration (e.g., from push notification)
242
- const existingCallKitUUID = callkit_coordinator_1.callKitCoordinator.getCallKitUUID(telnyxCall);
243
- if (existingCallKitUUID) {
244
- console.log('CallStateController: Call already has CallKit integration, skipping duplicate report:', existingCallKitUUID);
245
- }
246
- else if (call.isIncoming) {
247
- // Handle incoming call with CallKit (only if not already integrated)
248
- console.log('CallStateController: Reporting incoming call to CallKitCoordinator');
249
- callkit_coordinator_1.callKitCoordinator.reportIncomingCall(telnyxCall, call.destination, call.destination);
250
- }
251
- else {
252
- // Handle outgoing call with CallKit
253
- console.log('CallStateController: Starting outgoing call with CallKitCoordinator');
254
- callkit_coordinator_1.callKitCoordinator.startOutgoingCall(telnyxCall, call.destination, call.destination);
255
- }
256
- }
257
- // Listen for call state changes - CallKitCoordinator handles this automatically
258
- call.callState$.subscribe((state) => {
259
- // CallKitCoordinator automatically updates CallKit via setupWebRTCCallListeners
260
- console.log('CallStateController: Call state changed to:', state);
261
- // Clean up when call ends
262
- if (state === call_state_1.TelnyxCallState.ENDED || state === call_state_1.TelnyxCallState.FAILED) {
263
- this._removeCall(call.callId);
264
- }
265
- });
266
- }
267
- /**
268
- * Remove a call from our tracking
269
- */
270
- _removeCall(callId) {
271
- const call = this._callMap.get(callId);
272
- if (call) {
273
- console.log('CallStateController: Removing call:', callId);
274
- // CallKit cleanup is handled automatically by CallKitCoordinator
275
- call.dispose();
276
- this._callMap.delete(callId);
277
- const currentCalls = this.currentCalls.filter((c) => c.callId !== callId);
278
- this._calls.next(currentCalls);
279
- }
297
+ } else if (call.isIncoming) {
298
+ // Handle incoming call with CallKit (only if not already integrated)
299
+ console.log('CallStateController: Reporting incoming call to CallKitCoordinator');
300
+ callkit_coordinator_1.callKitCoordinator.reportIncomingCall(
301
+ telnyxCall,
302
+ call.destination,
303
+ call.destination
304
+ );
305
+ } else {
306
+ // Handle outgoing call with CallKit
307
+ console.log('CallStateController: Starting outgoing call with CallKitCoordinator');
308
+ callkit_coordinator_1.callKitCoordinator.startOutgoingCall(
309
+ telnyxCall,
310
+ call.destination,
311
+ call.destination
312
+ );
313
+ }
280
314
  }
281
- /**
282
- * Generate a unique call ID
283
- */
284
- _generateCallId() {
285
- return `call_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
315
+ // Listen for call state changes - CallKitCoordinator handles this automatically
316
+ call.callState$.subscribe((state) => {
317
+ // CallKitCoordinator automatically updates CallKit via setupWebRTCCallListeners
318
+ console.log('CallStateController: Call state changed to:', state);
319
+ // Clean up when call ends
320
+ if (
321
+ state === call_state_1.TelnyxCallState.ENDED ||
322
+ state === call_state_1.TelnyxCallState.FAILED
323
+ ) {
324
+ this._removeCall(call.callId);
325
+ }
326
+ });
327
+ }
328
+ /**
329
+ * Remove a call from our tracking
330
+ */
331
+ _removeCall(callId) {
332
+ const call = this._callMap.get(callId);
333
+ if (call) {
334
+ console.log('CallStateController: Removing call:', callId);
335
+ // CallKit cleanup is handled automatically by CallKitCoordinator
336
+ call.dispose();
337
+ this._callMap.delete(callId);
338
+ const currentCalls = this.currentCalls.filter((c) => c.callId !== callId);
339
+ this._calls.next(currentCalls);
286
340
  }
341
+ }
342
+ /**
343
+ * Generate a unique call ID
344
+ */
345
+ _generateCallId() {
346
+ return `call_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
347
+ }
287
348
  }
288
349
  exports.CallStateController = CallStateController;