Learning notes-SIP message receiving and processing flow based on sipdroid SIP audio and video telephony

Source: Internet
Author: User

Registeragent class

In Transactionclient Fail/success callback, the Registeragentlistener register Fail/sucess interface is called

 Public classRegisteragentImplementsTransactionclientlistener, Subscriberdialoglistener {
  Registeragentlistener Listener;
Publicregisteragent (... Registeragentlistener Listener, ...) {} Public voidOntranssuccessresponse (transactionclient ransaction, Message resp) {listener.onuaregistrationsuccess ( This, target, contact, result); } Public voidontransfailureresponse (transactionclient, Message resp) { listener.onuaregistrationfailure ( This , Target, contact, result); } Public voidontranstimeout (transactionclient transaction) {Listener.onuaregistrationfailure ( This, Target, Contac, "Timeout"); Listener.onuaregistrationsuccess ( This, Target, Contac, "Timeout"); }}

Transactionclient class/--->sipproviderlistener1. Extends Transaction
 Public Abstract class Implements Sipproviderlistener, TimerListener {    publicvoid  onreceivedmessage (sipprovider Provider, Message msg) {}}
2. Transactionclient class

In the callback of the transaction fail/success (actual Sipprovider callback), the Fail/sucess interface of the transactionclient is called

 Public classTransactionclientextendsTransaction {Transactionclientlistener transaction_listener;  Publictransactionclient (Sipprovider sip_provider, Message req, Transactionclientlistener listener) {Super(Sip_provider); Request=NewMessage (req); Init (Listener, Request.gettransactionid ()); //This.transaction_listener = listener;} //The actual Sipprovider callback
Public voidOnreceivedmessage (Sipprovider provider, Message msg) {Transaction_listener.ontranssuccessresponse ( This, MSG); Transaction_listener.ontransfailureresponse ( This, MSG); } pulicvoidOnTimeOut (Timer to) {//Transaction_listener callback associated with the timeout }}

So, what object is Sipproviderlistener triggered?

Learning notes-SIP message receiving and processing flow based on sipdroid SIP audio and video telephony

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.