Multiple versions of Megaco via the Megaco lib?

Gardell, Steven sgardell@REDACTED
Sun Apr 4 02:41:09 CEST 2010


I am trying to build an application that works at V3. Like, I imagine,
many
others I am starting with simple_mgc.
 
My first confusion is how to properly deal with the mix of V1 (service
change)
and V3 (everything else) messages. The Megaco library defines several
sets of
hrl files for different versions. What is the recommended way to
structure things
so I am using the V1 record definitions when I need to and the V3
otherwise?
The following works (when referencing megaco_message_v3.hrl), but it
seems evil:
 
 case ProtocolVersion of
        1 ->
            Address=element(3,SCP),
            Version=element(4,SCP),
            Profile=element(5,SCP);
        3 ->
        #'ServiceChangeParm'{serviceChangeAddress = Address,
             serviceChangeVersion = Version,
             serviceChangeProfile = Profile} = SCP
  end,
 
(I could simply just use the items in the "1" case since they are the
same
from V1 to V3) I tried various approaches to directly referencing the V1
record definition
to no avail.
 
Secondly, I am seeing complaints from megaco_filter which sorta suggest
that
it is not accounting for the megaco version. How do I configure
megaco_filter
for the version of interest?
 
Thanks

 

Steven Gardell
Engineering Manager
sgardell@REDACTED 

t +1 978 614 8831 
f +1 978 614 8101 
7 Technology Park Drive 
Westford, MA 
01886 USA 
www.sonusnet.com <http://www.sonusnet.com/>  
 <file:///c:/sonuslogo.gif> 	
Deliver the Future First with Sonus Networks.
Disclaimer: Content provided is for information purposes only and is
subject to change without notice. Sonus has no obligation or commitment
to develop or deliver any future release, upgrade, feature, enhancement
or function described in this email or any attachment or presentation
except as specifically set forth in a written agreement. 

 


More information about the erlang-questions mailing list