Proposed patch for new callback in sip_inv module: on_rx_reinvite

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

 



On Mon, Jan 19, 2009 at 1:30 PM, Ruud Klaver <ruud at ag-projects.com> wrote:

>
> thanks for bumping up the thread. I haven't looked at it in detail, but so
>> far it looks simple and straightforward indeed. Couple of things are not
>> clear though. So the reinvite callback will be called instead of
>> on_rx_offer(), which means that the application has to manage SDP
>> negotiation itself outside on_media_update() framework? (Note: I might be
>> talking rubish here).
>>
>
> Well, thanks for looking over the patch. Basically the code flow will be
> the same for responding to an initial INVITE as for a re-INVITE. What I'm
> doing right now is calling pjsip_inv_answer() with the SDP for the response
> as an argument, then pjsip_inv_send_msg(). For both cases this uses the SDP
> negotiation framework, and indeed after responding to a re-INVITE, the
> on_media_update() callback will be called with the result of the
> negotiation, just as for the original INVITE.
>
>
Okay, I think I got a clearer picture now. So if the app doesn't implement
on_rx_reinvite() callback, this is the flow when a re-INVITE is received:

 - on_rx_offer() is called
 - app calls pjsip_inv_set_sdp_answer() inside the callback
 - pjsip negotiates the SDP, and calls on_media_update() callback
 - pjsip sends 200/OK response automatically with the negotiated answer

When the callback is implemented, the flow changes:

 - on_rx_reinvite() is called
 - app calls pjsip_inv_answer() with SDP initial answer
 - pjsip negotiates the SDP and calls on_media_update() callback
 - app calls pjsip_inv_send_msg() with the negotiated answer

I'm hesitating a bit because of the flow changes, but this looks reasonable
and I can't see any alternatives either, and you've done good job with the
doxygen comments which should explain this flow change.



>> Also what about UPDATE? :)
>>
>
> Ah, good question. I spent some time thinking about this when making the
> change to the code, but in the end this functionality is not required for
> UPDATE, as it requires and immediate response according to the RFC. This is
> why, for an incoming UPDATE, on_rx_offer() is still called.
>
>
You're right. Right I think I can take this on board. Last but not least,
since this is quite a significant piece of code, would you mind following up
http://trac.pjsip.org/repos/wiki/ContributionAgreement? It's one of the
thing that we have to do unfortunately. :)

thanks
 Benny
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20090119/9df8f987/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