PJLIB simple question

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

 



To parse a URI I first call pjsip_parse_msg

 pjsip_msg  *msg = pjsip_parse_msg(pool, (char*)message.c_str(),
message.length(), &err);

Where my SIP message is contained in a string variable.

Then I call 
pjsip_sip_uri *uri = (pjsip_sip_uri*)msg->line.req.uri;

On the parsed pjsip_msg to set the pointer to the uri. From there you can
access any fields of the pjsip_sip_uri structure.

Hope that helps.

-Tavaris


On 10/5/11 8:42 AM, "Tom Johnson" <TJohnson at microaut.com> wrote:

> How does one use the pjlib functions to parse the URI of an incoming call?   I
> see functions to build it, but did I miss the functions that split it back up
> into its parts?   Or how to get a substring of a pj_str_t without doing
> pointer arithmetic?
>  
> 
> 
> Notice: The information contained in this email and any attachments is
> confidential and may be subject to copyright or other intellectual property
> protection. If you are not the intended recipient, you are not authorized to
> use or disclose this information, and we request that you notify us by reply
> mail or telephone and delete the original message from your mail system.
> 
> 
> _______________________________________________
> 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/20111005/e36c0599/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