Giter VIP home page Giter VIP logo

telnyx-webrtc-android's Introduction

Telnyx Android WebRTC SDK

Tests

Enable Telnyx real-time communication services on Android ๐Ÿ“ž ๐Ÿ”ฅ

Project structure:

  • SDK project: sdk module, containing all Telnyx SDK components as well as tests.
  • Demo application: app module, containing a sample demo application utilizing the sdk module.

Project Setup:

  1. Clone the repository

  2. Open the cloned repository in Android Studio and hit the build button to build both the sdk and sample app:

  3. Connect a device or start an emulated device and hit the run button

  4. Enjoy ๐Ÿ˜Ž

Using Jetpack Compose?

Have a look at our Jetpack Compose reference application here

SIP Credentials

In order to start making and receiving calls using the TelnyxRTC SDK you will need to get SIP Credentials:

  1. Access to https://portal.telnyx.com/
  2. Sign up for a Telnyx Account.
  3. Create a Credential Connection to configure how you connect your calls.
  4. Create an Outbound Voice Profile to configure your outbound call settings and assign it to your Credential Connection.

For more information on how to generate SIP credentials check the Telnyx WebRTC quickstart guide.

Usage

Telnyx Client

NOTE: Remember to add and handle INTERNET, RECORD_AUDIO and ACCESS_NETWORK_STATE permissions

To initialize the TelnyxClient you will have to provide the application context. Once an instance is created, you can call the .connect() method to connect to the socket. An error will appear as a socket response if there is no network available:

  telnyxClient = TelnyxClient(context)
  telnyxClient.connect()

Logging into Telnyx Client

To log into the Telnyx WebRTC client, you'll need to authenticate using a Telnyx SIP Connection. Follow our quickstart guide to create JWTs (JSON Web Tokens) to authenticate. To log in with a token we use the tokinLogin() method. You can also authenticate directly with the SIP Connection username and password with the credentialLogin() method:

 telnyxClient.tokenLogin(tokenConfig)
                //OR
 telnyxClient.credentialLogin(credentialConfig)             

Note: tokenConfig and credentialConfig are data classes that represent login settings for the client to use. They look like this:

sealed class TelnyxConfig

/**
 * Represents a SIP user for login - Credential based
 *
 * @property sipUser The SIP username of the user logging in
 * @property sipPassword The SIP password of the user logging in
 * @property sipCallerIDName The user's chosen Caller ID Name
 * @property sipCallerIDNumber The user's Caller ID Number
 * @property fcmToken The user's Firebase Cloud Messaging device ID
 * @property ringtone The integer raw value or uri of the audio file to use as a ringtone. Supports only raw file or uri
 * @property ringBackTone The integer raw value of the audio file to use as a ringback tone
 * @property logLevel The log level that the SDK should use - default value is none.
 * @property autoReconnect whether or not to reattempt (3 times) the login in the instance of a failure to connect and register to the gateway with valid credentials
 */
data class CredentialConfig(
    val sipUser: String,
    val sipPassword: String,
    val sipCallerIDName: String?,
    val sipCallerIDNumber: String?,
    val fcmToken: String?,
    val ringtone: Any?,
    val ringBackTone: Int?,
    val logLevel: LogLevel = LogLevel.NONE,
    val autoReconnect : Boolean = true
    ) : TelnyxConfig()

/**
 * Represents a SIP user for login - Token based
 *
 * @property sipToken The JWT token for the SIP user.
 * @property sipCallerIDName The user's chosen Caller ID Name
 * @property sipCallerIDNumber The user's Caller ID Number
 * @property fcmToken The user's Firebase Cloud Messaging device ID
 * @property ringtone The integer raw value or uri of the audio file to use as a ringtone. Supports only raw file or uri
 * @property ringBackTone The integer raw value of the audio file to use as a ringback tone
 * @property logLevel The log level that the SDK should use - default value is none.
 * @property autoReconnect whether or not to reattempt (3 times) the login in the instance of a failure to connect and register to the gateway with a valid token
 */
data class TokenConfig(
    val sipToken: String,
    val sipCallerIDName: String?,
    val sipCallerIDNumber: String?,
    val fcmToken: String?,
    val ringtone: Any?,
    val ringBackTone: Int?,
    val logLevel: LogLevel = LogLevel.NONE,
    val autoReconnect : Boolean = true,
    ) : TelnyxConfig()

Creating a call invitation

In order to make a call invitation, you need to provide your callerName, callerNumber, the destinationNumber (or SIP credential), and your clientState (any String value).

   telnyxClient.call.newInvite(callerName, callerNumber, destinationNumber, clientState)

Accepting a call

In order to be able to accept a call, we first need to listen for invitations. We do this by getting the Telnyx Socket Response as LiveData:

  fun getSocketResponse(): LiveData<SocketResponse<ReceivedMessageBody>>? =
        telnyxClient.getSocketResponse()

We can then use this method to create a listener that listens for an invitation - in this example we assume getSocketResponse is a method within a ViewModel.

 mainViewModel.getSocketResponse()
            ?.observe(this, object : SocketObserver<ReceivedMessageBody>() {
                override fun onConnectionEstablished() {
                    // Handle a succesfully established connection 
                }
                
                override fun onMessageReceived(data: ReceivedMessageBody?) {
                    when (data?.method) {
                        SocketMethod.CLIENT_READY.methodName -> {
                            // Fires once client has correctly been setup and logged into, you can now make calls. 
                        }

                        SocketMethod.LOGIN.methodName -> {
                           // Handle a successful login - Update UI or Navigate to new screen, etc.
                        }

                        SocketMethod.INVITE.methodName -> {
                           // Handle an invitation Update UI or Navigate to new screen, etc. 
                           // Then, through an answer button of some kind we can accept the call with:
                            val inviteResponse = data.result as InviteResponse
                            mainViewModel.acceptCall(inviteResponse.callId,  inviteResponse.callerIdNumber)
                        }

                        SocketMethod.ANSWER.methodName -> {
                            //Handle a received call answer - Update UI or Navigate to new screen, etc.
                        }

                        SocketMethod.BYE.methodName -> {
                           // Handle a call rejection or ending - Update UI or Navigate to new screen, etc.
                        }
                    }
                }
                
                override fun onLoading() {
                    // Show loading dialog
                }

                override fun onError(message: String?) {
                   // Handle errors - Update UI or Navigate to new screen, etc.
                }

                override fun onSocketDisconnect() {
                    // Handle disconnect - Update UI or Navigate to login screen, etc.
                }

            })

When we receive a call we will receive an InviteResponse data class that contains the details we need to accept the call. We can then call the acceptCall method in TelnyxClient from our ViewModel:

Handling Multiple Calls

The Telnyx WebRTC SDK allows for multiple calls to be handled at once. You can use the callId to differentiate the calls..

import java.util.UUID
// Retrieve all calls from the TelnyxClient
val calls: Map<UUID,Call> = telnyxClient.calls 

// Retrieve a specific call by callId
val currentCall: Call? = calls[callId]

With the current call object, you can perform actions such as:

  1. Hold/UnHold currentCall.onHoldUnholdPressed(callId: UUID)
  2. Mute/UnMute currentCall.onMuteUnmutePressed()
  3. AcceptCall currentCall.acceptCall(...)
  4. EndCall currentCall.endCall(callId: UUID)

Adding push notifications

The Telnyx Android Client WebRTC SDK makes use of Firebase Cloud Messaging in order to deliver push notifications. If you want to receive notifications for incoming calls on your Android mobile device you have to enable Firebase Cloud Messaging within your application.

In order to do this you need to:

   1. Set up a Firebase console account
   2. Create a Firebase project
   3. Add Firebase to your Android Application
   4. Setup a Push Credential within the Telnyx Portal
   5. Generate a Firebase Cloud Messaging instance token
   6. Send the token with your login message

Finally, you will need to provide the connect(..) method with a txPushMetaData value retrieved from push notification. The txPushMetaData is neccessary for push notifications to work.

  telnyxClient = TelnyxClient(context)
  telnyxClient.connect(txPushMetaData)

For a detailed tutorial, please visit our official Push Notification Docs

ProGuard changes

NOTE: In the case that you need to modify your application's proguard settings in order to obfuscate your code, such as we have done below:

app/build.gradle

buildTypes {
        release {
            minifyEnabled true
            shrinkResources true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            jniDebuggable true
        }
        debug {
            minifyEnabled true
            shrinkResources true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            debuggable true
            jniDebuggable true
        }
    }

please keep in mind that you will need to add the following rules to the proguard-rules.pro file in your app in order for the SDK to continue functioning

app/proguard-rules.pro

-keep class org.webrtc.** { *; }
-keep class com.telnyx.webrtc.sdk.** { *; }

Questions? Comments? Building something rad? Join our Slack channel and share.

License

MIT Licence ยฉ Telnyx

telnyx-webrtc-android's People

Contributors

dependabot[bot] avatar enzoqtvf avatar isaacakakpo1 avatar oliver-zimmerman avatar rakshakgaind0910 avatar renjuramachandran88 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

telnyx-webrtc-android's Issues

[Bug] Short Bug Description

Bug Category

  • Credential Login
  • Token Login
  • Local Audio Issue
  • Remote Audio Issue
  • Audio Device Switching
  • Mute / Unmute
  • Hold / Unhold
  • Performance issues
  • Other

SDK Version
implementation 'com.github.team-telnyx:telnyx-webrtc-android:v1.2.12-alpha'

Describe the bug
The activity is not in the display state. After the mobile phone presses the home button, the mobile phone screen is on the home page. At this time, the SocketObserver does not return information. Only when the activity is displayed again, the information can be received.

Expected behaviour
In the non-display state of the activity, SocketObserver can return information normally

To Reproduce
Use the Git demo

Android Device (please complete the following information):

  • Emulator: (false)
  • Android Device: [SM-G9500]
  • Android Version: [ android 9 ]

Logs

[Bug] Short Bug Description

Bug Category

  • Credential Login
  • Token Login
  • [ ] Local Audio Issue
  • [ ] Remote Audio Issue
  • Audio Device Switching
  • Mute / Unmute
  • Hold / Unhold
  • Performance issues
  • [ x ] Other

SDK Version
'com.github.team-telnyx:telnyx-webrtc-android:v1.2.13-alpha'

Describe the bug
Dial the number 12532755147, the dialing process does not work properly

Expected behaviour

To Reproduce
Steps to reproduce the behaviour:

  1. e.g. (Log on with credentials)
  2. e.g. (Socket error then returned)

Android Device (please complete the following information):

  • Emulator: (false)
  • Android Device: Google Pixel 3
  • Android Version: android 11

