Thursday, December 20, 2012

CSipSimple - Getting started to hack it (tailor to my needs)


Just one or two things I need to remember about CSipSimple:

Infrastructure
  • SipStack runs in background (communication via Parcable interface). It interacts with PJSIP.
    Important there is a watchdog timer (about 5s)!
  • pjsua.java, pjsuaConstants is the SWIG generated interface to PJSIP
  • Native functions never return boolean, check for pjSuaConstants.PJ_SUCCESS
  • Be aware of string exchange with the native stack: PjSipService.pjStrToString(...)
  • UAStateReceiver.java does the call creation and everything related to SipStack
  • PjSipService.java is deeply integrated with UAStateReceiver.java (for example does recording...)

UI
  • CustomDistribution.java defines some things for fast modifying the behavior
  • Main screen is created in SipHome.java (incl. the slidable tabs)
    To remove tabs, just disable tab.add (except for the warning tab and the message tab [message disable in CustomDistribution.java]: may be triggered from outside)
  • Notifications are handled in SipNotifications.java (but from Sip-Thread)
  • DialerFragment.java is the dialer incl. call button and account switcher...
    Here the re-dial functionality is missing... (press the call button twice without number should redial previous number)
  • InCallActivity.java :)
    Important call setup is done BEFORE launching the InCallActivity via SipManager.ACTION_SIP_CALL_UI from UAStateReceiver.launchCallHandler(...).
    There is even a activity start delay of 2000ms (UAStateReceiver.LAUNCH_TRIGGER_DELAY).
    I think it's not nice!!!! Because a user may hear sound of before the UI is ready, but there is might be a problem with race conditions...
  • InCallControls.java is the ui element on the bottom of InCallActivity to control Bluetooth and loudspeaker etc. (Deeply integrated with InCallActivity: sadly NO MVC...)
  • InCall.java is also related to Dialer

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.