VoIP SIP (Voice Calls) System : Source Code

sfsameer

Well-Known Member
Licensed User
Longtime User
There are other permissions that are missing, replace the above with the following :
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.
 

MarcoRome

Expert
Licensed User
Longtime User
Already tried so ....
You had entered the same in a commented way. But:
1) if I use For each, it asks for the first permission and then remains pending on others.
So I used the above method.
2) I also tried to add Starter.rp.PERMISSION_READ_PHONE_STATE, Starter.rp.PERMISSION_PROCESS_OUTGOING_CALLS, even if not required (see Permission Windows) but the result doesn't change
 

sfsameer

Well-Known Member
Licensed User
Longtime User
1-The project works if you just remove the targerSDKversion from the manifest file
2-Could you please post the error log so we can help you better
 

MarcoRome

Expert
Licensed User
Longtime User
1-The project works if you just remove the targerSDKversion from the manifest file
2-Could you please post the error log so we can help you better
This is your manifest, already tried
B4X:
AddManifestText(
<uses-sdk android:minSdkVersion="5"/>
<supports-screens android:largeScreens="true"
....
but on Android 12 dont work...


Translate.."This App was made for an older version of Android and may not work properly..."

i add also:
B4X:
AddManifestText(
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="29"/>
<supports-screens android:largeScreens="true"
....
in this way ask me permession, but anyway no event is trigger
 

sfsameer

Well-Known Member
Licensed User
Longtime User
When you remove the targetSDKversion from the manifest file it will work without any problem even if it will show the above message.

We have just tested the project in android 10 even if we set the targetSDKversion in the manifest file it worked without a problem, but we didn't test it in android 12 that's why am telling you to post the error log to be able to understand where the problem is

 

sfsameer

Well-Known Member
Licensed User
Longtime User
We would like to connect with you using anydesk or teamviewer to inspect the problem if that's okay with you
 

MarcoRome

Expert
Licensed User
Longtime User
in log (filter or no) gives absolutely no error, arrives on Sip.Registrer and stop.
No freeze, no crash, nothing
 

sfsameer

Well-Known Member
Licensed User
Longtime User
in log (filter or no) gives absolutely no error, arrives on Sip.Registrer and stop.
No freeze, no crash, nothing

We would like to connect with you using anydesk or teamviewer to inspect the problem if that's okay with you
 

sfsameer

Well-Known Member
Licensed User
Longtime User
Although it remains a mystery why on Android 8 it ran without any problem with UDP Protocol
In the Android Sip the default protocol is TCP so it seems that in Android 8 it worked because it registered using the default protocol even if it was not provided.

In Android 12 it seems it didn't care for the default protocol and it was necessary to provide the protocol.

 

Xfood

Expert
Licensed User
 

sfsameer

Well-Known Member
Licensed User
Longtime User
Is there a specific tool to analyze the logs produced by the b4j server?
There is no need for any special tool, just put
System.out.printin()
In the inline Java to print what ever log you would like
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…