Logs
2022-03-03 09:35:39.043 15842-16138/com.tongsoft.callphone I/org.webrtc.Logging: EglBase14Impl: SDK version: 30. isEGL14Supported: true
2022-03-03 09:35:39.044 15842-16138/com.tongsoft.callphone I/org.webrtc.Logging: EglBase14Impl: Using OpenGL ES version 2
2022-03-03 09:35:39.048 15842-16138/com.tongsoft.callphone I/org.webrtc.Logging: NativeLibrary: Loading native library: jingle_peerconnection_so
2022-03-03 09:35:39.048 15842-16138/com.tongsoft.callphone I/org.webrtc.Logging: NativeLibrary: Loading library: jingle_peerconnection_so
2022-03-03 09:35:39.070 15842-16138/com.tongsoft.callphone I/org.webrtc.Logging: PeerConnectionFactory: PeerConnectionFactory was initialized without an injected Loggable. Any existing Loggable will be deleted.
2022-03-03 09:35:39.094 15842-16138/com.tongsoft.callphone I/org.webrtc.Logging: WebRtcAudioManagerExternal: Sample rate is set to 48000 Hz
2022-03-03 09:35:39.094 15842-16138/com.tongsoft.callphone I/org.webrtc.Logging: WebRtcAudioManagerExternal: Sample rate is set to 48000 Hz
2022-03-03 09:35:39.094 15842-16138/com.tongsoft.callphone I/org.webrtc.Logging: JavaAudioDeviceModule: createAudioDeviceModule
2022-03-03 09:35:39.094 15842-16138/com.tongsoft.callphone I/org.webrtc.Logging: JavaAudioDeviceModule: HW NS will be used.
2022-03-03 09:35:39.094 15842-16138/com.tongsoft.callphone I/org.webrtc.Logging: JavaAudioDeviceModule: HW AEC will be used.
2022-03-03 09:35:39.096 15842-16138/com.tongsoft.callphone I/org.webrtc.Logging: WebRtcAudioEffectsExternal: ctor@[name=Thread-23, id=1120]
2022-03-03 09:35:39.096 15842-16138/com.tongsoft.callphone I/org.webrtc.Logging: WebRtcAudioRecordExternal: ctor@[name=Thread-23, id=1120]
2022-03-03 09:35:39.096 15842-16138/com.tongsoft.callphone I/org.webrtc.Logging: WebRtcAudioTrackExternal: ctor@[name=Thread-23, id=1120]
2022-03-03 09:35:39.159 15842-16142/com.tongsoft.callphone I/org.webrtc.Logging: WebRtcAudioRecordExternal: enableBuiltInAEC(true)
2022-03-03 09:35:39.159 15842-16142/com.tongsoft.callphone I/org.webrtc.Logging: WebRtcAudioEffectsExternal: setAEC(true)
2022-03-03 09:35:39.160 15842-16142/com.tongsoft.callphone I/org.webrtc.Logging: WebRtcAudioRecordExternal: enableBuiltInNS(true)
2022-03-03 09:35:39.160 15842-16142/com.tongsoft.callphone I/org.webrtc.Logging: WebRtcAudioEffectsExternal: setNS(true)
2022-03-03 09:35:39.160 15842-16142/com.tongsoft.callphone I/org.webrtc.Logging: PeerConnectionFactory: onWorkerThreadReady
2022-03-03 09:35:39.160 15842-16141/com.tongsoft.callphone I/org.webrtc.Logging: PeerConnectionFactory: onNetworkThreadReady
2022-03-03 09:35:39.161 15842-16143/com.tongsoft.callphone I/org.webrtc.Logging: PeerConnectionFactory: onSignalingThreadReady
2022-03-03 09:35:39.173 15842-16143/com.tongsoft.callphone D/PeerObserver: onRenegotiationNeeded
2022-03-03 09:35:39.175 15842-16138/com.tongsoft.callphone D/TelnyxClient: No ringtone specified :: No ringtone will be played
2022-03-03 09:35:39.176 15842-16143/com.tongsoft.callphone D/PeerObserver: onSignalingChange [HAVE_LOCAL_OFFER]
2022-03-03 09:35:39.178 15842-16143/com.tongsoft.callphone D/AppSdpObserver: onCreateSuccess [org.webrtc.SessionDescription@8eb073f]
2022-03-03 09:35:39.178 15842-16143/com.tongsoft.callphone D/Call: onSetSuccess
2022-03-03 09:35:39.178 15842-16143/com.tongsoft.callphone D/PeerObserver: onIceGatheringChange [GATHERING]
2022-03-03 09:35:39.179 15842-16143/com.tongsoft.callphone D/PeerObserver: onIceCandidate [audio:0:candidate:3960358116 1 udp 2122260223 192.168.1.126 49429 typ host generation 0 ufrag pNQ0 network-id 4 network-cost 10::UNKNOWN]
2022-03-03 09:35:39.180 15842-16143/com.tongsoft.callphone D/PeerObserver: onIceCandidate [audio:0:candidate:312472534 1 udp 2122194687 26.26.26.45 37513 typ host generation 0 ufrag pNQ0 network-id 3 network-cost 50::UNKNOWN]
2022-03-03 09:35:39.180 15842-16143/com.tongsoft.callphone D/PeerObserver: onIceCandidate [audio:0:candidate:559267639 1 udp 2122136831 ::1 42757 typ host generation 0 ufrag pNQ0 network-id 2::UNKNOWN]
2022-03-03 09:35:39.180 15842-16143/com.tongsoft.callphone D/PeerObserver: onIceCandidate [audio:0:candidate:1510613869 1 udp 2122063615 127.0.0.1 45888 typ host generation 0 ufrag pNQ0 network-id 1::UNKNOWN]
2022-03-03 09:35:39.280 15842-16143/com.tongsoft.callphone D/Peer

[Bug] Upgrade Volley to 1.2.0

Bug Category

  • [ x] Other

SDK Version
1.2.7

Describe the bug
Due to the migration of volley to maven, version 1.1.1 no longer exists in most maven repositories. Newer versions are backwards compatible according to the devs.

Expected behaviour
Should be able to install the package using maven.

To Reproduce
Fresh install, attempt to install the package.

Logs
Available Volley versions.

https://maven.google.com/web/index.html?q=com.android.volley#com.android.volley:volley

google/volley#394

Improve CallState usage

SDK version used: 1.2.20-alpha.

So as I started to work with this lib I noticed CallState enum and I wanted to use it to update the states on the screen. Ex: CallState.Active call starts timer and shows controll buttons (mute, loud speaker and other). But as I noticed our calls contain SDP and thus I will never receive Active state just Connecting and that the call is in progress is send using SocketMethod.ANSWER.

Ok so then I thought I should listen to SocketMethod instead. But in this case when I as a user cancel the call I will only receive CallState.DONE and no SocketMethod. If the user on the other side cancels the call I will receive both CallState.DONE and SocketMethod.BYE.

So my question is. Why should I as a developer need to handle all these situations on my own? Why do I need to check SocketMethod aaand CallState + handle call states direcly? Wouldn't it be easier to just update CallState properly? If this were the case I would have 1 source of truth for call UI. I could connect the state to CallState and be done with it. In this case I cannot. :(

In this case I need to start a call:

  1. When the app receives SocketMethod.ANSWER for outgoing calls.
  2. When the user clicks accept call for incomming call.

In this case I need to cancel a call:

  1. When user clicks declines incomming call.
  2. When the app receives SocketMethod.BYE.

In the cancel case I noticed that CallState.DONE is received every time.

[Bug] Short Bug Description

Bug Category

  • Credential Login
  • Token Login
  • Local Audio Issue
  • Remote Audio Issue
  • Audio Device Switching
  • Mute / Unmute
  • Hold / Unhold
  • Performance issues
  • [x ] Other

SDK Version
implementation 'com.github.team-telnyx:telnyx-webrtc-android:v1.2.15-alpha'

Describe the bug
When i received call Push notification and call successfully accepted and then receiver pressed call end button then caller not received any call ended or bye listener

Expected behaviour
Call should be end caller end also if receiver end the call

To Reproduce
Steps to reproduce the behaviour:

  1. Receiver app should be in terminate state or killed
  2. Accept call from notification and try to end call

Android Device (please complete the following information):

  • Emulator: (false)
  • Android Device: [e.g. OnePlus &T]
  • Android Version: [e.g. 11 ]

[Bug] Short Bug Description

Bug Category

  • Credential Login
  • Token Login
  • Local Audio Issue
  • Remote Audio Issue
  • Audio Device Switching
  • Mute / Unmute
  • Hold / Unhold
  • Performance issues
  • Other

SDK Version
implementation 'com.github.team-telnyx:telnyx-webrtc-android:v1.2.12-alpha'

Describe the bug
Google detected a warning about WebRTC when we released the Android version and needs to fix it
There is a bug in the version of WebRTC used, which has a security vulnerability.
Details can be found here
https://support.google.com/faqs/answer/12577537

Expected behaviour
Just fix the WebRTC

To Reproduce
None

Android Device (please complete the following information):

  • Emulator: (true/false)
  • Android Device: [e.g. Pixel 6]
  • Android Version: [e.g. 12 ]

Logs
None

[Bug] End call crashes the app.

Bug Category

  • Credential Login
  • Token Login
  • Local Audio Issue
  • Remote Audio Issue
  • Audio Device Switching
  • Mute / Unmute
  • Hold / Unhold
  • Performance issues
  • Other

SDK Version
implementation 'com.github.team-telnyx:telnyx-webrtc-android:v1.2.21-alpha'

Describe the bug
Ending call might result with a crash when the call does not exist. Usually when call is already ended before with different call ID.

Expected behaviour
App does not crash.

To Reproduce
Steps to reproduce the behaviour:

  1. Receive FCM notification.
  2. Login to telnyx.
  3. Receive Invitation to the call with different call ID.
  4. Try to end call from FCM notification.

Android Device (please complete the following information):

  • Emulator: true.

Logs

Received FCM notification (call_id: "7535678e-7673-40b6-8f67-5617081498b3"):

2023-07-10 13:30:51.504 32069-32165 {metadata={"caller_name":"420732652757","caller_number":"420732652757","call_id":"7535678e-7673-40b6-8f67-5617081498b3"}, message=Incoming call!}

Logged in to telnyx:

2023-07-10 13:30:53.643 32069-32154 [TxSocket] Receiving [{"jsonrpc":"2.0","id":"6c6363f0-7408-4560-80a3-6184fe0e57e4","result":{"message":"logged in","sessid":"d9f641ec-a23d-43f7-a34c-1e8f8f517237"}}]

Received invitation using socket (call_id: "5cfc9563-e3ac-47bf-a219-991b368a95f5"):

