Share My Creation VoIP SIP (Voice Calls) System : Source Code

Hello everyone :)

First of all and as always we start by thanking the great @Erel for making this possible for us :)

We made a post asking the lovely B4X Family about what to create next, a VPN or VoIP and most of the votes went to VoIP, so here we are :)

Today we would like to announce that in exactly 4 weeks (28/03/2021) (dd-mm-yyyy) we are releasing a new amazing project :
VoIP (Voice over Internet Protocol) system, which will consist on the following :
1- Text messages
2- Real Time voice calls
3- Group Voice Calls


Real time voice calls will work locally or publicly (through the internet) by using the SIP technology
The Audio Codec will be : PCMA (G.711)
Supported Audio Codec : h.264 codec

The Project will be built using :
1- B4J System Admin + System Server :
- Managing Incoming Calls
- Managing Outgoing Calls
- Managing Users information
- Able to disconnect any active call
- Calls and text messages log
- Able to record any active call and save the call as a MP3 file
- Able to get any text messages sent/received as save the log as a .txt file

2-B4A Client
- Each client registers will get a unique ID (just like a phone number)
- Speed Dial (able to add anyone to the list by typing the ID)
- Call block (able to block any incoming call from a specific ID)
- Able to send text messages
- Phone book (able to add anyone to the list by typing the ID)
- Calls History

3- B4J SIP Client has been released! :)

3-IOS Client - Coming Soon...

- Each client registers will get a unique ID (just like a phone number)
- Speed Dial (able to add anyone to the list by typing the ID)
- Call block (able to block any incoming call from a specific ID)
- Able to send text messages
- Phone book (able to add anyone to the list by typing the ID)
- Calls History



More information will be posted once we finish developing feature by feature

The source code will be for sale : 150$
Project Price : 35$ Only
fs-payment1 (1).png

*Once you send the payment you will receive an email from our partner FastSpring which contains the source codes.

We have added to list "Features to be added" :
-Avaya integration
As many of you know that Avaya is leading in the field of VoIP so we will add a feature to integrate the features of Avaya in the project which is amazing because with this feature you can transform the call from Avaya phone device to your own server which will give you the ability to :
1- Control and manage the call from the server side (record , log , etc...) (B4J Server App)
2- You can answer the phone call from anywhere in the world (B4A + B4i Client App)

*This is an extra feature to the app meaning the app will not need any Avaya equipment and it does not need Avaya SDK to work, it's only an extra feature.



We will keep you updated :)

Thank you guys for your support :)
 
Last edited:

prbmjr

Member
Licensed User
We are currently working on the new update, and should be released in the upcoming days.
As for the Encryption, we are still figuring out how should we implement it.

Hi Saif, i would like to suggest something for the encryption, in my opinion, the best aproach for thin could be provide that anyone could apply the encryption freely..
Like this...

[VOIP Client 1 (encrypt packets)] =====> [(decrypt packets) VOIP Server (encrypt packets)] =====> [(decrypt packets) VOIP Client 2]

To make de encryption/decryption , we can insert any kind of encryption , MD5, SHA or including particular one... you code is going to be the same, you only need to provide a way to insert some new external code (when applied) to "decode" any packet from in/out buffer in the client's and server. Tha way could be simple and anyone could use.
 

sfsameer

Well-Known Member
Licensed User
Hi Saif, i would like to suggest something for the encryption, in my opinion, the best aproach for thin could be provide that anyone could apply the encryption freely..
Like this...

[VOIP Client 1 (encrypt packets)] =====> [(decrypt packets) VOIP Server (encrypt packets)] =====> [(decrypt packets) VOIP Client 2]

To make de encryption/decryption , we can insert any kind of encryption , MD5, SHA or including particular one... you code is going to be the same, you only need to provide a way to insert some new external code (when applied) to "decode" any packet from in/out buffer in the client's and server. Tha way could be simple and anyone could use.
Hello,

The server side (B4J) is easier to control regarding the encryption, but the difficult part is in the client side, why?
Because every byte sent, is sent in real-time and the encryption process will slow down the process (even if it was 10 ms or less) which will cause a loss in the connection between the server and the client sides.

That's why we are still trying to figuring out the best way possible and to avoid the loss in the connection.

Thank you,
Saif
 

prbmjr

Member
Licensed User
Hello,

