[Freeswitch-dev] Request for guidelines on endpoints inner working

Giovanni Maruzzelli gmaruzz at celliax.org
Wed Nov 19 06:58:10 PST 2008


First things first: when I'll understand, I'll write the wiki page on
endpoints inner working and development.

I'm now beginning to rewrite the skypiax implementation, and I would
like to do it in the most "accepted" way.

skypiax (and celliax in the future) will have multiple interfaces (eg:
multiple concurrent skype clients managed by the module).

So, you can think at it as similar to mod_openzap as a general structure.

At module loading, I will parse the config file, and create a
"globals" struct that will contains the global values that can be
inherited by all interfaces and an array of pointers to interface
structs.

For each Skype interface that I find defined in the config file, I
will alloc and populate one interface struct pointed by one array
member.

If not overridden in the interface definition in the config file, the
interface struct members will inherit the values from the globals.

For each Skype interface, I will have a thread, started on module
loading, that monitors that interface for signaling (incoming call,
offline, buddies, etc).

When an incoming call arrives, the signaling thread creates the
session, get the interface name, create a private tech_pvt that is
just a series of pointers to the members of the interface structure
that is located by the name, put the channel in the CS_INIT state,
start the thread on it, and forget.

When there is an outboubd call, channel_outgoing_channel() find the
interface name from outbound_profile->destination_num, create a
private tech_pvt that is just a series of pointers to the members of
the interface structure located by the name, put the channel in the
CS_INIT state and forget.

Is the above correct?

How to send messages/events/etc (state changes, whatever) from the
signaling thread to an active interface (eg. remote hangup)?
How an active interface receives  messages/events/etc (state changes,
whatever) from the core FS (eg local hangup request)?

Thank you to all that will answer, and please forgive the naiveness of
this first posting.

Ciao for now,

Giovanni



-- 

Sincerely,

Giovanni Maruzzelli

=========================================
Contact person : Mr Giovanni Maruzzelli
Company : celliax
Website: www.celliax.org
Address : via Pierlombardo 9, 20135 Milano
Country/Territory : Italy
Business Email: gmaruzz at celliax dot org
Phone : 39-347-2665618
Fax : 39-02-87390039



More information about the Freeswitch-dev mailing list