2023-07-10 13:30:53.726 ReceivedMessageBody(method=telnyx_rtc.invite, result=InviteResponse(callId=5cfc9563-e3ac-47bf-a219-991b368a95f5, sdp=v=0
	o=FreeSWITCH 1688961698 1688961699 IN IP4 185.246.41.177
	s=FreeSWITCH
	c=IN IP4 185.246.41.177
	t=0 0
	a=msid-semantic: WMS vtpH0gotNgR65t6tGdaAOuqieQ7tNAe8
	m=audio 26956 RTP/SAVPF 0 8
	a=rtpmap:0 PCMU/8000
	a=rtpmap:8 PCMA/8000
	a=fingerprint:sha-256 87:53:CA:62:0C:9F:A1:36:57:F6:6B:B9:86:7F:6E:2B:71:DC:88:AF:60:DD:5C:74:6F:CF:3E:62:A1:CD:39:F4
	a=setup:actpass
	a=rtcp-mux
	a=rtcp:26956 IN IP4 185.246.41.177
	a=ssrc:1957889710 cname:TtFKAU4d0LaW46fB
	a=ssrc:1957889710 msid:vtpH0gotNgR65t6tGdaAOuqieQ7tNAe8 a0
	a=ssrc:1957889710 mslabel:vtpH0gotNgR65t6tGdaAOuqieQ7tNAe8
	a=ssrc:1957889710 label:vtpH0gotNgR65t6tGdaAOuqieQ7tNAe8a0
	a=ice-ufrag:ag1PAiYEYVYBm2A5
	a=ice-pwd:l5GLPAPGbPt6MyxNFos5whAl
	a=candidate:9695192498 1 udp 2130706431 185.246.41.177 26956 typ host generation 0
	a=candidate:9695192498 2 udp 2130706431 185.246.41.177 26956 typ host generation 0
	a=silenceSupp:off - - - -
	a=ptime:20
	a=sendrecv
	, callerIdName=420732652757, callerIdNumber=420732652757, sessid=d9f641ec-a23d-43f7-a34c-1e8f8f517237)

Then when I try to cancel the call from FCM it crashes the app.

2023-07-10 13:31:31.896 [TxSocket] Sending [{
		"id": "e47bafbf-0bf1-4363-b6bb-e1ba0e3dd753",
		"jsonrpc": "2.0",
		"method": "telnyx_rtc.bye",
		"params": {
			"cause": "USER_BUSY",
			"causeCode": 17,
			"dialogParams": {
			"callId": "e4264126-939d-403e-9703-be53c740db81"
		},
			"sessid": "d9f641ec-a23d-43f7-a34c-1e8f8f517237"
		}
	}]

This fails since the call does not exist.

2023-07-10 13:31:31.938 Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 32069 (.number.staging), pid 32069 (.number.staging)
2023-07-10 13:31:31.960 [TxSocket] Receiving [{"jsonrpc":"2.0","id":"e47bafbf-0bf1-4363-b6bb-e1ba0e3dd753","error":{"callID":"e4264126-939d-403e-9703-be53c740db81","message":"CALL DOES NOT EXIST","code":-32002}}]

2023-07-10 13:31:32.253 Cmdline: com.second.phone.number.staging
pid: 32069, tid: 32069, name: .number.staging  >>> com.second.phone.number.staging <<<
      #00 pc 00000000008c1973  /data/app/~~xxjc5n0s2OTB-pyhUfNdcA==/com.second.phone.number.staging-Y0Mv3h_WiaNnVm99rlXJXg==/base.apk!libjingle_peerconnection_so.so
	(Java_org_webrtc_PeerConnection_nativeClose+15) (BuildId: 6090771d6338227b)
      #03 pc 0000000000090128  [anon:dalvik-classes18.dex extracted in memory from
	/data/app/~~xxjc5n0s2OTB-pyhUfNdcA==/com.second.phone.number.staging-Y0Mv3h_WiaNnVm99rlXJXg==/base.apk!classes18.dex] (org.webrtc.PeerConnection.close+0)
      #05 pc 0000000000320704  [anon:dalvik-classes17.dex extracted in memory from
	/data/app/~~xxjc5n0s2OTB-pyhUfNdcA==/com.second.phone.number.staging-Y0Mv3h_WiaNnVm99rlXJXg==/base.apk!classes17.dex] (com.telnyx.webrtc.sdk.peer.Peer.disconnect+12)
      #07 pc 00000000003207b0  [anon:dalvik-classes17.dex extracted in memory from
	/data/app/~~xxjc5n0s2OTB-pyhUfNdcA==/com.second.phone.number.staging-Y0Mv3h_WiaNnVm99rlXJXg==/base.apk!classes17.dex] (com.telnyx.webrtc.sdk.peer.Peer.release+0)
      #09 pc 000000000031af0c  [anon:dalvik-classes17.dex extracted in memory from
	/data/app/~~xxjc5n0s2OTB-pyhUfNdcA==/com.second.phone.number.staging-Y0Mv3h_WiaNnVm99rlXJXg==/base.apk!classes17.dex] (com.telnyx.webrtc.sdk.Call.endCall+248)
      #11 pc 00000000000646b2  /data/data/com.second.phone.number.staging/code_cache/.overlay/base.apk/classes2.dex
	(com.second.phone.number.data.network.source.call.CallRemoteSourceImpl.endCall+286)
      #13 pc 0000000000067510  /data/data/com.second.phone.number.staging/code_cache/.overlay/base.apk/classes2.dex
	(com.second.phone.number.data.repository.CallRepositoryImpl.endCall+4)
      #15 pc 000000000006e4fe  /data/data/com.second.phone.number.staging/code_cache/.overlay/base.apk/classes2.dex
	(com.second.phone.number.domain.usecase.call.EndCallUseCase.invoke+22)
	  #17 pc 00000000000e92da  /data/data/com.second.phone.number.staging/code_cache/.overlay/base.apk/classes2.dex
	(com.second.phone.number.presentation.keypad.call.controller.CallControllerImpl.endCall+78)
	  #19 pc 00000000000e949c  /data/data/com.second.phone.number.staging/code_cache/.overlay/base.apk/classes2.dex
	(com.second.phone.number.presentation.keypad.call.controller.CallControllerImpl.onControlClick+128)
	  #21 pc 00000000000dd0f2  /data/data/com.second.phone.number.staging/code_cache/.overlay/base.apk/classes2.dex
	(com.second.phone.number.presentation.keypad.call.CallForegroundService.onStartCommand+278)

So this relates to other issues like why is the call id changing when it is the same call? Should the canceling call that does not exists really crash the app? And what is the reliable way to know if the call is active? Should I just ignore previous call ids, but what if that call is a real second call. What if I have two calls and I want to finish one of them?

So now I have no proper option to end specific call. If I ignore previous IDs then I lose second call which might be held. If I try to end all cal ids that I received I will crash the app. ๐Ÿคท

Migrate to Flow?

Do you plan to migrate away from LiveData to Flow? Using LiveData in Flow based application is kinda messy. Also LiveData are still nullable which can create additional edge-cases in the app.

Socket cannot be disconnected and connected again.

So imagine havng an app and a Foreground service for calling. If you have just app the socket works fine since the process finishes when the app finishes right? But when using a foreground service the process actually does not finish when the service is stopped. So there is a time when app is not active but the socket connection exists.

Thus a solution is to disconnect the socket when all observers disconnect (app and service). Well we can do that but then the socket cannot be reconnected anymore. So there is only one option. To tear down and recreate the telnyx client.

We have this solution and it seems to work fine but I would prefer to have a Singleton instance of TelnyxClient and just disconnect from the socket and then provide an option to create a new one.

[Bug] Received multiple incoming call firebase notifications for the same call.

Bug Category

  • Credential Login
  • Token Login
  • Local Audio Issue
  • Remote Audio Issue
  • Audio Device Switching
  • Mute / Unmute
  • Hold / Unhold
  • Performance issues
  • Other

SDK Version
implementation 'com.github.team-telnyx:telnyx-webrtc-android:v1.2.20-alpha'

Describe the bug
We received multiple firebase notifications for the same call. The app cannot decide which is the real one and accept the invitation.

Expected behaviour
We should receive only one notification.

To Reproduce
Steps to reproduce the behaviour:

  1. Login to tenyx.
  2. Connect firebase notifications.
  3. Create incoming call.

Android Device (please complete the following information):

  • Emulator: true.

Logs

2023-06-30 11:18:27.701 18842-18946 handleDataMessage({metadata={"caller_name":"420732652757","caller_number":"420732652757","call_id":"c64d5ac6-683f-4b52-91ec-a696da75d5b6"}, message=Incoming call!})
2023-06-30 11:18:31.374 18842-18951 handleDataMessage({metadata={"caller_name":"420732652757","caller_number":"420732652757","call_id":"f237c558-0ce5-43d9-b3d4-03d94b431043"}, message=Incoming call!})
2023-06-30 11:18:36.781 18842-18957 handleDataMessage({metadata={"caller_name":"420732652757","caller_number":"420732652757","call_id":"b3d5792a-e9f0-4812-b030-386db093d322"}, message=Incoming call!})

How can we receive 3 notification in the manner of seconds for the same call with a diffrent call ID?

[Bug] onChange abstract method on SocketResponse

Bug Category

  • Other

SDK Version
'com.github.team-telnyx:telnyx-webrtc-android:v1.2.20-alpha'

Describe the bug
After updating the "implementation 'com.google.accompanist:accompanist-permissions:0.34.0'" library in jetpack compose we got "Object is not abstract and does not implement abstract base class member public abstract fun onChanged(value: SocketResponse): Unit defined in com.telnyx.webrtc.sdk.verto.receive.SocketObserver" error in socket response observer.

Expected behaviour
Telnyx method functionality working same after upgrading other library version

To Reproduce
Steps to reproduce the behaviour:

  1. Upgrade jetpack compose permission '0.28.0' to '0.34.0'
  2. Sync gradle and run app

Android Device (please complete the following information):

  • Any device

Logs
1.
Object is not abstract and does not implement abstract base class member public abstract fun onChanged(value: SocketResponse): Unit defined in com.telnyx.webrtc.sdk.verto.receive.SocketObserver

After implementing onChanged
2.
Accidental override: The following declarations have the same JVM signature (onChanged(Lcom/telnyx/webrtc/sdk/verto/receive/SocketResponse;)V):
fun onChanged(value: SocketResponse): Unit defined in amplify.call.models.viewmodels.TelnyxViewModel.observerResponse.<no name provided>
fun onChanged(t: SocketResponse?): Unit defined in amplify.call.models.viewmodels.TelnyxViewModel.observerResponse.<no name provided>

[Bug] Unable to login on socket

Bug Category

  • Credential Login
  • Token Login
  • Local Audio Issue
  • Remote Audio Issue
  • Audio Device Switching
  • Mute / Unmute
  • Hold / Unhold
  • Performance issues
  • Other

SDK Version
implementation 'com.github.team-telnyx:telnyx-webrtc-android:v1.2.15-alpha'

Describe the bug
Unable to login on socket . It toast error "Gateway registration failed"

Expected behaviour
A clear and concise description of what you expected to happen.

To Reproduce
Steps to reproduce the behaviour:

  1. Log on with credentials
  2. Socket error then returned

Android Device (please complete the following information):

  • Emulator: (false)
  • Android Device: One Plus 7T

Logs
image
image
image
image
image

[Bug] Short Bug Description

Bug Category

  • Credential Login true
  • Token Login false
  • Local Audio Issue true
  • Remote Audio Issue true
  • Audio Device Switching
  • Mute / Unmute
  • Hold / Unhold
  • Performance issues
  • Other

SDK Version
Which version of the SDK have you added from Jitpack? Feel free to add the whole dependency implementation:
eg. implementation 'com.github.team-telnyx:telnyx-webrtc-android:v1.2.12-alpha'
sdk version v1.2.1.16

Describe the bug
A clear and concise description of what the bug is.

1.At first, we could log in normally, but now we can't even log in. What we need to solve now is the problem of online apps
2.After a period of outbound call, the time is about 50s. The voice media transmission stops, but the outbound call will not be interrupted

Expected behaviour
A clear and concise description of what you expected to happen.

Normal call No matter how long the call lasts, the voice media will not be interrupted

To Reproduce
Steps to reproduce the behaviour:

  1. e.g. (Log on with credentials) Login with on-demand credentials
  2. e.g. (Socket error then returned)

Android Device (please complete the following information):

  • Emulator: (true/false) false
  • Android Device: [e.g. Pixel 6] SM-G9500
  • Android Version: [e.g. 12 ] android 9

Logs
Please provide any logs available to you, remember to enable verbose logging within the SDK. It is generally helpful to filter by either TxSocket (Socket messages) or TelnyxClient (Client messages) or both depending on the situation.

2022-10-28 12:00:06.845 20472-20569/com.telnyx.webrtc.sdk I/TxSocket: Socket is closed: null java.net.UnknownHostException: Unable to resolve host "rtc.telnyx.com": No address associated with hostname :: Will attempt to reconnect

2022-10-28 12:00:06.699 20472-20565/com.telnyx.webrtc.sdk D/TelnyxClient$networkCallback: [TelnyxClient] :: There is a network available

[Bug] Issue on incoming call

Bug Category

  • Credential Login
  • Token Login
  • [x ] Local Audio Issue
  • [x ] Remote Audio Issue
  • Audio Device Switching
  • Mute / Unmute
  • Hold / Unhold
  • Performance issues
  • Other

SDK Version
Which version of the SDK have you added from Jitpack? Feel free to add the whole dependency implementation:
Implementation 'com.github.team-telnyx:telnyx-webrtc-android:v1.2.4'

