on_tsx_state_changed - Adding header.

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

 



Thanks for all your solution,
I tried these all things to managed PRACK after this creation by Invite session.
I think use the solution of the module to do it.
I'm reading again the developpers guide, and I understand more thing that at my first reading.
 
C?dric.



Date: Mon, 22 Sep 2008 00:02:59 +0100From: bennylp@pjsip.orgTo: pjsip at lists.pjsip.orgSubject: Re: on_tsx_state_changed - Adding header.
On Wed, Sep 17, 2008 at 11:33 AM, cedric leveque <levequecedric at hotmail.com> wrote:


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.
You *probably* need to invalidate the transmit data so that the message is re-printed to the message buffer. This can be done by using pjsip_tx_data_invalidate_msg(tdata).I don't normally use this callback to modify the message so I'm not sure if this is the case, but you can try it yourself. -benny 



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 ! 

Qui vous permet d'enregistrer la TV sur votre PC et lire vos emails sur votre mobile ? la r?ponse en vid?o la r?ponse en vid?o_______________________________________________Visit our blog: http://blog.pjsip.orgpjsip mailing listpjsip at lists.pjsip.orghttp://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
_________________________________________________________________
Installez gratuitement les 20 ?m?ticones Windows Live Messenger les plus fous ! Cliquez ici !
http://www.emoticones-messenger.fr/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20080923/133a4bb4/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