Architecture of pjsua-lib/pjsip/pjsip-lib described somewhere?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi guys,

I'm trying to figure out how pjsua-lib works, ie connects with all modules and how all things are hooked together.
I'm new to the linux world, but need to understand to debug a problem I see with a special sip server.
I have looked at the documentation but haven't been able to figure it out how it all is connected and by what mechanisms.

For instance, I've built an application and connected on_pager on the application layer.
How can I understand how a message from the lowest level (udp-port incoming bytes - ok it's OS level) is received by some code, and sent further to who is supposed to be called back?

I understand there are modules for different purpose and they seem to have structures which are called into for different reasons (by whom?)

Example:

/* The module instance. */
static pjsip_module mod_pjsua_im =
{
    NULL, NULL,                                                                                                                    /* prev, next.                              */
    { "mod-pjsua-im", 12 },                                     /* Name.                                       */
    -1,                                                                                                                                        /* Id                                                                             */
    PJSIP_MOD_PRIORITY_APPLICATION,      /* Priority                 */
    NULL,                                                                                                    /* load()                                        */
    NULL,                                                                                                    /* start()                                        */
   NULL,                                                                                                    /* stop()                                        */
    NULL,                                                                                                    /* unload()                                   */
    &im_on_rx_request,                                                                     /* on_rx_request()                  */
    NULL,                                                                                                    /* on_rx_response()               */
    NULL,                                                                                                    /* on_tx_request.                    */
    NULL,                                                                                                    /* on_tx_response()               */
    NULL,                                                                                                    /* on_tsx_state()                      */

};


Another example is from pjsip  - sip_transaction.c

/* Transaction layer module definition. */
static struct mod_tsx_layer
{
    struct pjsip_module  mod;
    pj_pool_t                                  *pool;
    pjsip_endpoint                       *endpt;
    pj_mutex_t                              *mutex;
    pj_hash_table_t                    *htable;
} mod_tsx_layer =
{   {
                             NULL, NULL,                                                              /* List's prev and next.    */
                             { "mod-tsx-layer", 13 },            /* Module name.                                                       */
                             -1,                                                                                                               /* Module ID                                   */
                             PJSIP_MOD_PRIORITY_TSX_LAYER,               /* Priority.                                        */
                             mod_tsx_layer_load,                                            /* load().                                           */
                             mod_tsx_layer_start,                                           /* start()                                            */
                             mod_tsx_layer_stop,                                           /* stop()                                            */
                             mod_tsx_layer_unload,                                      /* unload()                                       */
                             mod_tsx_layer_on_rx_request,                      /* on_rx_request()                      */
                             mod_tsx_layer_on_rx_response,                   /* on_rx_response()                   */
                             NULL
    }
};

Transaction layger is also module which has different entrypoints for different reasons (load,start,stop,unload), and callbacks (on_rx_request/response).
Who calls them? Where can I look to see how the library all connects together with all modules?


Would be very happy to get some pointers here, or links so I can GET how all this is connected, and see in source files or headers or other files how it is done.

Greetings,
Johan Sandgren


_______________
Johan Sandgren  (Software Engineer)
Svep Design Center AB
Box 1233, 221 05 Lund, Sweden
E-mail  johan.sandgren at svep.se<mailto:johan.sandgren at svep.se>
Website www.svep.se<http://www.svep.se/>
Subscribe to our newsletter<http://eepurl.com/_P72P>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20150326/ecbff0c2/attachment.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux