Megaco text encoding problem with embedded Events

Micael Karlberg <>
Mon Jun 13 13:54:06 CEST 2005


Hi,

Sorry for the long delay.

You are correct. And it seems our decoder handles it "your" way (but
not the encoder).
Hopefully a fix will make into the next OTP release.

Regards,
	/BMK

Leigh Fiddes writes:
 > Hi,
 > 
 > I am experimenting with the Erlang Megaco stack (3.0.1) and I am
 > having a problem encoding an embedded Events within an Event.
 > 
 > The erlang code I am using is:
 >      SRE1 = #'SecondRequestedEvent'{ pkgdName = "al/on",
 >                                      evParList = [] },
 > 
 >      SRA = #'SecondRequestedActions'{ eventDM = { digitMapName, "DialPlan0" }},
 > 
 >      SRE2 = #'SecondRequestedEvent'{ pkgdName = "dd/ce",
 >                                      eventAction = SRA,
 >                                      evParList = [] },
 > 
 >      SED = #'SecondEventsDescriptor'{ requestID = 2,
 >                                       eventList = [ SRE1, SRE2 ] },
 > 
 >      RA = #'RequestedActions'{ secondEvent = SED },
 > 
 >      RE = #'RequestedEvent'{ pkgdName = "al/of",
 >                              eventAction = RA,
 >                              evParList = [] },
 > 
 >      EV = #'EventsDescriptor'{ requestID = 1, eventList = [ RE ] },
 > 
 >      TermID = {megaco_term_id, true, [[$*]] },
 > 
 >      AMMR = #'AmmRequest'{ terminationID = [ TermID ],
 >                            descriptors = [{ eventsDescriptor, EV }]},
 > 
 >      CR = #'CommandRequest'{command = {modReq, AMMR}},
 > 
 >      AR = #'ActionRequest'{contextId = ?megaco_null_context_id,
 > 			  commandRequests = [CR]},
 > 
 > 
 > but the megaco message produced is:
 > Context = - {
 >           Modify = * {
 >                  Events = 1 {
 >                          al/of {
 >                                  Embed {
 >                                          Events = 2 {
 >                                                  al/on
 >                                          },
 >                                          Events = 2 {
 >                                                  dd/ce {
 >                                                          DigitMap = DialPlan0
 >                                                  }
 >                                          }
 >                                  }
 >                          }
 >                  }
 >          }
 > }
 > 
 > whereas my reading of H.248.1 says that the correct syntax for this
 > should be:
 > 
 > Context = - {
 >          Modify = * {
 >                  Events = 1 {
 >                          al/of {
 >                                  Embed {
 >                                          Events = 2 {
 >                                                  al/on,
 >                                                  dd/ce {
 >                                                          DigitMap = DialPlan0
 >                                                  }
 >                                          }
 >                                  }
 >                          }
 >                  }
 >          }
 > }
 > 
 > according to the standard:
 > 
 > embedNoSig            = EmbedToken LBRKT embedFirst RBRKT
 > ; at-most-once of each
 > embedFirst            = EventsToken [ EQUAL RequestID LBRKT
 >                          secondRequestedEvent *(COMMA secondRequestedEvent)
 >                          RBRKT ]
 > secondRequestedEvent  = pkgdName [ LBRKT secondEventParameter
 >                          *( COMMA secondEventParameter ) RBRKT ]
 > 
 > Is my interpretation or method incorrect or is the pretty text
 > encoder incorrect?
 > 
 > Regards,
 > Leigh
 > -- 
 > ============================================================
 > Leigh Fiddes                  email: 
 > Software Development Manager          Phone: +61 3 9264 3864
 > Broadband Network Technology Division   Fax: +61 3 9264 3892
 > NEC Australia



More information about the erlang-questions mailing list