Page 1 of 1

megaco decoding with opal

Posted: Wed Apr 11, 2012 10:09 am
by legyndir
i all,

I am trying to decode H248 megaco messages using opal library. I convert the payload (bytes after udp header) to PPer_Stream and give that to H248Message::Decode() method, but I dont get any meaningful output.

Here's how I use it:

PPER_Stream pstr((const BYTE *) pl, pllen);
H248_Message msg;

msg.Decode(pstr);
msg.PrintOn(cout);

Output:
{
version = 33
mId = domainName {
name = " [10.10.100.4]:2944 T=12449096{C=${A=T00100000003"
portNumber = 12338
}
messageBody = messageError {
errorCode = 12336
}
}

and payload starts like this:
"!/1 [10.10.100.4]:2944 T=12449096{C=${A=T0010000000302100005{E=12070391{......."

I also tried H248_MegacoMessage, but didnt help.

Any1 else tried decoding Megaco messages successfully?

Re: megaco decoding with opal

Posted: Tue May 22, 2012 8:52 am
by nmozilla
hi,
i have the same problem.
do you find any usefull answer to your question ?

Re: megaco decoding with opal

Posted: Tue Aug 14, 2012 2:36 am
by hunters
Hi

In default generation, all ASN object has UniversalTagClass. You must change tags and tag classes depend on the data you receive.

I'm having problem with decode CHOICE item.

example:


MId ::= CHOICE
{
ip4Address IP4Address,
ip6Address IP6Address,
domainName DomainName,
deviceName PathName,
mtpAddress OCTET STRING(SIZE(2)),
-- Addressing structure of mtpAddress:
-- 15 0
-- | PC | NI |
-- 14 bits 2 bits
...
}

IP4Address ::= SEQUENCE
{
address OCTET STRING (SIZE(4)),
portNumber INTEGER(0..65535) OPTIONAL
}

Then in the data, MID has own tag/type field, IP4Address has different tag/type field. But when decode, IP4Address gets tag/type of MID to make its own tag/type. It yields the address field in IP4Address has 10 octet string. OMG

Does anyone have the same problem?

Thanks