on_tsx_state_changed - Adding header.

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

 



By some test I see that PJSIP_EVENT_TX_MSG was not the good event.
With PJSIP_EVENT_TSX_STATE I enter in the condition, but I have the same error.



From: levequecedric@hotmail.comTo: pjsip at lists.pjsip.orgDate: Wed, 17 Sep 2008 12:04:30 +0200Subject: on_tsx_state_changed - Adding header.


Hi, I'm trying to add some header on Transmit Data thanks to the callback call_on_tsx_state_changed from a module session invite, but when I see the trace of my SIP message, there aren't any modification : No Subject Header.  static void call_on_tsx_state_changed( pjsip_inv_session *inv,           pjsip_transaction *tsx,            pjsip_event *e ){ /*pjsip_tx_data *tdata; pjsip_generic_string_hdr *hsubject; pj_str_t name; pj_str_t value; name = pj_str("Subject"); value = pj_str("PJSIP_UA"); puts("Subject"); puts("PJSIP_UA"); if(e->type == PJSIP_EVENT_TX_MSG) {  tdata = e->body.tx_msg.tdata;  hsubject = pjsip_generic_string_hdr_create(tdata->pool, &name,          &value);      pjsip_msg_insert_first_hdr(tdata->msg, (pjsip_hdr*) hsubject); }*/}I have tried pjsip_msg_add_hdr too. I use simpleUA example and the following page to do my code.http://trac.pjsip.org/repos/wiki/SIP_Message_Buffer_Event#GettingtheSIPMessagefrompjsip_event May be there is a bug ? Thanks by advance for responses. C?dric.



T?l?phonez gratuitement ? tous vos proches avec Windows Live Messenger  !  T?l?chargez-le maintenant ! 
_________________________________________________________________
Email envoy? avec Windows Live Hotmail. Dites adieux aux spam et virus, passez ? Hotmail?! C'est gratuit !
http://www.windowslive.fr/hotmail/default.asp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20080917/fc9b772a/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