The server side (B4J) is easier to control regarding the encryption, but the difficult part is in the client side, why?
Because every byte sent, is sent in real-time and the encryption process will slow down the process (even if it was 10 ms or less) which will cause a loss in the connection between the server and the client sides.

That's why we are still trying to figuring out the best way possible and to avoid the loss in the connection.

Thank you,
Saif
Hi Saif,

Thank you for your explanation about your concerns about the encryption/decryption process, but let me understand, you said that any kind of encryption process cause loss of connection, this means that you have some time-out issue? or the connection fails because you need constant flow of data to keep the connection live? Could you give me more information? I need to understand that to could explain to my client why we have this kind of problems with the encryption and try to help you (if i could...) to find a solution... 😁

Thank you in advance for you time!
 

sfsameer

Well-Known Member
Licensed User
this means that you have some time-out issue? or the connection fails because you need constant flow of data to keep the connection live?
Hello,

The data is sent/received in real-time meaning any data interruption for example data decryption will cause the connection to fail, without forgetting to mention that the packets are sent as is using an audio codec, so any data manipulation (in this case encryption/decryption) will cause a connection failure.

Thank you,
Saif
 

sfsameer

Well-Known Member
Licensed User
Hello everyone :)

Please use the same download link we sent you earlier to download the new update source codes.
The update contains : Password (The password is mandatory now) in B4J VoIP Client App

The new updated file will be under the name : B4JVoiPClient-updated

Also make sure to copy and paste the .jar + .xml files to your B4J additional libraries folder.

You can now set the password in the B4J VoIP Client :
1629443011102.png



*This update will be the last update on the VoIP project (B4J Server, B4A Client, B4J Client),, as we will be focusing on releasing the B4i Client.
We can't disclose the date yet, once it's ready we will release the project.


*As for @prbmjr special request (Data encryption) we can't disclose the release date of this request until we figure out a way to do it and see if it's even possible to accomplish.

Thank you,
Saif
 

amorosik

Well-Known Member
Licensed User
*This update will be the last update on the VoIP project (B4J Server, B4A Client, B4J Client),, as we will be focusing on releasing the B4i Client.
We can't disclose the date yet, once it's ready we will release the project.

If there are no other updates for the B4J and B4A environments, can we have the sources of the libraries used?
 

prbmjr

Member
Licensed User
*As for @prbmjr special request (Data encryption) we can't disclose the release date of this request until we figure out a way to do it and see if it's even possible to accomplish.


Hi Saif,

Ok , thank you for your answer, please keep me posted about this...

The data is sent/received in real-time meaning any data interruption for example data decryption will cause the connection to fail, without forgetting to mention that the packets are sent as is using an audio codec, so any data manipulation (in this case encryption/decryption) will cause a connection failure.

About the answer above, This happens even if the result of the decryption is the same original data packet before the encryption?

Thank you!
 

Magma

Well-Known Member
Licensed User
Tip-1: Encryption is always salted... so bigger strings/byte
Tip-2: Cutting to smaller pieces the strings/bytes making faster the communication
Tip-3: Using many ports could help to secure but also making it faster too - but it will using more bandwidth
 

sfsameer

Well-Known Member
Licensed User
Hi Saif,

Ok , thank you for your answer, please keep me posted about this...



About the answer above, This happens even if the result of the decryption is the same original data packet before the encryption?

Thank you!
Hello,

Below is what happens in the background once the call is being established :

1-in the B4J Server inline java, you can see there is :
MySipListener

Which is a listener that works in a multi-thread manner and responsible to send/receive any packets between the clients.

2- Every packet is sent to the server, it will include the header data and the body data :
The header data contains :
From address
To Address
Call-ID
ContactURI
Expires
Type of request (Register, Call, Disconnect, Busy, etc...)
Password (Which we have added recently)
and other details...

3- Once the above is received in the B4J server, the request will be filtered and "MessageFactory" will send the stage 1 response to the other client
4- if the response is a call request then "processInvite" will start and "clientTransactionId.sendRequest();" will be sent.
5- The ACK dialog will be created "processAck" , it's responsible to create the invite and initiate the call by holding all of the above information and send them to the receiver.
6- Once the ACK Dialog is sent, a new Hashtable :
"private Hashtable<URI, URI> currUser = new Hashtable();"

will be created which will be responsible for sending/receiving the audio packets.


