megaco decoding with opal

Discussion related to implementation and use of the H.323 Plus H.323 stack at http://www.h323plus.org.
Post Reply
legyndir
Posts: 1
Joined: Wed Apr 11, 2012 9:06 am

megaco decoding with opal

Post 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?

nmozilla
Posts: 1
Joined: Tue May 22, 2012 8:48 am

Re: megaco decoding with opal

Post by nmozilla »

hi,
i have the same problem.
do you find any usefull answer to your question ?

hunters
Posts: 1
Joined: Tue Aug 14, 2012 2:27 am
Contact:

Re: megaco decoding with opal

Post 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

Post Reply