Subject: Re: ammsReply

From: Brian Rosen <[email-masked]>
Date: Wed, 3 Nov 1999 20:17:33 -0500

Brian 

The example in v12 Appendix A(?), step 24 

MEGACO/1.0 [123.123.123.4]:55555 
Transaction = 50009 { 
                                        Context = 5000 { 
                                        Subtract = A5555
{Audit{Statistics}}, 
                                        Subtract = A5556 {Audit(Statistics}}
} } 

From MG2 to MGC: 
MEGACO/1.0 [125.125.125.111]:55555 
Reply = 50009 { 
               Context = 5000 { 
                           Subtract { 
                                               Statistics { ; what are the
stats for a TDM connection? 
                                                                 
TDMPkg/OctetsSent=45123, TDMPkg/Duration=40 ; in seconds } }, 
                           Subtract { 
                                                Statistics { 
                                                RTPPkg/PacketsSent=1245, 
..........., 
                                                 RTPPkg/Jitter=27,
RTPPkg/AverageLatency=48 } } } } 

Since commands are excuted in order, for this example, MGC has to keep track
of the order of the Subtract for each termination, 
so when MGC gets the response for each Subtract without the termination ID,
MGC knows which statistics go with which 
terminations.  

Right 

Suppose MGC sends "Subtract = *" to MG and since the Text Encoding allows
TerminationID to be optional in the reply (above example), 
how does MGC know which statistics go with which terminations?  

The MG would return the terminationIDs, the reply would look like:

Reply = 50009 { 
               Context = 5000 { 
                           Subtract =A5555{ 
                                               Statistics { ; what are the
stats for a TDM connection? 
                                                                 
TDMPkg/OctetsSent=45123, TDMPkg/Duration=40 ; in seconds } }, 
                           Subtract=A5556 { 
                                                 
Of course this is just an implementation issue.  Hopefully the MG will be
implemented to return terminationID for a wildcard  

All MGs should return terminationIDs if a wildcard (or choose) is used.

Subtract. 

Why is terminationID in ammsReply optional in the first place? 

 Because in the most common cases it isn't needed.  You return only what you
need to.