Describe the bug
When an incoming call is received in Samsung M12 (Android 13), the call is not audible i.e. the microphone and speakers are inactive most of the time.

Expected behaviour
The microphone and speakers should have been active to make clear communication between 2 devices during the incoming calls.

To Reproduce
Steps to reproduce the behaviour:

  1. Login with credentials
  2. Listen socket
  3. Accept call

Android Device (please complete the following information):

  • Emulator: (false)
  • Android Device: [Samsung m12]
  • Android Version: [13]

Some question about receiving a call

Hi,
this is not a bug, just a question I want to know.
if I set a real caller ID number(e.g. +13235467788) when using telnyx app to make a call to someone, for that call receiver, he will see a incoming call with "+13235467788", but if he call back, which one will receive the call? telnyx app or the real owner of number "+13235467788".
in short, how does telnyx tell if it should call the real owner of the incoming phone number or the telnyx app when calling back?

[Bug] Cannot make calls

Bug Category

  • [] Credential Login
  • Token Login
  • Local Audio Issue
  • Remote Audio Issue
  • Audio Device Switching
  • Mute / Unmute
  • Hold / Unhold
  • Performance issues
  • [ *] Other

SDK Version
Which version of the SDK have you added from Jitpack? Feel free to add the whole dependency implementation:
eg. implementation 'com.github.team-telnyx:telnyx-webrtc-android:v1.2.12-alpha'

com.github.team-telnyx:telnyx-webrtc-android:v1.2.16-alpha

Describe the bug
A clear and concise description of what the bug is.

Outbound calls cannot be executed

Expected behaviour
A clear and concise description of what you expected to happen.

It should make out calls

To Reproduce
Steps to reproduce the behaviour:

  1. e.g. (Log on with credentials)
  2. e.g. (Socket error then returned)

Android Device (please complete the following information):

  • Emulator: (true/false) true
  • Android Device: [e.g. Pixel 6] Pixel 2 API 30
  • Android Version: [e.g. 12 ] 12

Logs
Please provide any logs available to you, remember to enable verbose logging within the SDK. It is generally helpful to filter by either TxSocket (Socket messages) or TelnyxClient (Client messages) or both depending on the situation.

2022-10-24 21:24:06.715 10601-10788/com.mysecondline.app D/VERTO: [TxSocket] Receiving [{"jsonrpc":"2.0","id":106148,"method":"telnyx_rtc.clientReady","params":{"reattached_sessions":[]}}]
2022-10-24 21:24:06.720 10601-10788/com.mysecondline.app D/VERTO: [TxSocket] Received Method [telnyx_rtc.clientReady]
2022-10-24 21:24:06.725 10601-10788/com.mysecondline.app D/TelnyxClient: [TelnyxClient] :: onClientReady :: retrieving gateway state
2022-10-24 21:24:06.726 10601-10788/com.mysecondline.app D/VERTO: [TxSocket] Sending [{
"id": "0a50fd6c-beca-4a77-a39c-eb82ca624e40",
"jsonrpc": "2.0",
"method": "telnyx_rtc.gatewayState",
"params": {}
}]
2022-10-24 21:24:07.164 10601-10788/com.mysecondline.app D/VERTO: [TxSocket] Receiving [{"jsonrpc":"2.0","id":106149,"method":"telnyx_rtc.gatewayState","params":{"state":"TRYING"}}]
2022-10-24 21:24:07.365 10601-10788/com.mysecondline.app D/VERTO: [TxSocket] Receiving [{"jsonrpc":"2.0","id":106150,"method":"telnyx_rtc.gatewayState","params":{"state":"REGISTER"}}]
2022-10-24 21:24:08.166 10601-10788/com.mysecondline.app D/VERTO: [TxSocket] Receiving [{"jsonrpc":"2.0","id":106151,"method":"telnyx_rtc.gatewayState","params":{"state":"REGED"}}]
2022-10-24 21:24:08.170 10601-10788/com.mysecondline.app D/TelnyxClient: [TelnyxClient] :: onLoginSuccessful :: [083dfcc0-1a26-4701-9b94-17d84f5c5e30] :: Ready to make calls
2022-10-24 21:24:36.900 10601-10788/com.mysecondline.app D/VERTO: [TxSocket] Receiving [{"jsonrpc":"2.0","id":106186,"method":"telnyx_rtc.ping","params":{"serno":1666671877}}]
2022-10-24 21:24:36.900 10601-10788/com.mysecondline.app D/VERTO: [TxSocket] Received Method [telnyx_rtc.ping]

[Bug] Received FCM notification for call with connected socket (socket did not receive the information).

Bug Category

  • Credential Login
  • Token Login
  • Local Audio Issue
  • Remote Audio Issue
  • Audio Device Switching
  • Mute / Unmute
  • Hold / Unhold
  • Performance issues
  • Other

SDK Version
implementation 'com.github.team-telnyx:telnyx-webrtc-android:v1.2.21-alpha'

Describe the bug
App is started and connected to socket. Incoming call is send using FCM instead into the socket directly.

Expected behaviour
Socket receives the call and no FCM notification is posted.

To Reproduce
Not really sure how I got into this state actually.

I believe my app crashed because it was not able to send Bye to socket.
Then I tried calling to the app (to receive FCM notification) which did not arrive at the time.
Incoming call then auto closed.
Then I started the app and it received the call notification (for call that does not exists anymore).
I tried to cancel the call but I was not able to since it does not exist anymore.
And then I tried calling again to the app in the foreground and this happened.

Android Device (please complete the following information):

  • Emulator: true

Logs
Please provide any logs available to you, remember to enable verbose logging within the SDK. It is generally helpful to filter by either TxSocket (Socket messages) or TelnyxClient (Client messages) or both depending on the situation.

Connected socket in the app:

2023-07-07 13:34:52.497 14433-14522 VERTO                   com.second.phone.number.staging      D  [TxSocket] Receiving [{"jsonrpc":"2.0","id":29348,"method":"telnyx_rtc.ping","params":{"serno":1688729693}}]
2023-07-07 13:34:52.499 14433-14522 VERTO                   com.second.phone.number.staging      D  [TxSocket] Received Method [telnyx_rtc.ping]
2023-07-07 13:34:52.501 14433-14522 TelnyxClient            com.second.phone.number.staging      D  [TelnyxClient] :: pingPong 
2023-07-07 13:34:52.542 14433-14522 VERTO                   com.second.phone.number.staging      D  [TxSocket] Receiving [{"jsonrpc":"2.0","id":29348,"result":{"message":"PONG","sessid":"6b9e87c1-8f38-4a84-9be7-e28f75aa75d9"}}]
2023-07-07 13:35:03.348 14433-14522 VERTO                   com.second.phone.number.staging      D  [TxSocket] Receiving [{"jsonrpc":"2.0","id":29417,"method":"telnyx_rtc.gatewayState","params":{"state":"TRYING"}}]
2023-07-07 13:35:03.349 14433-14522 VERTO                   com.second.phone.number.staging      D  [TxSocket] Receiving [{"jsonrpc":"2.0","id":29419,"method":"telnyx_rtc.gatewayState","params":{"state":"REGISTER"}}]
2023-07-07 13:35:04.269 14433-14522 VERTO                   com.second.phone.number.staging      D  [TxSocket] Receiving [{"jsonrpc":"2.0","id":29423,"method":"telnyx_rtc.gatewayState","params":{"state":"REGED"}}]
2023-07-07 13:35:04.269 14433-14522 TelnyxClient            com.second.phone.number.staging      D  [TelnyxClient] :: onLoginSuccessful :: [6b9e87c1-8f38-4a84-9be7-e28f75aa75d9] :: Ready to make calls

But notification is received instead of directly updating socket:

2023-07-07 13:35:06.959 14433-15165 SpnFirebas...ingService com.second.phone.number.staging      D  SpnFirebaseMessagingService.onMessageReceived(com.google.firebase.messaging.RemoteMessage@b55637e)
2023-07-07 13:35:06.960 14433-15165 SpnFirebas...ingService com.second.phone.number.staging      D  handleDataMessage({metadata={"caller_name":"420732652757","caller_number":"420732652757","call_id":"b7893ab5-616d-4943-a77b-484fb850e75c"}, message=Incoming call!})

It worked properly for the second call.

Better app call test options.

So is there an option to have Call as an interface and have Actual implementation and Test implementation? Actual would work as the Call works currently. Test implementation would not actually create a call but it would only set proper states and have convinient functions so the apps using this lib could be easily tested.

Test functions could be for example:

  • targetCanceledCall - which would send CallState.Done and SocketMethod.BYE as a real call does.
  • targetAcceptedCall - which would send CallState.Active, SocketMethod.Answer or both.

This would allow app developer to test the call before it can be tested on production.

That would also allow to have the Call as non-nullable. It is kinda weird to have Call nullable in production just because of testing. This adds additional edge cases to the app.

[Bug] The called party has no sound

Bug Category

  • Credential Login

SDK Version
Demo zip downloaded on January 18

Describe the bug
After the first installation, the call is completed and connected, everything is normal and the call is closed. After the second call and connected, the called party has no sound

Expected behaviour
After the call is connected, both the calling party and the called party can hear each other's voice

To Reproduce
Steps to reproduce the behaviour:
After logging in with on-demand credentials, call + 12082544968. After the called party answers, both parties can talk normally, and can get the voice. Hang up the call. For the second call, after the called party answers, the calling party can get the voice of the other party, but the called party cannot hear the voice

Android Device ():

  • Emulator: (true)
  • Android Device: Real machine test Samsung Galaxy S8 SM-G950U
  • Android Version: Android 9

Logs

GMT+8

