[asterisk-scf-dev] SessionCommunicationsIf Questions/Comments

Russell Bryant russell at digium.com
Tue Oct 12 21:27:56 CDT 2010


Greetings,

I've been able to pull a few minutes together lately to do some more in depth looking at the code developed for Asterisk SCF.  I've been taking some notes on questions and comments I have along the way.

First off, this is really great stuff.  I'm very excited to see all of this coming together.  You guys are awesome.  Thank you for all of your hard work so far!

Now, to my questions/comments ...   I will start with some questions and comments regarding some things in SessionCommunicationsIf.ice.


1) ResponseCode class

1.a) For clarification, the value encapsulated here is the ISDN cause code, correct?  The ones in causes.h of Asterisk 1.X?

   http://svnview.digium.com/svn/asterisk/trunk/include/asterisk/causes.h?view=markup


2) Session and SessionListener interfaces

2.a) I see that ResponseCode is used as a parameter in 4 places:

   - progress() and stop() for the Session interface
   - progressing() and stopped() for the SessionListener interface

The use of the cause values make sense to me for stop() and stopped(), but I don't understand how it maps to progress() / progressing().  It's not clear to me when progress() / progressing() are supposed to be used.  "progress" has a special meaning in telephony protocols, so is it the same thing as that?  That seems to be the case based on existing usage so far.

I see that the SIP session manager calls progressing() when it receives a 183 Session Progress.  The ResponseCode it provides with that is 42.  Where does 42 come from?  42 is CONGESTION in ISDN cause code land.

If the mapping to/from 183 Session Progress or an ISDN PROGRESS message is correct, then perhaps the ResponseCode parameter should just be removed?

2.b) How should 100 Trying for SIP or PROCEEDING in ISDN map to these interfaces?  I couldn't find a way to do that right now.

2.c) This one is a bit pedantic ... I see that SessionListener has a method called ringing(), while Session has ring().  I propose that they both be ringing().  ring(), to me, sounds more like a command to ring a phone (or make an outgoing call), not send notification that the far end is ringing, which is what they both appear to be for.


3) SessionInfo class

3.a) What is the overview of the intent of this class?  What are some example use cases of what/when this information would be wanted or needed?

3.b) There are two SessionEndpoint references included in this class, "destination" and "caller".  I don't think I understand what these are for.  For a session inbound into Asterisk SCF, isn't the destination a string and not a SessionEndpoint?  Also, what is the "caller" SessionEndpoint?  For an outbound Session, would that just be left empty?  For an inbound Session, is the "caller" just the SessionEndpoint that created the Session?

3.c) There is a connectedTime variable defined as a long.  What are the units?  Also, if startTime is defined using a slice defined timestamp, why not connectedTime?

3.d) There is a currentState variable defined as a string.  There is a TODO comment that says that an enum might be good here.  +1 to that :-)

3.e) There is a role variable.  What is it for?  What are the possible values?

3.f) For the startTime, I see that this uses the TimeMarker class.  TimeMarker has a markTime and a scale.  What do those fields mean?

3.g) Also for the startTime, the documentation says that it is when the session was "initiated".  Specifically, is that when createSession() was called on the SessionEndpoint that created this Session?

3.h) One thing that struck me as missing in the SessionCommunicationsIf was "identity" information.  I'm referring to the caller ID, connected ID, and redirecting ID type things.  That information probably belongs in SessionInfo, but there are likely some methods that need to be added to the Session and SessionListener interfaces, as well.  Or is this the wrong place for that information?


Thanks,

--
Russell Bryant
Digium, Inc.  |  Engineering Manager, Open Source Software
445 Jan Davis Drive NW   -    Huntsville, AL 35806  -  USA
jabber: rbryant at digium.com    -=-    skype: russell-bryant
www.digium.com -=- www.asterisk.org -=- blogs.asterisk.org





More information about the asterisk-scf-dev mailing list