RFC 3326

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

 



hi,
You could parse Header "Reason" for incoming CANCEL at your callback
on_tsx_state_change if using pjsip-ua API.

/* Get Reason Header */
const pj_str_t str_reason = { "Reason", 6 };
pjsip_generic_string_hdr *reason =
(pjsip_generic_string_hdr*)pjsip_msg_find_hdr_by_name(rdata->msg_info.msg,
&str_reason, NULL);


regards,
Gang

On Tue, Mar 1, 2011 at 4:56 PM, <s.marek at avm.de> wrote:

> Hello everyone,
>
> the other day I was having a look at the sources in the pjsip/src/pjsip
> folder in order to evaluate the Reason: header on an incoming CANCEL. The
> RFC behind the idea is RFC 3326. To make things clear: we're not talking
> about the reason string within the status line. RFC 3326 talks about a
> seperate header line named Reason.
>
> Apart from Reason not having a specific handler in sip_parser.c it seems
> to me, that up to inv_respond_incoming_cancel() in sip_inv.c I have access
> to the received data through rdata with the Reason header somewhere inside
> rdata->msg_info. But my on_call_state() handler is called later, after
> PJSIP has responded to the CANCEL message. As far as I can see, I don't
> have access to the received headers at that point anymore.
>
> I don't have enough insight to provide a patch, so forgive me this shot in
> the dark: pjsip_endpt_create_response() in sip_util.c does copy some
> things over from rdata->msg_info to tdata. That might be a starting point
> to save the received Reason header into the tx_data struct and start to
> support RFC 3326? That way my on_call_state() callback might have access
> to the Reason header through the body of the event struct given to it?
>
> Or does PJSIP support RFC 3326 already and I was just too ignorant to find
> the right spots? I'm working with a pretty current (2 weeks old) version
> of the 1.8.10 branch.
>
> Any other thoughts on that matter?
>
> Thanks in advance,
> Sebastian.
>
> _______________________________________________
> 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/20110302/40af1dc4/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