<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://reviewboard.asterisk.org/r/2251/">https://reviewboard.asterisk.org/r/2251/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On January 7th, 2013, 10:06 a.m., <b>jcolp</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">res_sip_session --
Structures:
1. How does a session extension persist data on a session? mod_data in pjsip_inv_session?
2. How does a session extension know the life time of the session? Does it know based on the messages? (Should we have common logic which then calls into callbacks in the extension)?
3. I'm not a huge fan of using "extension" in the way you have, I understand why but it has other meanings in our system.
4. The SDP stuff isn't just for INVITEs - it's for 200 OKs, 180s, 183s, etc.
5. If the SDP stuff was extended more we could have the complete logic for each type of media (audio, video, T.38 udptl) separated out into different modules... would make organization cleaner.
Common SIP methods:
1. Your ast_sip_session_get_identity is missing the rdata
2. How does something calling ast_sip_session_send_reinvite know the result?</pre>
</blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Structures:
1. I'm not sure that mod_data in the pjsip_inv_session would be appropriate because it's likely that res_sip_session will be storing the ast_sip_session in the pjsip_inv_session mod_data. I can think of two possibilities for this:
a) We copy the "session cookies" model from Asterisk SCF. In other words, given a SIP session, a session extension can add a cookie or retrieve a cookie as desired. The ast_sip_session structure would be where the data is stored.
b) We add session_begin() and session_end() callbacks to the session extension callbacks so that session extensions can have more clear points to create and destroy session-specific data. The session extensions could then store the data locally where they please.
Personally, I'm a fan of a) over b).
2. Currently, a session extension would have to infer this information based on the content of the messages. Given that this could be error-prone, I think providing callbacks for when a session is begun and ended would be a safer option.
3. Yeah, agreed. I'm certainly open to suggestions for a better name since things can really get confusing if someone mentions a "SIP extension". Maybe "adjunct", "addendum", or "supplement" (Yay thesauruses!) ?
4. Yep, I'll change language so that words like "offer" and "answer" are used instead of specific SIP methods.
5. Indeed. SDP handling is something that needs a bit more effort put in here. Right now it's encompassed in a single handler but really, it should be separated by stream types. "Audio" "Video" "Image" "Text" and "Other" perhaps? Maybe specifically state T.38 instead of image?
Common SIP methods:
1. Will fix
2. I assume by "result" you mean the response to the reinvite? My assumption is that the majority of entities that would call for a SIP reinvite to be sent would be SIP session extensions. When the response comes in, they'd have their incoming_response() callback called. If something other than a SIP session extension were to send a reinvite, they would not currently be able to see the response to the reinvite. Got any suggestions of how to go about it? Maybe provide an optional callback function in ast_sip_session_send_reinvite() when the response arrives?</pre>
<br />
<p>- Mark</p>
<br />
<p>On December 20th, 2012, 1:17 p.m., Mark Michelson wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Asterisk Developers, Matt Jordan and jcolp.</div>
<div>By Mark Michelson.</div>
<p style="color: grey;"><i>Updated Dec. 20, 2012, 1:17 p.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This is a proposal for a res_sip and res_sip_session API for use in the new SIP channel driver. The pages are located here:
https://wiki.asterisk.org/wiki/display/AST/res_sip+design
https://wiki.asterisk.org/wiki/display/AST/res_sip_session+design
Please let me know what you think of these.
There are a few things that are not here and that probably should
* A struct called ast_sip_endpoint is referenced in a few places, but it is not defined. This is because a SIP endpoint is more-or-less defined by the DAL, which is currently under development by Mr. Joshua Colp. Once endpoint configuration and related structures are defined, they can be added in to these pages.
* There are no functions in res_sip_session for iterating over SDP media streams or attributes, nor are there any functions for aiding in creating SDPs. These likely should exist, but I have not placed them here now since I have difficulty seeing what parameters will be necessary nor what they might return.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">The wiki page renders properly.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
</ul>
<p><a href="https://reviewboard.asterisk.org/r/2251/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>