[Sipdroid] sipdroid simple analysis

Source: Internet
Author: User

Http://blog.csdn.net/Leixin525/article/details/6299050

Recently, I made an IP Call on Android. all of you have made a simple analysis on sipdroid. I hope it will be helpful to all of you who are using VOIP. I also hope you can give some advice here. I mainly modify the SIP block and change the sipdroid's sip to my own private sip. At the same time, I made a ing between my own sip and the standard sip, so I still don't understand the UI.

Sipdroid is a relatively mature VOIP software that provides video voice calls and supports various network access modes (such as Bluetooth, Wi-Fi, and 3G) and multiple voice and video encoding processes, at the same time, SIP is fully written in the upper layer of Java, with clear modules and better modifications.

1. Simple Analysis of sipdroid Module
UI Layer, responsible for interface display module and interface Time Transmission
Engine layer: the software core processing layer, which starts various services and initializes software parameters. Process various UI time, maintain configuration file information, and save global property variables. These include useragenprofile (user configuration file attributes), useragent (User event processing), and sipdroidengine (core processing, all UI events, parameter design, and Service Startup are all scheduled by this file ), registeragent (Registration Service Processing)
SIP layer: Provides all SIP Message models and processes for processing all SIP messages, including sending, receiving, encapsulation, and decoding.
Network Transmission: Provides processing of audio and video information. This module instantly decodes audio and video and sends data at the same time. Jstn Nat passthrough technology is also provided.


2. sipdroid Process Analysis:
Dial-Up: the dial-up request is sent to sipdroidengine by the UI through the Referer broadcast information. The sipdroidengine performs some verification and then handed over to useragine for processing. Call (string
Target_url, Boolean send_anonymous) to determine whether anonymous dialing is used in this method, an extendedcall object is created to be used by the SIP protocol stack, and then the call method of extendedcall is called for processing, then, the call of extendedcall calls extendedinvitedialog to send the invite request. Invitedialog executes the specific invite to call the Request Method of invitetransactionclient. Finally, invitetransactionclient sends the request. In invitetransactionclient, messages are sent through sipprovider and port listening is enabled, to receive SIP messages. Most messages are sent through udptransport over UDP.
TCP transmission tcptransport)
Incoming call: when the program is started, a provider will be created through sipdroidengine according to the configuration. UDP transmission is used here to create a udpprovider. udpprover is a thread and the thread will be started when the program is created, start listening for received information. When the received information is received, the object is transferred to udptransport through the onserviceterminated method, which is processed by udptransport and then transmitted to the sipprovider object through the ontransportterminated method, finally, the received message is processed in the processreceivedmessage method of sipprovider. Finally, the corresponding listener is retrieved from listeners (MAP), and the specific SIP request is processed through onreceivemessage () in the corresponding listener.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.