*Every above step happens in real-time except "processRegister" which is responsible to read the password and check if it's true or not.
As you can see there is no room to add any encryption/decryption .

*All of the above are just in B4J server, a more complicated process happens in the B4A & B4J clients.

*There are a lot of other steps, for example reading the packets codecs, clients information,Registration expiration time etc... the other background steps happen in the .jar file.

To have a better understanding on how the transactions are working in the background :

Thank you,
Saif
 

prbmjr

Member
Licensed User
Hello,

Below is what happens in the background once the call is being established :

1-in the B4J Server inline java, you can see there is :
MySipListener

Which is a listener that works in a multi-thread manner and responsible to send/receive any packets between the clients.

2- Every packet is sent to the server, it will include the header data and the body data :
The header data contains :
From address
To Address
Call-ID
ContactURI
Expires
Type of request (Register, Call, Disconnect, Busy, etc...)
Password (Which we have added recently)
and other details...

3- Once the above is received in the B4J server, the request will be filtered and "MessageFactory" will send the stage 1 response to the other client
4- if the response is a call request then "processInvite" will start and "clientTransactionId.sendRequest();" will be sent.
5- The ACK dialog will be created "processAck" , it's responsible to create the invite and initiate the call by holding all of the above information and send them to the receiver.
6- Once the ACK Dialog is sent, a new Hashtable :
"private Hashtable<URI, URI> currUser = new Hashtable();"

will be created which will be responsible for sending/receiving the audio packets.


*Every above step happens in real-time except "processRegister" which is responsible to read the password and check if it's true or not.
As you can see there is no room to add any encryption/decryption .

*All of the above are just in B4J server, a more complicated process happens in the B4A & B4J clients.

*There are a lot of other steps, for example reading the packets codecs, clients information,Registration expiration time etc... the other background steps happen in the .jar file.

To have a better understanding on how the transactions are working in the background :

Thank you,
Saif

Thank you for all these explanation!

But if I encrypt your final packet, with all header and data already done and decrypt in the other side, whatever it is (client or server), before your first execution, decrypting the sent packet to the exactly original packet to be process, could this work?
 

sfsameer

Well-Known Member
Licensed User
Thank you for all these explanation!

But if I encrypt your final packet, with all header and data already done and decrypt in the other side, whatever it is (client or server), before your first execution, decrypting the sent packet to the exactly original packet to be process, could this work?
We have tried this before and it didn't work, because there is an audio codec that needs to be read in the library and if we do encrypt it the server and the other client won't be able to know what they are reading.

We are working on finding a solution for your request as soon as possible, we will keep you in the loop.

Thank you,
Saif
 

prbmjr

Member
Licensed User
We have tried this before and it didn't work, because there is an audio codec that needs to be read in the library and if we do encrypt it the server and the other client won't be able to know what they are reading.

We are working on finding a solution for your request as soon as possible, we will keep you in the loop.

Thank you,
Saif

Ok, now I understand the real situation... Maybe the audio codec needs to be processed out of the library ... Then the encryption/decryption could be implemented before the audio codec process the data, but I think that you already tested it...

Thank you !
 

prbmjr

Member
Licensed User
We have tried this before and it didn't work, because there is an audio codec that needs to be read in the library and if we do encrypt it the server and the other client won't be able to know what they are reading.

We are working on finding a solution for your request as soon as possible, we will keep you in the loop.

Thank you,
Saif
Hi Saif!

Any news about the encryption?

br,

Paulo Bueno
 

sfsameer

Well-Known Member
Licensed User
Hi Saif!

Any news about the encryption?

br,

Paulo Bueno
Hello,

Within 24-48 hours we will announce either it's possible or not.

So far we were successful to encrypt the connection and incoming/outgoing bytes but the connection breaks after seconds so we are figuring out this part.

Thank you,
Saif
 

prbmjr

Member
Licensed User
Hello,

Within 24-48 hours we will announce either it's possible or not.

So far we were successful to encrypt the connection and incoming/outgoing bytes but the connection breaks after seconds so we are figuring out this part.

Thank you,
Saif
Hi Saif !

Any news?
 

Star-Dust

Expert
Licensed User
Not 24 hours have passed yet
 

Star-Dust

Expert
Licensed User
I do not think so. They are 24/48 working hours. consider that they work one hour a day
 
Top