2022-01-18 15:12:01.082 27338-27397/com.telnyx.webrtc.sdk D/TelnyxClient$networkCallback: [TelnyxClient] :: There is a network available
2022-01-18 15:12:02.246 27338-27406/com.telnyx.webrtc.sdk D/VERTO: [TxSocket] Connection established :: rtc.telnyx.com
2022-01-18 15:12:02.247 27338-27406/com.telnyx.webrtc.sdk D/TelnyxClient: [TelnyxClient] :: onConnectionEstablished
2022-01-18 15:12:02.270 27338-27338/com.telnyx.webrtc.sdk D/VERTO: [TxSocket] Sending [{"id":"30155a06-9ed8-461d-ad4b-6f08b1dc7909","jsonrpc":"2.0","method":"login","params":{"login":"gencredmTes1z2Ocsd0hwPHoxu4enRyF8IJpUTzZ7opJEnHQp","loginParams":[],"passwd":"ec28bd8ac2c644f1a71fb1ca86996f68","userVariables":{"push_device_token":"eYcYgYd7RsS81yNaCKz-sq:APA91bEF-KUQIFnyXCBgFrIyZxe6zTPoHROPn5YNSiC8e8JsFkvCdGe7Tl1ExwLoocOF7_611sKGfr0BvyAEkzCgZx6wAJyAlrMz7Defi-MEGEdhsetkruG3iU0zchLelY9lDW4CpvUJ","push_notification_provider":"android"}}}]
2022-01-18 15:12:02.459 27338-27406/com.telnyx.webrtc.sdk D/VERTO: [TxSocket] Receiving [{"jsonrpc":"2.0","id":"30155a06-9ed8-461d-ad4b-6f08b1dc7909","result":{"message":"logged in","sessid":"437fea8f-6033-4633-9bbb-40d55e236ccd"}}]
2022-01-18 15:12:02.510 27338-27406/com.telnyx.webrtc.sdk D/VERTO: [TxSocket] Receiving [{"jsonrpc":"2.0","id":3084,"method":"telnyx_rtc.clientReady","params":{"reattached_sessions":[]}}]
2022-01-18 15:12:02.512 27338-27406/com.telnyx.webrtc.sdk D/VERTO: [TxSocket] Received Method [telnyx_rtc.clientReady]
2022-01-18 15:12:02.513 27338-27406/com.telnyx.webrtc.sdk D/TelnyxClient: [TelnyxClient] :: onClientReady :: retrieving gateway state
2022-01-18 15:12:02.515 27338-27406/com.telnyx.webrtc.sdk D/VERTO: [TxSocket] Sending [{"id":"48007fa2-3cb9-4ee4-934c-72453239748a","jsonrpc":"2.0","method":"telnyx_rtc.gatewayState","params":{}}]
2022-01-18 15:12:02.708 27338-27406/com.telnyx.webrtc.sdk D/VERTO: [TxSocket] Receiving [{"jsonrpc":"2.0","id":"48007fa2-3cb9-4ee4-934c-72453239748a","result":{"params":{"state":"REGED"},"sessid":"437fea8f-6033-4633-9bbb-40d55e236ccd"}}]
2022-01-18 15:12:02.716 27338-27406/com.telnyx.webrtc.sdk D/TelnyxClient: [TelnyxClient] :: onLoginSuccessful :: [437fea8f-6033-4633-9bbb-40d55e236ccd] :: Ready to make calls
2022-01-18 15:12:03.979 27338-27338/com.telnyx.webrtc.sdk D/TelnyxClient: ringtone/ringback media player stopped and released
2022-01-18 15:12:04.151 27338-27425/com.telnyx.webrtc.sdk D/VERTO: [TxSocket] Sending [{"id":"57427ba2-13e6-48dd-a7d5-1a37ea928afc","jsonrpc":"2.0","method":"telnyx_rtc.invite","params":{"dialogParams":{"attach":false,"audio":true,"callID":"0d43d066-e1ff-4996-bb2b-cb2d5d0a6ef2","caller_id_name":"alice","caller_id_number":"+12142866127","clientState":"U2FtcGxlIENsaWVudCBTdGF0ZQ\u003d\u003d\n","destination_number":"+12082544968","remote_caller_id_name":"","screenShare":false,"useStereo":false,"userVariables":[],"video":false},"sdp":"v\u003d0\r\no\u003d- 4874457196128902914 2 IN IP4 127.0.0.1\r\ns\u003d-\r\nt\u003d0 0\r\na\u003dgroup:BUNDLE audio\r\na\u003dmsid-semantic: WMS audio_local_stream\r\nm\u003daudio 35377 UDP/TLS/RTP/SAVPF 111 103 104 9 102 0 8 106 105 13 110 112 113 126\r\nc\u003dIN IP4 192.168.1.105\r\na\u003drtcp:9 IN IP4 0.0.0.0\r\na\u003dcandidate:2222700650 1 udp 2122260223 192.168.1.105 35377 typ host generation 0 network-id 4 network-cost 10\r\na\u003dcandidate:314413345 1 udp 2122194687 26.26.26.21 49765 typ host generation 0 network-id 3 network-cost 50\r\na\u003dcandidate:559267639 1 udp 2122136831 ::1 48633 typ host generation 0 network-id 2\r\na\u003dcandidate:1510613869 1 udp 2122063615 127.0.0.1 37619 typ host generation 0 network-id 1\r\na\u003dcandidate:3405268122 1 tcp 1518280447 192.168.1.105 50576 typ host tcptype passive generation 0 network-id 4 network-cost 10\r\na\u003dcandidate:1547595217 1 tcp 1518214911 26.26.26.21 36188 typ host tcptype passive generation 0 network-id 3 network-cost 50\r\na\u003dcandidate:1876313031 1 tcp 1518157055 ::1 57249 typ host tcptype passive generation 0 network-id 2\r\na\u003dcandidate:344579997 1 tcp 1518083839 127.0.0.1 49808 typ host tcptype passive generation 0 network-id 1\r\na\u003dice-ufrag:BMf8\r\na\u003dice-pwd:Lq57Zq614kZX8W7s0yC7QADx\r\na\u003dice-options:trickle renomination\r\na\u003dfingerprint:sha-256 12:B9:07:B3:68:98:36:F7:B3:19:95:4A:FD:4E:40:A9:15:62:51:B6:8B:42:51:A4:AC:00:A7:F1:D4:40:F9:8B\r\na\u003dsetup:actpass\r\na\u003dmid:audio\r\na\u003dextmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\na\u003dextmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na\u003dextmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na\u003dsendrecv\r\na\u003drtcp-mux\r\na\u003drtpmap:111 opus/48000/2\r\na\u003drtcp-fb:111 transport-cc\r\na\u003dfmtp:111 minptime\u003d10;useinbandfec\u003d1\r\na\u003drtpmap:103 ISAC/16000\r\na\u003drtpmap:104 ISAC/32000\r\na\u003drtpmap:9 G722/8000\r\na\u003drtpmap:102 ILBC/8000\r\na\u003drtpmap:0 PCMU/8000\r\na\u003drtpmap:8 PCMA/8000\r\na\u003drtpmap:106 CN/32000\r\na\u003drtpmap:105 CN/16000\r\na\u003drtpmap:13 CN/8000\r\na\u003drtpmap:110 telephone-event/48000\r\na\u003drtpmap:112 telephone-event/32000\r\na\u003drtpmap:113 telephone-event/16000\r\na\u003drtpmap:126 telephone-event/8000\r\na\u003dssrc:3717374036 cname:TH6PCEL4ZEcY1ZL4\r\na\u003dssrc:3717374036 msid:audio_local_stream audio_local_track\r\na\u003dssrc:3717374036 mslabel:audio_local_stream\r\na\u003dssrc:3717374036 label:audio_local_track\r\n","sessionId":"437fea8f-6033-4633-9bbb-40d55e236ccd","User-Agent":"Android-1.0"}}]
2022-01-18 15:12:04.352 27338-27406/com.telnyx.webrtc.sdk D/VERTO: [TxSocket] Receiving [{"jsonrpc":"2.0","id":"57427ba2-13e6-48dd-a7d5-1a37ea928afc","result":{"message":"CALL CREATED","callID":"0d43d066-e1ff-4996-bb2b-cb2d5d0a6ef2","sessid":"437fea8f-6033-4633-9bbb-40d55e236ccd"}}]
2022-01-18 15:12:05.521 27338-27406/com.telnyx.webrtc.sdk D/VERTO: [TxSocket] Receiving [{"jsonrpc":"2.0","id":3087,"method":"telnyx_rtc.ringing","params":{"callID":"0d43d066-e1ff-4996-bb2b-cb2d5d0a6ef2","caller_id_name":"alice","caller_id_number":"+12142866127","callee_id_name":"Outbound Call","callee_id_number":"+12082544968","telnyx_session_id":"f07e4b66-782d-11ec-8b8f-02420a0d5b68","telnyx_leg_id":"f07e38d8-782d-11ec-b440-02420a0d5b68","display_direction":"inbound"}}]
2022-01-18 15:12:05.524 27338-27406/com.telnyx.webrtc.sdk D/VERTO: [TxSocket] Received Method [telnyx_rtc.ringing]
2022-01-18 15:12:05.527 27338-27406/com.telnyx.webrtc.sdk D/TelnyxClient: [TelnyxClient] :: onRingingReceived [{"jsonrpc":"2.0","id":3087,"method":"telnyx_rtc.ringing","params":{"callID":"0d43d066-e1ff-4996-bb2b-cb2d5d0a6ef2","caller_id_name":"alice","caller_id_number":"+12142866127","callee_id_name":"Outbound Call","callee_id_number":"+12082544968","telnyx_session_id":"f07e4b66-782d-11ec-8b8f-02420a0d5b68","telnyx_leg_id":"f07e38d8-782d-11ec-b440-02420a0d5b68","display_direction":"inbound"}}]
2022-01-18 15:12:06.554 27338-27406/com.telnyx.webrtc.sdk D/VERTO: [TxSocket] Receiving [{"jsonrpc":"2.0","id":3088,"method":"telnyx_rtc.media","params":{"callID":"0d43d066-e1ff-4996-bb2b-cb2d5d0a6ef2","sdp":"v=0\r\no=FreeSWITCH 1642463911 1642463912 IN IP4 103.115.244.151\r\ns=FreeSWITCH\r\nc=IN IP4 103.115.244.151\r\nt=0 0\r\na=msid-semantic: WMS DGjs77skoYXoBEtOqvTV46YXcub5lZSP\r\nm=audio 26014 UDP/TLS/RTP/SAVPF 111 110\r\na=rtpmap:111 opus/48000/2\r\na=fmtp:111 useinbandfec=1; minptime=10\r\na=rtpmap:110 telephone-event/48000\r\na=silenceSupp:off - - - -\r\na=ptime:20\r\na=sendrecv\r\na=mid:audio\r\na=fingerprint:sha-256 71:56:1E:99:86:EA:3F:17:36:FD:38:C8:F5:90:B8:55:C0:8E:6B:8B:34:B8:A5:10:E0:DB:A2:51:0D:E2:47:AF\r\na=setup:active\r\na=rtcp-mux\r\na=rtcp:26014 IN IP4 103.115.244.151\r\na=ice-ufrag:72Z1YNP08RWjGEY2\r\na=ice-pwd:wWnmcSqgaILYjU1gNR8CuOts\r\na=candidate:7630078012 1 udp 2130706431 103.115.244.151 26014 typ host generation 0\r\na=end-of-candidates\r\na=ssrc:1911013171 cname:w17uZpEedssFXLjd\r\na=ssrc:1911013171 msid:DGjs77skoYXoBEtOqvTV46YXcub5lZSP a0\r\na=ssrc:1911013171 mslabel:DGjs77skoYXoBEtOqvTV46YXcub5lZSP\r\na=ssrc:1911013171 label:DGjs77skoYXoBEtOqvTV46YXcub5lZSPa0\r\n"}}]
2022-01-18 15:12:06.573 27338-27406/com.telnyx.webrtc.sdk D/VERTO: [TxSocket] Received Method [telnyx_rtc.media]
2022-01-18 15:12:12.055 27338-27406/com.telnyx.webrtc.sdk D/VERTO: [TxSocket] Receiving [{"jsonrpc":"2.0","id":3089,"method":"telnyx_rtc.answer","params":{"callID":"0d43d066-e1ff-4996-bb2b-cb2d5d0a6ef2"}}]
2022-01-18 15:12:12.067 27338-27406/com.telnyx.webrtc.sdk D/VERTO: [TxSocket] Received Method [telnyx_rtc.answer]
2022-01-18 15:12:12.130 27338-27406/com.telnyx.webrtc.sdk D/TelnyxClient: ringtone/ringback media player stopped and released
2022-01-18 15:12:31.496 27338-27338/com.telnyx.webrtc.sdk D/VERTO: [TxSocket] Sending [{"id":"a80b2f0e-1a02-4755-882a-f152085e22cd","jsonrpc":"2.0","method":"telnyx_rtc.bye","params":{"cause":"USER_BUSY","causeCode":1,"dialogParams":{"callId":"0d43d066-e1ff-4996-bb2b-cb2d5d0a6ef2"},"sessionId":"437fea8f-6033-4633-9bbb-40d55e236ccd"}}]
2022-01-18 15:12:31.498 27338-27338/com.telnyx.webrtc.sdk D/TelnyxClient: ringtone/ringback media player stopped and released
2022-01-18 15:12:31.688 27338-27406/com.telnyx.webrtc.sdk D/VERTO: [TxSocket] Receiving [{"jsonrpc":"2.0","id":"a80b2f0e-1a02-4755-882a-f152085e22cd","result":{"callID":"0d43d066-e1ff-4996-bb2b-cb2d5d0a6ef2","sip_call_id":"eaeb7203-3824-449b-a4a6-f60dc02694e5","message":"CALL ENDED","causeCode":17,"cause":"USER_BUSY","sessid":"437fea8f-6033-4633-9bbb-40d55e236ccd"}}]
2022-01-18 15:12:33.822 27338-27338/com.telnyx.webrtc.sdk D/TelnyxClient: ringtone/ringback media player stopped and released
2022-01-18 15:12:34.106 27338-27483/com.telnyx.webrtc.sdk D/VERTO: [TxSocket] Sending [{"id":"354e7359-1b88-4fd7-8f7c-5548de0a208e","jsonrpc":"2.0","method":"telnyx_rtc.invite","params":{"dialogParams":{"attach":false,"audio":true,"callID":"c63e1f5c-51a0-434d-82c8-9b7b8de06226","caller_id_name":"alice","caller_id_number":"+12142866127","clientState":"U2FtcGxlIENsaWVudCBTdGF0ZQ\u003d\u003d\n","destination_number":"+12082544968","remote_caller_id_name":"","screenShare":false,"useStereo":false,"userVariables":[],"video":false},"sdp":"v\u003d0\r\no\u003d- 4398966707657479932 2 IN IP4 127.0.0.1\r\ns\u003d-\r\nt\u003d0 0\r\na\u003dgroup:BUNDLE audio\r\na\u003dmsid-semantic: WMS audio_local_stream\r\nm\u003daudio 47364 UDP/TLS/RTP/SAVPF 111 103 104 9 102 0 8 106 105 13 110 112 113 126\r\nc\u003dIN IP4 192.168.1.105\r\na\u003drtcp:9 IN IP4 0.0.0.0\r\na\u003dcandidate:2222700650 1 udp 2122260223 192.168.1.105 47364 typ host generation 0 network-id 4 network-cost 10\r\na\u003dcandidate:314413345 1 udp 2122194687 26.26.26.21 45100 typ host generation 0 network-id 3 network-cost 50\r\na\u003dcandidate:559267639 1 udp 2122136831 ::1 37784 typ host generation 0 network-id 2\r\na\u003dcandidate:1510613869 1 udp 2122063615 127.0.0.1 41528 typ host generation 0 network-id 1\r\na\u003dcandidate:3405268122 1 tcp 1518280447 192.168.1.105 44209 typ host tcptype passive generation 0 network-id 4 network-cost 10\r\na\u003dcandidate:1547595217 1 tcp 1518214911 26.26.26.21 58634 typ host tcptype passive generation 0 network-id 3 network-cost 50\r\na\u003dcandidate:1876313031 1 tcp 1518157055 ::1 53597 typ host tcptype passive generation 0 network-id 2\r\na\u003dcandidate:344579997 1 tcp 1518083839 127.0.0.1 39045 typ host tcptype passive generation 0 network-id 1\r\na\u003dice-ufrag:csWC\r\na\u003dice-pwd:nBhmjYHml7/QCHXM/jMrr8fV\r\na\u003dice-options:trickle renomination\r\na\u003dfingerprint:sha-256 1F:65:3B:A7:04:6A:EE:CC:45:89:98:64:BC:8F:29:13:50:7F:90:8F:2E:07:89:52:B0:B7:C6:02:BF:1F:7E:28\r\na\u003dsetup:actpass\r\na\u003dmid:audio\r\na\u003dextmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\na\u003dextmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na\u003dextmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na\u003dsendrecv\r\na\u003drtcp-mux\r\na\u003drtpmap:111 opus/48000/2\r\na\u003drtcp-fb:111 transport-cc\r\na\u003dfmtp:111 minptime\u003d10;useinbandfec\u003d1\r\na\u003drtpmap:103 ISAC/16000\r\na\u003drtpmap:104 ISAC/32000\r\na\u003drtpmap:9 G722/8000\r\na\u003drtpmap:102 ILBC/8000\r\na\u003drtpmap:0 PCMU/8000\r\na\u003drtpmap:8 PCMA/8000\r\na\u003drtpmap:106 CN/32000\r\na\u003drtpmap:105 CN/16000\r\na\u003drtpmap:13 CN/8000\r\na\u003drtpmap:110 telephone-event/48000\r\na\u003drtpmap:112 telephone-event/32000\r\na\u003drtpmap:113 telephone-event/16000\r\na\u003drtpmap:126 telephone-event/8000\r\na\u003dssrc:4194333168 cname:P1To7fvi4Z9m+7ys\r\na\u003dssrc:4194333168 msid:audio_local_stream audio_local_track\r\na\u003dssrc:4194333168 mslabel:audio_local_stream\r\na\u003dssrc:4194333168 label:audio_local_track\r\n","sessionId":"437fea8f-6033-4633-9bbb-40d55e236ccd","User-Agent":"Android-1.0"}}]
2022-01-18 15:12:34.304 27338-27406/com.telnyx.webrtc.sdk D/VERTO: [TxSocket] Receiving [{"jsonrpc":"2.0","id":"354e7359-1b88-4fd7-8f7c-5548de0a208e","result":{"message":"CALL CREATED","callID":"c63e1f5c-51a0-434d-82c8-9b7b8de06226","sessid":"437fea8f-6033-4633-9bbb-40d55e236ccd"}}]
2022-01-18 15:12:35.515 27338-27406/com.telnyx.webrtc.sdk D/VERTO: [TxSocket] Receiving [{"jsonrpc":"2.0","id":3091,"method":"telnyx_rtc.ringing","params":{"callID":"c63e1f5c-51a0-434d-82c8-9b7b8de06226","caller_id_name":"alice","caller_id_number":"+12142866127","callee_id_name":"Outbound Call","callee_id_number":"+12082544968","telnyx_session_id":"02597310-782e-11ec-a845-02420a0d5b68","telnyx_leg_id":"0259621c-782e-11ec-9056-02420a0d5b68","display_direction":"inbound"}}]
2022-01-18 15:12:35.525 27338-27406/com.telnyx.webrtc.sdk D/VERTO: [TxSocket] Received Method [telnyx_rtc.ringing]
2022-01-18 15:12:35.534 27338-27406/com.telnyx.webrtc.sdk D/TelnyxClient: [TelnyxClient] :: onRingingReceived [{"jsonrpc":"2.0","id":3091,"method":"telnyx_rtc.ringing","params":{"callID":"c63e1f5c-51a0-434d-82c8-9b7b8de06226","caller_id_name":"alice","caller_id_number":"+12142866127","callee_id_name":"Outbound Call","callee_id_number":"+12082544968","telnyx_session_id":"02597310-782e-11ec-a845-02420a0d5b68","telnyx_leg_id":"0259621c-782e-11ec-9056-02420a0d5b68","display_direction":"inbound"}}]
2022-01-18 15:12:36.061 27338-27406/com.telnyx.webrtc.sdk D/VERTO: [TxSocket] Receiving [{"jsonrpc":"2.0","id":3092,"method":"telnyx_rtc.media","params":{"callID":"c63e1f5c-51a0-434d-82c8-9b7b8de06226","sdp":"v=0\r\no=FreeSWITCH 1642463125 1642463126 IN IP4 103.115.244.151\r\ns=FreeSWITCH\r\nc=IN IP4 103.115.244.151\r\nt=0 0\r\na=msid-semantic: WMS AakRdwLQhUYJSWEQlPNKwh0k05ZvB3D2\r\nm=audio 26830 UDP/TLS/RTP/SAVPF 111 110\r\na=rtpmap:111 opus/48000/2\r\na=fmtp:111 useinbandfec=1; minptime=10\r\na=rtpmap:110 telephone-event/48000\r\na=silenceSupp:off - - - -\r\na=ptime:20\r\na=sendrecv\r\na=mid:audio\r\na=fingerprint:sha-256 71:56:1E:99:86:EA:3F:17:36:FD:38:C8:F5:90:B8:55:C0:8E:6B:8B:34:B8:A5:10:E0:DB:A2:51:0D:E2:47:AF\r\na=setup:active\r\na=rtcp-mux\r\na=rtcp:26830 IN IP4 103.115.244.151\r\na=ice-ufrag:18bof2y6XorphVib\r\na=ice-pwd:zS8A3MJ0erEtEZUvYWK4O90C\r\na=candidate:4057180990 1 udp 2130706431 103.115.244.151 26830 typ host generation 0\r\na=end-of-candidates\r\na=ssrc:1911013201 cname:3OJ7blOi6CSOomvA\r\na=ssrc:1911013201 msid:AakRdwLQhUYJSWEQlPNKwh0k05ZvB3D2 a0\r\na=ssrc:1911013201 mslabel:AakRdwLQhUYJSWEQlPNKwh0k05ZvB3D2\r\na=ssrc:1911013201 label:AakRdwLQhUYJSWEQlPNKwh0k05ZvB3D2a0\r\n"}}]
2022-01-18 15:12:36.067 27338-27406/com.telnyx.webrtc.sdk D/VERTO: [TxSocket] Received Method [telnyx_rtc.media]
2022-01-18 15:13:14.330 27338-27406/com.telnyx.webrtc.sdk D/VERTO: [TxSocket] Receiving [{"jsonrpc":"2.0","id":3099,"method":"telnyx_rtc.answer","params":{"callID":"c63e1f5c-51a0-434d-82c8-9b7b8de06226"}}]
2022-01-18 15:13:14.334 27338-27406/com.telnyx.webrtc.sdk D/VERTO: [TxSocket] Received Method [telnyx_rtc.answer]
2022-01-18 15:13:14.390 27338-27406/com.telnyx.webrtc.sdk D/TelnyxClient: ringtone/ringback media player stopped and released
2022-01-18 15:13:34.648 27338-27338/com.telnyx.webrtc.sdk D/VERTO: [TxSocket] Sending [{"id":"fa74c976-173c-44c1-b81a-c04366ac2c20","jsonrpc":"2.0","method":"telnyx_rtc.bye","params":{"cause":"USER_BUSY","causeCode":1,"dialogParams":{"callId":"c63e1f5c-51a0-434d-82c8-9b7b8de06226"},"sessionId":"437fea8f-6033-4633-9bbb-40d55e236ccd"}}]
2022-01-18 15:13:34.650 27338-27338/com.telnyx.webrtc.sdk D/TelnyxClient: ringtone/ringback media player stopped and released
2022-01-18 15:13:34.841 27338-27406/com.telnyx.webrtc.sdk D/VERTO: [TxSocket] Receiving [{"jsonrpc":"2.0","id":"fa74c976-173c-44c1-b81a-c04366ac2c20","result":{"callID":"c63e1f5c-51a0-434d-82c8-9b7b8de06226","sip_call_id":"2e93c706-eb3c-4257-bd8b-181d1436e093","message":"CALL ENDED","causeCode":17,"cause":"USER_BUSY","sessid":"437fea8f-6033-4633-9bbb-40d55e236ccd"}}]

