name mode size
doc 040000
Makefile 100644 285B
README 100644 8.92kB
jabber.c 100644 17.25kB
lock.c 100644 3.84kB
lock.h 100644 2.36kB
mdefines.h 100644 1.69kB
sha.c 100644 5.63kB
tree234.c 100644 41.27kB
tree234.h 100644 5.83kB
xjab_base.c 100644 3.31kB
xjab_base.h 100644 2.11kB
xjab_dmsg.h 100644 3.08kB
xjab_jcon.c 100644 17.48kB
xjab_jcon.h 100644 3.43kB
xjab_jconf.c 100644 5.75kB
xjab_jconf.h 100644 1.69kB
xjab_load.c 100644 1.56kB
xjab_load.h 100644 1.62kB
xjab_presence.c 100644 5.25kB
xjab_presence.h 100644 2.25kB
xjab_util.c 100644 6.51kB
xjab_util.h 100644 2.27kB
xjab_wlist.c 100644 11.94kB
xjab_worker.c 100644 37.51kB
xjab_worker.h 100644 3kB
xode.c 100644 20.19kB
xode.h 100644 9.1kB
xode_from.c 100644 5.63kB
xode_str.c 100644 5.5kB
xpool.c 100644 6.51kB
xsnprintf.c 100644 26.94kB
xstream.c 100644 5.73kB
eXtended JABber module ====================== 1. Description 1.1 Dependencies 2.1 New features 2.2 Features 3. Exported parameters 4. Exported functions 5. Admin's guide 6. User's guide 7. Contacts [Revisions] 2002-12-10: Daniel MIERLA 2003-01-16: Daniel MIERLA 1. Description -------------- This is new version of Jabber module that integrates XODE XML parser for parsing Jabber messages. That introduces a new module dependence: expat library. Expat is a common XML library and is the fastest available for Linux/Unix, the second over all, after msxml library. It is integrated in most of well known Linux distributions. 1.1 Dependencies --------------- - modules - MYSQL - PA - TM - libraries - expat 2.1 New features ---------------- [January 2003] - presence support (see doc/xxjab.cfg for a sample cfg file) [December 2002] - SIP to Jabber conference support - possibility to manage all kinds of Jabber messages (message/presence/iq) - aliases - possibility to set host aliases for addresses (see parameter's desc.) - gateways detection - ability to see whether an IM gateway is up or down 2.2 Features ------------ - send received SIP MESSAGE messages to different IM networks (Jabber, ICQ, MSN, AIM, Yahoo) using a Jabber server - send as SIP MESSAGE messages incoming Jabber instant messages 3. Exported parameters ---------------------- Name: contact Type: string Default: none Desc: contact header for SIP messages - if not set, the header is filled with value of 'From' Name: db_url Type: string Default: "sql://root@" Desc: SQL URL of database - username, password, host, port and database (ex: sql:// Name: jaddress Type: string Default: "" Desc: IP or hostname of Jabber server - must be the same with value from <host> tag of Jabber server config file Name: jport Type: integer Default: 5222 Desc: port of Jabber server Name: jdomain Type: string Default: none Desc: Format:<delim> If the destination is for Jabber network the URI should be like: username<delim>jabber_server@jdomain or nickname<delim>roomname<delim>conference_server@jdomain <delim> must be a non-reserved character. By default this character is * . The destination will be transformed to username@jabber_server or roomname@conference_server/nickname before the message is sent to Jabber server. Name: aliases Type: string Default: none Desc: aliases for IM networks. Format: "N;alias1=<delim1>;...;aliasN=<delimN>;" Destinations like '*@aliasX' could have other format than those specified for Jabber network. All <delim> from user part of the destination address will be changed to <delimX> if the destination address contains <aliasX>. (Ex: jdomain is '*' and msn_alias is ''. The destination address for MSN Network, on SIP side, is like 'username*'. The destination address will be transformed to ''. '' must be the same as the JID associated with MSN transport in Jabber configuration file (usually is 'jabberd.xml')) Name: workers Type: integer Default: 2 Desc: number of workers Name: max_jobs Type: integer Default: 10 Desc: maximum jobs per worker Name: cache_time Type: integer (seconds) Default: 600 Desc: cache time of a Jabber connection Name: delay_time Type: integer (seconds) Default: 90 Desc: time to keep a SIP message Name: sleep_time Type: integer (seconds) Default: 20 Desc: time between expired Jabber connections checking Name: check_time Type: integer (seconds) Default: 20 Desc: time between checking the status of JabberGW workers 4. Exported Functions --------------------- Name: jab_send_message Params: none Desc: converts SIP MESSAGE message to a Jabber message and sends it to Jabber server. Name: jab_join_jconf Params: none Desc: join a Jabber conference - the nickname, room name and conference server address should be included in To header as: nickname%roomname%conference_server@jdomain . If the nickname is missing, then the SIP username is used. Name: jab_exit_jconf Params: none Desc: leave a Jabber conference - the nickname, room name and conference server address should be included in To header as: nickname%roomname%conference_server@jdomain . Name: jab_go_online Params: none Desc: register to the Jabber server with associated Jabber ID of the SIP user Name: jab_go_offline Params: none Desc: log off from Jabber server the associated Jabber ID of the SIP user 5. Admin's guide ---------------- The Jabber server setup is not a subject of this guide. Check for that. Useful scripts, for creating Jabber Gateway database, or for managing the Jabber accounts form web are located in 'doc' subdirectory of the module. Main steps of using the Jabber gateway: - create the mysql database - setup the local Jabber server - set the module parameter values in cfg file of SER, load the dependent modules, set up the routing rules for Jabber gateway. - run SER The administrator of SER/Jabber gateway MUST inform the users what are the aliases for Jabber/Other IM networks. Other IMs could be AIM, ICQ, MSN, Yahoo ... These aliases depend on the server hostname where runs SER and how local Jabber server is setup. Next is presented an usecase. Prologue: SER is running on '' Local Jabber server is running on '' Jabber network alias (first part of 'jdomain') is '' The aliases for other IM networks MUST be the same as JID set in Jabber configuration file for each IM transport. The JIDs of Jabber transports MUST start with the name of the network. For AIM, JID must start with 'aim.', for ICQ with 'icq' (that because I use icqv7-t), for MSN with 'msn.' and for Yahoo with 'yahoo.'. The gateway needs these to find out what transport is working and which not. For our usecase these could be like '', '', '', ''. It is indicated to have these aliases in DNS, thus the client application can resolve the DNS name. Otherwise there must be set the outbound proxy to SER server. *** Routing rules for Jabber gateway First step is to configure SER to recognize messages for Jabber gateway. Look at 'doc/xjab.cfg' to see a sample. The idea is to look in messages for destination address and if it contains Jabber alias or other IM alias, that means the message is for Jabber gateway. Next step is to find out what means that message for Jabber gateway. It could be a special message what triggers the gateway to take an action or is a simple message which should be delivered to Jabber network (using the method 'jab_send_message' ). The special messages are for: - registering to Jabber server (go online in Jabber network) - here must be called 'jab_go_online' method - leaving the Jabber network (go offline in Jabber network) - here must be called 'jab_go_offline' method - joining a Jabber conference room - here must be called 'jab_join_jconf' - leaving a Jabber conference room - here must be called 'jab_exit_jconf' The destination address MUST follow the next patterns: - for Jabber network: 'username<delim>jabber_server@jabber_alias' - for Jabber conference: 'nickname<delim>room<delim>conference_server@jabber_alias' - for AIM network: 'aim_username@aim_alias' - for ICQ network: 'icq_number@icq_alias' - for MSN network: 'msn_username<delim>msn_server@msn_alias'. msn_server can be '' or '' - for YAHOO network: 'yahoo_username@yahoo_alias' Note: 'jabber_alias' is the first part of 'jdomain'. 6. User's guide --------------- The user must activate his Jabber account associated with his SIP id. For each other IM network on which he wants to send messages, he must set an account for that IM network. The gateway is not able to create new account in foreign networks, excepting local Jabber server. When you want to send a message to someone in other IM network, you must set the destination of the message according with the pattern corresponding to that IM network (see last part of 'Admin guide' chapter). Ex: sending a message to which is in Jabber network, the destination must be: user<delim> . For someone who is in Yahoo network the destination must be: user@yahoo_alias NOTE: the SER administrator have to set the Jabber transports for each IM network in order to be able to send messages to those networks. The alias of each IM network can be found out from SER admin. NOTE: you cannot send messages from your SIP client to your associated Jabber account - is something like sending messages to yourself. 7. Contacts