i'm looking a way to change all SIP(signaling) and RTP(media) packets by own protocol, please suggest me where i can do it

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

 



Hi
for module, looks like good proposition, but:

    status = pjsip_endpt_register_module(pjsua_get_pjsip_endpt(),
                                         &mod_default_handler);
    if (status != PJ_SUCCESS)
        return status;

/* The module instance. */
static pjsip_module mod_default_handler =
{
    NULL, NULL,				/* prev, next.		*/
    { "mod-default-handler", 19 },	/* Name.		*/
    -1,					/* Id			*/
    PJSIP_MOD_PRIORITY_APPLICATION+99,	/* Priority	        */
    NULL,				/* load()		*/
    NULL,				/* start()		*/
    NULL,				/* stop()		*/
    NULL,				/* unload()		*/
    &default_mod_on_rx_request,		/* on_rx_request()	*/
    NULL,				/* on_rx_response()	*/
    NULL,				/* on_tx_request.	*/
    NULL,				/* on_tx_response()	*/
    NULL,				/* on_tsx_state()	*/
    
};

static pj_bool_t default_mod_on_rx_request(pjsip_rx_data *rdata)
{
    PJ_LOG(1,(THIS_FILE,  "default_mod_on_rx_request"));
}

show nothing on console. I call pjsip_endpt_register_module 
after pjsua_init of course.
May u suggest a code snippet?
Alex

Sep 19, 2013, ? 11:51 AM, Dan Arrhenius <dan at keystream.se> ???????(?):

> Hi,
> for the SIP signaling I think you should be able to accomplish this with implementing a pjsip module in which you modify the messages when they are received and sent. Have a look at pjsip_endpt_register_module().
> For the RTP traffic you can implement your own media transport that uses one of the existing media transports as a slave transport and then do your own modifications on the RX/TX packets. Have a look at http://www.pjsip.org/docs/latest/pjmedia/docs/html/group__PJMEDIA__TRANSPORT.htm
> 
> Good luck!
> Dan
> 
> On 9/19/13 8:56 AM, Oleksii Vynogradov wrote:
>> Hi
>> For some reason i need implement own protocol to change all sip/rtp packets. Can you suggest me a right way?
>> Alex
>> _______________________________________________
>> Visit our blog: http://blog.pjsip.org
>> 
>> pjsip mailing list
>> pjsip at lists.pjsip.org
>> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
> 
> 
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
> 
> pjsip mailing list
> pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20130919/54192104/attachment-0001.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