[Bug] Short Bug Description

Bug Category

  • Credential Login
  • Token Login
  • Local Audio Issue
  • Remote Audio Issue
  • Audio Device Switching
  • Mute / Unmute
  • Hold / Unhold
  • Performance issues
  • [ X ] Other

SDK Version
com.github.team-telnyx:telnyx-webrtc-android:v1.2.13-alpha

Describe the bug

Using the two numbers purchased by our own Telnyx account, in the telnyx-webrtc-android project, do a call test, one number is used for dialing, the other number is used for answering, but after one number is dialed, the other number can receive calls message, but will receive a hang-up message immediately and cannot answer the phone normally

Expected behaviour
Make a call, both parties can hear the sound normally

To Reproduce
Steps to reproduce the behaviour:

  1. e.g. (Log on with credentials)
  2. e.g. (Socket error then returned)

Android Device (please complete the following information):

  • Emulator: (true)
  • Android Device: [ Pixel ]
  • Android Version: [ 10 ]

Logs

the first time

2022-03-09 16:44:43.124 19241-19362/com.tongsoft.callphone D/TelnyxClient$networkCallback: [TelnyxClient] :: There is a network available
2022-03-09 16:44:44.614 19241-19366/com.tongsoft.callphone D/VERTO: [TxSocket] Connection established :: rtc.telnyx.com
2022-03-09 16:44:44.615 19241-19366/com.tongsoft.callphone D/TelnyxClient: [TelnyxClient] :: onConnectionEstablished
2022-03-09 16:44:44.900 19241-19366/com.tongsoft.callphone D/VERTO: [TxSocket] Receiving [{"jsonrpc":"2.0","id":"1e1461c0-c186-417b-a72b-83dcda6ae51f","result":{"message":"logged in","sessid":"232cb2b3-fba0-4ebd-8e74-7952ee9ef88f"}}]
2022-03-09 16:44:45.000 19241-19366/com.tongsoft.callphone D/VERTO: [TxSocket] Receiving [{"jsonrpc":"2.0","id":670823,"method":"telnyx_rtc.clientReady","params":{"reattached_sessions":[]}}]
2022-03-09 16:44:45.004 19241-19366/com.tongsoft.callphone D/VERTO: [TxSocket] Received Method [telnyx_rtc.clientReady]
2022-03-09 16:44:45.006 19241-19366/com.tongsoft.callphone D/TelnyxClient: [TelnyxClient] :: onClientReady :: retrieving gateway state
2022-03-09 16:44:45.214 19241-19366/com.tongsoft.callphone D/VERTO: [TxSocket] Receiving [{"jsonrpc":"2.0","id":"1a73b601-2ca9-424c-a0c2-d28746ba17ef","result":{"params":{"state":"REGED"},"sessid":"232cb2b3-fba0-4ebd-8e74-7952ee9ef88f"}}]
2022-03-09 16:44:45.217 19241-19366/com.tongsoft.callphone D/TelnyxClient: [TelnyxClient] :: onLoginSuccessful :: [232cb2b3-fba0-4ebd-8e74-7952ee9ef88f] :: Ready to make calls
2022-03-09 16:44:47.122 19241-19241/com.tongsoft.callphone D/TelnyxClient: ringtone/ringback media player stopped and released
2022-03-09 16:44:47.734 19241-19366/com.tongsoft.callphone D/VERTO: [TxSocket] Receiving [{"jsonrpc":"2.0","id":"b33c38ec-d6f5-4356-871c-a71def78ab30","result":{"message":"CALL CREATED","callID":"dfe34b6d-7f03-4b45-9fd9-a629c02d72cd","sessid":"232cb2b3-fba0-4ebd-8e74-7952ee9ef88f"}}]
2022-03-09 16:44:48.858 19241-19366/com.tongsoft.callphone D/VERTO: [TxSocket] Receiving [{"jsonrpc":"2.0","id":670834,"method":"telnyx_rtc.ringing","params":{"callID":"dfe34b6d-7f03-4b45-9fd9-a629c02d72cd","caller_id_name":"alice","caller_id_number":"+15053873173","callee_id_name":"Outbound Call","callee_id_number":"+18259020274","display_direction":"inbound"}}]
2022-03-09 16:44:48.859 19241-19366/com.tongsoft.callphone D/VERTO: [TxSocket] Received Method [telnyx_rtc.ringing]
2022-03-09 16:44:48.859 19241-19366/com.tongsoft.callphone D/TelnyxClient: [TelnyxClient] :: onRingingReceived [{"jsonrpc":"2.0","id":670834,"method":"telnyx_rtc.ringing","params":{"callID":"dfe34b6d-7f03-4b45-9fd9-a629c02d72cd","caller_id_name":"alice","caller_id_number":"+15053873173","callee_id_name":"Outbound Call","callee_id_number":"+18259020274","display_direction":"inbound"}}]
2022-03-09 16:44:48.860 19241-19366/com.tongsoft.callphone I/TxSocket: Socket is closed: null java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.google.gson.JsonElement.getAsString()' on a null object reference
2022-03-09 16:44:59.419 19241-19241/com.tongsoft.callphone D/TelnyxClient: ringtone/ringback media player stopped and released

