$Id: TODO,v 1.13.2.1 2003/03/28 05:25:50 bko Exp $

TODO for MGCP


		      Build, Tools, Environment
		      -------------------------

I'm thinking of ditching the big copyright headers on the Makefiles.

API builder doesn't really produce sufficient information to use the
code from C.

low priority: change the API builder to generate the stubs that it
needs to into some metafile that can be used to create the Type files.

The debugging classes must be re-abstracted to use the cpLog facilities.

mgcp-debug must be documented more clearly.  It is a script which can
be run like this:

	mgcp-debug foo.log ./gateway nullhw localhost 5050

mgcp-debug is in the tools directory.

it would nice to be able to redirect more i/o to files. probably the
stack's itself's warning messages and debugging messages.

When it is run, it will turn on logging in the MGCP stack for the
gateway even without the gateway needing to be rewritten, by using
environment variables to pass in arguments.  Ideally, this should also
be possible on non-Unix environments as well (by using the Registry on
Win32, for example?)


Code reuse

1.  replace Timer class with Fifo.

(DONE) 2. (high) replace the UDP code with the standard util/ UDP code.  as
a side effect this will also fix the send port not being the same as
the receive port.

(DONE) 3.  In MgCommand.cxx and MgcCommand.cxx, pull the code from the
functions with identical names in different classes to a single
function (e.g. getItemSignalRequests).  An example is
getOneMgRequestedEvent().

4.  Rename MgAgent and MgcGateway to less confusing names, as well as
MgCommand/MgcCommand.

5.  Remove the word "Generic" from many of the class names, as well as
the inheritance around these classes.


			      MGCP Stack
			      ----------


Transport
---------

(Chok) Update the async messaging in the following ways:

1.  The stack will also put endpoint id into the base class.  since
the stack will no longer pass up unanticipated responses, all
responses MUST be matchable to a sent request. (did not happen,
probably will not happen).


2.  (internals) add a way to get the FD from the gateway, or handle
the maxfd case gracefully.  (for select(), in MgAgent.cxx and
MgcGateway.cxx).

(Done) 3.  Transport must cleanly separate transport actions from parsing
actions.  At the moment transport has both entangled together in
mgTransport.* and mgcTransport.* instead of having the parsing portion
separated out into its own file.
	*** parsing portion already seperated into MgcpParse.cxx

  Questions about this:

	- should the matching of missing and redundant messages be
	  separated into the transport side or the parsing side?
	*** done in processpending() in transport side
	- what about resends?
	*** done in transport side

(Done) 4.  (high?)  Resend on timeouts.
	*** plus At-Most-Once functionality

Error Handling
--------------

The error handling must be overhauled.  The current error handling
involves printing out to stderr upon errors, which gives the user code
in the stack no clue that something bad just happened.

Exceptions are certainly the C++ way to do it, and offer benefits.
The problem is that exceptions may produce undesireable overhead on
some systems, or just Not Work.



Events and Signals
------------------

(Done) We need to handle the wildcard signals, probably by offering
"wildcard" events/signals as their own things, and passing the
information down to the stack user to implement as he/she sees fit.
Yes, this is lame, but the other option is for the stack user to pass
up which packages/events their code implements.

(Done) Add a wildcard event and signal.

It is probably a good idea to give the application parser code to
parse for wildcards and $ and the like, but it should not happen
INSIDE the stack.

Interoperability
----------------

There are a number of interoperability fixes that we can add, both in
restricting our input and liberalizing our output (like more empty
lines, default packages, etc.)

The appplication needs to be able to tell the stack what its default
package is.


NCS 1.0 compatibility
---------------------

(Done) NCS 1.0 compatibility is needed for the Hitachi MTA project.


Parsing
-------

The current parsing is a distributed model, which may be OK.  The
current code is massively hardcoded in a bunch of different places,
which isn't.

Replace large amounts of code in MgcpGenericEvent.cxx with a
table-driven method to simplify the code as well as simplify
modification of the code.

Audit Endpoint / Audit Connection
---------------------------------

(Done) Implement these commands.  Need both composition and parsing to be written.



Regression Testing
------------------

I need to implement a bunch of tests for the code.

Specific cases TODO

1.  Test the MgcpGenericAction to see if they correctly get built when
passed a string or substring.

2.  Parse messages (without the network -- just pass them to
parseMessage) and see if they continue to work.


Sample pretty-printer for MGCP
------------------------------

I need to write some code to pretty-print MGCP messages, which will
make testing much easier.




This is the list of items to be done and not yet supported in the stack
-------------------------------------------------------------------------------

1. The following are the missign APIs from gateway and callAgent perspective:

Command                       Gateway              CallAgent
----------------------------------------------------------------------------
Endpoint Configuration                              setBearerInformation()
----------------------------------------------------------------------------
 NotificationRequest        getNotifiedEntity()
                            getQuarantinehandling()
-----------------------------------------------------------------------------
Notify                      setNotifiedEntity()
----------------------------------------------------------------------------
CreateConnection            getNotifiedEntity()      getSpecificEndpointID()
                            getSecondEndpointID()    getSecondEndpointID()
                            getQuarantineHandling()  getSecondConnectionID()
                            setSpecificEndpointID()
                            setSecondEndpointID()
                            SetSecondConnectionID()
-----------------------------------------------------------------------------
ModifyConnection            getNotifiedEntity()
                            getQuarantineHandling()
------------------------------------------------------------------------------
DeleteConnection            getNotifiedEntity()       setReasoncode()
(from callAgent)            getResponseCode()         setConnectionParameters()
                            getConnectionParameters() getConnectionParameters()
                            getQuarantinehandling()
                            setConnectionParameters()
-------------------------------------------------------------------------------
DeleteConnection            setCallID()               getCallID()
(from the gateway)          setEndpointID()           getEndpointID()
                            setConnectionID()         getConnectionID()
                            setReasoncode()           getReasonCode()
                            setConnectionParameters() getConnectionParameters()
-------------------------------------------------------------------------------
RestartInProgress           setReasoncode()           getReasonCode()
                            getNotifiedEntity()       setNotifiedEntity()
-------------------------------------------------------------------------------

2. The following are the Event/Signal Missing from the packages

Package       EventSymbol        WhichSide          Event/Signal
---------------------------------------------------------------------------
RTP           co1                Gateway
RTP           co2                Gateway
RTP           co1                CallAgent         both
RTP           co2                CallAgent         both
Trunk         b1                 CallAgent         signal

Also some of the package items that take parameters are not fully supported
in encoding and parsing, e.g. adsi and ci.


3. The following are the MGCP parameters Missing

ReasonCode
SpecificEndpointID
secondConnectionID

4. Encode and parse functions Missing in

ResponseAck
secondendpointID
RestartMethod
RestartDelay

======================================================================

Copyright 2000-2003, Cisco Systems, Inc.
THE INFORMATION HEREIN IS PROVIDED ON AN "AS IS" BASIS, WITHOUT ANY
WARRANTIES OR REPRESENTATIONS, EXPRESS, IMPLIED OR STATUTORY, INCLUDING
WITHOUT LIMITATION, WARRANTIES OF NONINFRINGEMENT, MERCHANTABILITY OR
FITNESS FOR A PARTICULAR PURPOSE.

$Id: TODO,v 1.13.2.1 2003/03/28 05:25:50 bko Exp $
