The LTP stack

The LTP stack consists of:

Note: The LTP software is released under LGPL. Any work that you derive from this must be made available publicly in source form as well.


Using the LTP stack

It is best that you study the ltp client for linux to understand how the stack maybe used.

Here is how it is done:

  1. The ltp stack needs speex and gsm codecs. You can skip the speex code by not defining SUPPORT_SPEEX as a precompiler directive.
  2. All the LTP APIs are documented in ltpstack.h
  3. Call ltpInit() to create the struct ltpStack and setup a timer to call ltpTick() every second.
  4. Provide a function alert() to catch various LTP events.
  5. Provide sound functions to openSound(), closeSound(), outputSound().
  6. Provide a function lookupDNS() to convert DNS names to IPv4 addresses.
  7. Setup struct ltpStack members ltpUserid, ltpPassword and ltpServername to start login.
  8. Add members to your contact list by calledin ltpUpdateContacts().
  9. Use functions ltpRing(), ltpAnswer(), ltpHangup() to handle make, answer and disconnect calls.
  10. Use functions ltpTalk() and ltpHangup() to start and stop Push-to-Talk sessions.
  11. Use functions ltpChat() to send chat messages.