the second time

2022-03-09 16:49:27.433 19684-19796/com.tongsoft.callphone D/TelnyxClient$networkCallback: [TelnyxClient] :: There is a network available
2022-03-09 16:49:29.092 19684-19800/com.tongsoft.callphone D/VERTO: [TxSocket] Connection established :: rtc.telnyx.com
2022-03-09 16:49:29.095 19684-19800/com.tongsoft.callphone D/TelnyxClient: [TelnyxClient] :: onConnectionEstablished
2022-03-09 16:49:29.424 19684-19800/com.tongsoft.callphone D/VERTO: [TxSocket] Receiving [{"jsonrpc":"2.0","id":"09e42ad0-84f2-4420-b24c-4ce861c37750","result":{"message":"logged in","sessid":"cd4d748e-c9ad-4e85-ac4f-08c78c836f69"}}]
2022-03-09 16:49:29.539 19684-19800/com.tongsoft.callphone D/VERTO: [TxSocket] Receiving [{"jsonrpc":"2.0","id":671507,"method":"telnyx_rtc.clientReady","params":{"reattached_sessions":[]}}]
2022-03-09 16:49:29.548 19684-19800/com.tongsoft.callphone D/VERTO: [TxSocket] Received Method [telnyx_rtc.clientReady]
2022-03-09 16:49:29.570 19684-19800/com.tongsoft.callphone D/TelnyxClient: [TelnyxClient] :: onClientReady :: retrieving gateway state
2022-03-09 16:49:29.787 19684-19800/com.tongsoft.callphone D/VERTO: [TxSocket] Receiving [{"jsonrpc":"2.0","id":"ec6003b5-1423-4897-81b6-a6dadfe23199","result":{"params":{"state":"REGED"},"sessid":"cd4d748e-c9ad-4e85-ac4f-08c78c836f69"}}]
2022-03-09 16:49:29.798 19684-19800/com.tongsoft.callphone D/TelnyxClient: [TelnyxClient] :: onLoginSuccessful :: [cd4d748e-c9ad-4e85-ac4f-08c78c836f69] :: Ready to make calls
2022-03-09 16:49:31.776 19684-19684/com.tongsoft.callphone D/TelnyxClient: ringtone/ringback media player stopped and released
2022-03-09 16:49:32.386 19684-19800/com.tongsoft.callphone D/VERTO: [TxSocket] Receiving [{"jsonrpc":"2.0","id":"a707b8c6-e6a3-437a-ab1a-94989aea89f3","result":{"message":"CALL CREATED","callID":"65c2aea6-edf3-45fd-9be2-72f989a867d2","sessid":"cd4d748e-c9ad-4e85-ac4f-08c78c836f69"}}]
2022-03-09 16:49:33.455 19684-19800/com.tongsoft.callphone D/VERTO: [TxSocket] Receiving [{"jsonrpc":"2.0","id":671517,"method":"telnyx_rtc.ringing","params":{"callID":"65c2aea6-edf3-45fd-9be2-72f989a867d2","caller_id_name":"alice","caller_id_number":"+15053873173","callee_id_name":"Outbound Call","callee_id_number":"+18259020274","display_direction":"inbound"}}]
2022-03-09 16:49:33.456 19684-19800/com.tongsoft.callphone D/VERTO: [TxSocket] Received Method [telnyx_rtc.ringing]
2022-03-09 16:49:33.457 19684-19800/com.tongsoft.callphone D/TelnyxClient: [TelnyxClient] :: onRingingReceived [{"jsonrpc":"2.0","id":671517,"method":"telnyx_rtc.ringing","params":{"callID":"65c2aea6-edf3-45fd-9be2-72f989a867d2","caller_id_name":"alice","caller_id_number":"+15053873173","callee_id_name":"Outbound Call","callee_id_number":"+18259020274","display_direction":"inbound"}}]
2022-03-09 16:49:33.459 19684-19800/com.tongsoft.callphone I/TxSocket: Socket is closed: null java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.google.gson.JsonElement.getAsString()' on a null object reference

[Bug] Incomming call invitation contains wrong number

Bug Category

  • Credential Login
  • Token Login
  • Local Audio Issue
  • Remote Audio Issue
  • Audio Device Switching
  • Mute / Unmute
  • Hold / Unhold
  • Performance issues
  • Other

SDK Version
implementation 'com.github.team-telnyx:telnyx-webrtc-android:v1.2.21-alpha'

Describe the bug
I called from SIM (Czech Republic) into Telnyx SDK and I received a call invitation with wrong number.

Expected behaviour
Invitation should contain proper number.

To Reproduce
Steps to reproduce the behaviour:

  1. Login to telnyx.
  2. Receive call invitation.

Android Device (please complete the following information):

  • Emulator: true

Logs

So after many days of testing and trying i came across a "funny" issue. I am calling to the app (in emulator) from my physical device located in Czech Republic with international prefix +420. I tried around like 300 calls and this is the first time it happened. I received an invitation with number +1420732652757 instead of +420732652757.

