There are other permissions that are missing, replace the above with the following :Hi Saif.
Have you tried the code on Android 12 ?
Despite having entered the permissions:
B4X:Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_USE_SIP) Wait For Activity_PermissionResult (permission As String, Result As Boolean) If Result Then Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_RECORD_AUDIO) Wait For Activity_PermissionResult (permission As String, Result As Boolean) If Result Then Load_SIPSettings StartActivity(MainMenu) Activity.Finish End If End If
View attachment 112346
When it comes on the line Sip.Register
B4X:.... If Starter.strProtocol.ToLowerCase = "udp" Then Else Sip.Protocol = Starter.strProtocol.ToLowerCase End If Sip.Register '<----- HERE'
in module srvVoIPSIP no events are displayed. No errors, nothing despite having all the events.
B4X:Sub SIP_Registering Log("Registering") End Sub Sub SIP_RegistrationFailed (ErrorCode As Int, ErrorMessage As String) Log("Failed, ErrorCode=" & ErrorCode & ", Message=" & ErrorMessage) ' ToastMessageShow("Registration failed.", True) End Sub Sub SIP_RegistrationDone (ExpiryTime As Long) Log("RegistrationDone, ExpiryTime=" & ExpiryTime) ToastMessageShow("SIP registered sucessfully", True) End Sub
if i try the same program on an android 8 version it all runs.
B4X:
For Each permission As String In Array(Starter.rp.PERMISSION_USE_SIP, Starter.rp.PERMISSION_READ_PHONE_STATE, Starter.rp.PERMISSION_RECORD_AUDIO,Starter.rp.PERMISSION_PROCESS_OUTGOING_CALLS)
Starter.rp.CheckAndRequest(permission)
Wait For Activity_PermissionResult (permission As String, Result As Boolean)
If Result Then
Load_SIPSettings
StartActivity(MainMenu)
Activity.Finish
Else
ToastMessageShow("No permission",True)
Activity.Finish
End If
Next
Also post the error log so we can help you better
**Also if it's still didn't work then remove the targetSDKversion from the manifest file.