BelledonneCommunications / linphone-android

Linphone.org mirror for linphone-android (https://gitlab.linphone.org/BC/public/linphone-android)
https://linphone.org
GNU General Public License v3.0
1.11k stars 679 forks source link

The standards for strong insertion and disassembly of SIP? #2187

Closed LoyaiHai closed 2 months ago

LoyaiHai commented 2 months ago

Hi @Viish I have one questtion: linphone Specifies whether to support the standards for strong insertion and disassembly of SIP?

Viish commented 2 months ago

Hi, Sorry but I don't understand your question.

LoyaiHai commented 2 months ago

Hi @Viish You can look at explanations below: SIP (Session Initiation Protocol) is a communication protocol used for establishing, modifying, and terminating multimedia sessions. In SIP, "强插" (Call Hijacking) and "强拆" (Call Tear-down) are two concepts related to session control.

Call Hijacking (强插): Call hijacking refers to the unauthorized or unauthenticated insertion of a third party into an ongoing session. This behavior can disrupt or interrupt normal communication and may be used for malicious purposes. Call hijacking can occur in voice calls, video calls, or other SIP-based multimedia sessions. It often involves attacks on the SIP protocol, such as eavesdropping, tampering, or replay attacks. To prevent call hijacking, security measures such as using encrypted communication channels, implementing authentication and authorization mechanisms, and monitoring and detecting abnormal activities can be employed.

Call Tear-down (强拆): Call tear-down refers to the forced termination of an ongoing session by a party or system, prematurely ending it. Call tear-down can occur for legitimate or reasonable reasons, such as emergencies, network failures, or user requests. However, there can also be illegal call tear-down actions, such as malicious attacks or unauthorized session interruptions. In SIP, call tear-down is typically achieved by sending the corresponding SIP message, such as a BYE request, to indicate the termination of the session. The participating parties of the session can then perform the necessary cleanup and resource release operations according to the protocol specifications.

LoyaiHai commented 2 months ago

and this: Freeswitch is an open-source softswitch platform used to implement voice and multimedia communication services. As a flexible communication platform, Freeswitch provides rich functionalities and APIs that enable developers to build customized communication solutions.

In Freeswitch, call tear-down and call hijacking are functionalities related to session control and call management. Specifically:

Call Tear-down: Freeswitch offers call tear-down functionality, allowing the termination of ongoing calls or sessions. This can be achieved by sending appropriate control commands or API requests to Freeswitch. The call tear-down feature enables users to actively end calls or handle exceptional situations.

Call Hijacking: Freeswitch also supports call hijacking functionality, allowing a third party to insert themselves into ongoing calls or sessions. This capability can be utilized for various scenarios such as monitoring, dispatching, and call transfer. Through proper configuration and control, Freeswitch can allow authorized third parties to participate in sessions, enabling call hijacking functionality.

Please note that Freeswitch is a highly customizable platform, and the specific implementation and usage of call tear-down and call hijacking may vary depending on specific configurations and custom development. If you have specific requirements regarding call tear-down and call hijacking in Freeswitch, it is recommended to refer to the Freeswitch documentation and support resources for more detailed information and guidance.

LoyaiHai commented 2 months ago

so far i have done a test: 1、DeviceA: MicroSIP,DeviceB:a android phone first,DeviceA call a audio call to DeviceB, accept and connect, then send a cmd to freeswitch service to perform Call Hijacking, it is a success test. 2、DeviceA: a android phone,DeviceB:a android phone first, DeviceA call a audio call to DeviceB, accept and connect, then send a cmd to freeswitch service to perform Call Hijacking, the result is DeviceA android DeviceB both recive call end and call release, it is a error test now, can you understand what i want to expressed meaning? Thank you @Viish

LoyaiHai commented 2 months ago

One more note: the server uses freeswitch

Viish commented 2 months ago

I don't know if we support it or not, we never tried it. If it doesn't work then we probably do no support it, but you can check our technical corner just in case: https://linphone.org/technical-corner/liblinphone