Extract a message body from Incoming Message

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

 



Hi,

You can easily extract any header value from incoming message by following
code ...

Put this code in *pjsua_core.c:logging_on_rx_msg(pjsip_rx_data *rdata)*

pjsip_msg *uas_parsed_msg;
pjsip_err_info_hdr *info;
pj_str_t hname;
pj_str_t sname;

hname=pj_str("*<Header>*");  //Header you want to extract ex. CSeq.

info=(pjsip_err_info_hdr*)pjsip_msg_find_hdr_by_name(uas_parsed_msg,&hname,NULL);
if(info!=NULL)
 {
char headerInfo[512];
pj_size_t size=512;
 memset(headerInfo,'\0',512);
pjsip_hdr_print_on(info,headerInfo,size);
      //* headerInfo will give header value you want extract *
}

Thanks and Regards
Sushil Kumar
+91-9810697762

2010/6/14 peter hanshon <mido.1111 at hotmail.fr>

>  Hello
>
>       How Can I Extract a Particular Header from Incoming Message??
>
> Thank you
>
> ------------------------------
> Hotmail : une messagerie performante et gratuite avec une s?curit? sign?e
> Microsoft Profitez-en <https://signup.live.com/signup.aspx?id=60969>
>
> _______________________________________________
> 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
>
>


-- 
Thanks and Regards,
Sushil Kumar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20100614/c0177a05/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