ReceivedMessageBody(method=telnyx_rtc.invite, result=InviteResponse(callId=f961737a-a1b6-49a9-92f1-089ef6b9c1a0, sdp=v=0
	o=FreeSWITCH 1688975097 1688975098 IN IP4 185.246.41.178
	s=FreeSWITCH
	c=IN IP4 185.246.41.178
	t=0 0
	a=msid-semantic: WMS lVXXbovBYpnSyWzILtEYIMlKxS8PJn6U
	m=audio 19622 RTP/SAVPF 0 8
	a=rtpmap:0 PCMU/8000
	a=rtpmap:8 PCMA/8000
	a=fingerprint:sha-256 2F:4D:84:66:34:F1:23:CB:A4:B1:84:72:FC:4D:01:1E:2F:24:9F:1F:3A:C4:93:CC:F0:BD:11:DC:19:70:5A:AE
	a=setup:actpass
	a=rtcp-mux
	a=rtcp:19622 IN IP4 185.246.41.178
	a=ssrc:2360085743 cname:8TI983BWiOFHA4fc
	a=ssrc:2360085743 msid:lVXXbovBYpnSyWzILtEYIMlKxS8PJn6U a0
	a=ssrc:2360085743 mslabel:lVXXbovBYpnSyWzILtEYIMlKxS8PJn6U
	a=ssrc:2360085743 label:lVXXbovBYpnSyWzILtEYIMlKxS8PJn6Ua0
	a=ice-ufrag:oK1WncxKVvpuIlfG
	a=ice-pwd:5NG3G8QPMlndgtgu37hhaERV
	a=candidate:9346008219 1 udp 2130706431 185.246.41.178 19622 typ host generation 0
	a=candidate:9346008219 2 udp 2130706431 185.246.41.178 19622 typ host generation 0
	a=silenceSupp:off - - - -
	a=ptime:20
	a=sendrecv
	, callerIdName=+1420732652757, callerIdNumber=+1420732652757, sessid=8658e246-ab00-4a79-9cd2-1bfa205232c9)

Seems like an edge case but it might happen.

[Bug] Cannot cancel incoming call.

Bug Category

  • Credential Login
  • Token Login
  • Local Audio Issue
  • Remote Audio Issue
  • Audio Device Switching
  • Mute / Unmute
  • Hold / Unhold
  • Performance issues
  • Other

SDK Version
implementation 'com.github.team-telnyx:telnyx-webrtc-android:v1.2.20-alpha'

Describe the bug
SDK cannot cancel incomming call. It just triggers it again.

Expected behaviour
Call is canceled and it will not trigger again.

To Reproduce

  1. Log on with credentials
  2. Call to Telnyx number.
  3. Trigger endCall(callId) by the user interface.
  4. Call is ended but truggered again.

Android Device (please complete the following information):

  • Emulator: AN 13
  • Device: Asus Zenfone 8 (AN 13)

Logs
Application receives a call invitation:

Invitation(callId=f1680c8c-78f0-4a00-b5c1-9c381ce9b49e, sdp=v=0
	o=FreeSWITCH 1687759542 1687759543 IN IP4 185.246.41.177
	s=FreeSWITCH
	c=IN IP4 185.246.41.177
	t=0 0
	a=msid-semantic: WMS 3FrkRz7aY8FnwLfVYIHlZWV8K9QUGtBz
	m=audio 17098 RTP/SAVPF 0 8
	a=rtpmap:0 PCMU/8000
	a=rtpmap:8 PCMA/8000
	a=fingerprint:sha-256 87:53:CA:62:0C:9F:A1:36:57:F6:6B:B9:86:7F:6E:2B:71:DC:88:AF:60:DD:5C:74:6F:CF:3E:62:A1:CD:39:F4
	a=setup:actpass
	a=rtcp-mux
	a=rtcp:17098 IN IP4 185.246.41.177
	a=ssrc:752388480 cname:YSKFiHG6Fck1NqNB
	a=ssrc:752388480 msid:3FrkRz7aY8FnwLfVYIHlZWV8K9QUGtBz a0
	a=ssrc:752388480 mslabel:3FrkRz7aY8FnwLfVYIHlZWV8K9QUGtBz
	a=ssrc:752388480 label:3FrkRz7aY8FnwLfVYIHlZWV8K9QUGtBza0
	a=ice-ufrag:YkNO6yMHxtr4MSuB
	a=ice-pwd:B46KBDH6FRYi7BKWMnBIMefa
	a=candidate:1586533343 1 udp 2130706431 185.246.41.177 17098 typ host generation 0
	a=candidate:1586533343 2 udp 2130706431 185.246.41.177 17098 typ host generation 0
	a=silenceSupp:off - - - -
	a=ptime:20
	a=sendrecv
	, callerIdName=420732652757, callerIdNumber=420732652757, sessid=a299f101-5a09-48f2-bc2a-99b433de688b))

Then the user ends the call

[TxSocket] Sending [{
	"id": "b1769a70-f55c-4575-b7ef-c4989d2d8e1d",
	"jsonrpc": "2.0",
	"method": "telnyx_rtc.bye",
	"params": {
		"cause": "USER_BUSY",
		"causeCode": 17,
		"dialogParams": {
		"callId": "f1680c8c-78f0-4a00-b5c1-9c381ce9b49e"
	},
		"sessid": "a299f101-5a09-48f2-bc2a-99b433de688b"
	}
}]

After like a second or two the call Invitation is received again with a different call ID.

Invitation(callId=d976cf78-568e-4fb1-b11d-f3554cd3356f, sdp=v=0
	o=FreeSWITCH 1687751978 1687751979 IN IP4 185.246.41.177
	s=FreeSWITCH
	c=IN IP4 185.246.41.177
	t=0 0
	a=msid-semantic: WMS xfbLuo9C5wf0nasZki7DkTlhAzQSE8L2
	m=audio 24672 RTP/SAVPF 0 8
	a=rtpmap:0 PCMU/8000
	a=rtpmap:8 PCMA/8000
	a=fingerprint:sha-256 87:53:CA:62:0C:9F:A1:36:57:F6:6B:B9:86:7F:6E:2B:71:DC:88:AF:60:DD:5C:74:6F:CF:3E:62:A1:CD:39:F4
	a=setup:actpass
	a=rtcp-mux
	a=rtcp:24672 IN IP4 185.246.41.177
	a=ssrc:3233024842 cname:eNEy1D0W05Ne653g
	a=ssrc:3233024842 msid:xfbLuo9C5wf0nasZki7DkTlhAzQSE8L2 a0
	a=ssrc:3233024842 mslabel:xfbLuo9C5wf0nasZki7DkTlhAzQSE8L2
	a=ssrc:3233024842 label:xfbLuo9C5wf0nasZki7DkTlhAzQSE8L2a0
	a=ice-ufrag:e0KoJWwamcSRauJe
	a=ice-pwd:7dDYGtLxppBlluspk3EUP0U1
	a=candidate:5771094516 1 udp 2130706431 185.246.41.177 24672 typ host generation 0
	a=candidate:5771094516 2 udp 2130706431 185.246.41.177 24672 typ host generation 0
	a=silenceSupp:off - - - -
	a=ptime:20
	a=sendrecv
	, callerIdName=420732652757, callerIdNumber=420732652757, sessid=a299f101-5a09-48f2-bc2a-99b433de688b))

Here is a video:

Screen_recording_20230626_125722.mp4
  1. I start the app.
  2. I call from my number to Telnyx.
  3. App registers a call and shows the call screen.
  4. I cancel the call.
  5. After few seconds app registers the same call again and shows the call screen.
  6. I cancel the call again.
  7. After few seconds a call is finished with "User is not available at the moment" message. Note that the top green call notification disapears after some time after the second decline call click.

How to update firebase token?

So is there a way to update firebase token in the SDK? I only see firebase token updates using login. But it does not seem right to force new login when firebase token changes. Can there be an option to update only the token without the need to login again?

Socket is closed: null java.net.SocketTimeoutException: failed to connect to rtc.telnyx.com

Connection issue.

2021-11-14 23:15:33.058 8444-8444/com.telnyx.webrtc D/MainActivity: FCM TOKEN RECEIVED:
2021-11-14 23:15:33.223 8444-8505/com.telnyx.webrtc D/FA: Connected to remote service
2021-11-14 23:15:33.223 8444-8505/com.telnyx.webrtc V/FA: Processing queued up service tasks: 7
2021-11-14 23:15:33.514 8444-8857/com.telnyx.webrtc I/Bugsnag: Request completed with code 202, message: Accepted, headers: {null=[HTTP/1.1 202 Accepted], Access-Control-Allow-Origin=[*], Alt-Svc=[clear], Content-Length=[21], Content-Type=[application/json], Date=[Sun, 14 Nov 2021 17:45:33 GMT], Via=[1.1 google], X-Android-Received-Millis=[1636911933512], X-Android-Response-Source=[NETWORK 202], X-Android-Selected-Protocol=[http/1.1], X-Android-Sent-Millis=[1636911933230]}
2021-11-14 23:15:33.515 8444-8857/com.telnyx.webrtc D/Bugsnag: Received request response: {"status":"accepted"}
2021-11-14 23:15:33.515 8444-8857/com.telnyx.webrtc I/Bugsnag: Session API request finished with status DELIVERED
2021-11-14 23:15:33.515 8444-8857/com.telnyx.webrtc D/Bugsnag: Sent 1 new session to Bugsnag
2021-11-14 23:15:37.943 8444-8849/com.telnyx.webrtc D/Bugsnag: App launch period marked as complete
2021-11-14 23:15:38.891 8444-8505/com.telnyx.webrtc V/FA: Inactivity, disconnecting from the service
2021-11-14 23:15:58.153 8444-8864/com.telnyx.webrtc I/TxSocket: Socket is closed: null java.net.SocketTimeoutException: failed to connect to rtc.telnyx.com/103.115.244.153 (port 14938) from /25.98.160.198 (port 42676) after 25000ms

Calling Issue

If my app in background and anyone call on my number then app not showing call notifications or ringing.

[Bug] Short Bug Description

Bug Category

  • Credential Login
  • Token Login
  • Local Audio Issue
  • Remote Audio Issue
  • Audio Device Switching
  • Mute / Unmute
  • Hold / Unhold
  • Performance issues
  • [ x ] Other

SDK Version
implementation 'com.github.team-telnyx:telnyx-webrtc-android:v1.2.12-alpha'

Describe the bug
After the call is connected, the call will last for one minute, and the call sound will disappear. When checking the logs, there is a message: (Socket is closing: 1000 ::)

Expected behaviour
The call can be used normally, and the voice sound is not disconnected abnormally after one minute

To Reproduce
After the call is connected, it will appear after one minute

Android Device (please complete the following information):

  • Emulator: (false)
  • Android Device: [Google Pixel 3]
  • Android Version: [e.g. 12 ]

Logs

Socket is closing: 1000 ::

[Bug] Short Bug Description

Bug Category

  • [] Credential Login
  • Token Login
  • Local Audio Issue
  • Remote Audio Issue
  • Audio Device Switching
  • Mute / Unmute
  • Hold / Unhold
  • Performance issues
  • Other

SDK Version

implementation 'com.github.team-telnyx:telnyx-webrtc-android:v1.2.12-alpha'

Describe the bug

After making a call, the webhook receives the answering information, but the mobile phone does not receive the corresponding answering information, and has been waiting to answer. After some time the phone receives telnyx_rtc.bye status information but not telnyx_rtc.answer status information

Expected behaviour
Make a call, when the webhook receives the connection status, it can immediately notify the mobile phone

To Reproduce
Enter the number, click to dial, wait to answer

Android Device (please complete the following information):

  • Emulator: (false)
  • Android Device: SM-E225F
  • Android Version: Android 11
    Logs
    id ๏ผš7177e3d2-e816-11ec-8ec5-02420a0d8168

[Bug] Short Bug Description

Bug Category

  • [] Credential Login
  • Token Login
  • Local Audio Issue
  • Remote Audio Issue
  • Audio Device Switching
  • Mute / Unmute
  • Hold / Unhold
  • Performance issues
  • Other

SDK Version
Which version of the SDK have you added from Jitpack? Feel free to add the whole dependency implementation:
eg. implementation 'com.github.team-telnyx:telnyx-webrtc-android:v1.2.12-alpha'

Describe the bug
Use the number 12532755147 to answer the call, the call_control_id received many times are these
(v2: FlRnq65ww9nyDob9u_zoCfBx_AAbezGZ-4EWjRfeQfZd5BQaP6s2dg,
v2:sGp3qbH9F2y4D75QYqmcbniGnA6L2zItwfjxrYlCwz2R8CIgPGOO-g
v2:SUA3v7pWwQyKRJb4o86V1800lCUm_FyoaKW4b1-uN3-SlGBlQpXl4A,
v2: cISqpfF1lToJ5qVdYa3nn9miN86r4JAIYzCf6OISnBMiptw8YOlqtw
v2: d3e7C3TTCk4DaLGySvsKVa284rSsln99PLdadIhru_4pTVYF8_JM4w,
v2:PtohROCktt0FyBIyJ8qSy033Obmn3SIrB6KZsYhZJDq0PvqGYFxsZA
v2:E3qCZ-vFfUOmxkpCMDXPhxai2QY6JCheWLHR7W9Z9W2ffHTG1kTVfg ), after the call hangs up, the caller can still receive the answering invitation multiple times, the time span is 15 minutes

Expected behaviour
normal call

To Reproduce
Steps to reproduce the behaviour:

  1. e.g. (Log on with credentials)
  2. e.g. (Socket error then returned)

Android Device (please complete the following information):

  • Emulator: (true/false)
  • Android Device: [e.g. Pixel 6]
  • Android Version: [e.g. 12 ]

Logs
Please provide any logs available to you, remember to enable verbose logging within the SDK. It is generally helpful to filter by either TxSocket (Socket messages) or TelnyxClient (Client messages) or both depending on the situation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.