[asterisk-dev] [Code Review] 2674: Abstract tech_pvt for chan_pjsip channels

Joshua Colp reviewboard at asterisk.org
Mon Jul 15 12:00:37 CDT 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2674/
-----------------------------------------------------------

Review request for Asterisk Developers and kmoore.


Repository: Asterisk


Description
-------

chan_pjsip currently places its own structure within the tech_pvt of channels. This allows it to store additional information (like an array for quick media session lookups) but also means that given a channel it is not possible to get the session when you know it is a chan_pjsip channel. This is extremely useful for things like frame hooks and allows things to extend behavior and functionality easier.

The attached patch abstracts the tech_pvt for chan_pjsip channels a bit by having a defined structure which contains the implementation details and also the session itself. Since the structure is defined as part of res_sip_session modules can use it to get the session when need be.

I called the structure ast_sip_channel as I couldn't come up with anything else, but if you take offense to the name suggest a new one and it will be changed.


Diffs
-----

  /trunk/channels/chan_gulp.c 394388 
  /trunk/include/asterisk/res_sip_session.h 394388 
  /trunk/res/res_sip_session.c 394388 
  /trunk/res/res_sip_session.exports.in 394388 

Diff: https://reviewboard.asterisk.org/r/2674/diff/


Testing
-------

Placed calls, confirmed sane.


Thanks,

Joshua Colp

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130715/842d44f4/attachment.htm>


More information about the asterisk-dev mailing list