<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">The Megaco app is a beast and it is perhaps not the one that I would start with if I was going to learn Erlang from scratch. There are however several good books explaining Erlang. Read some of them and get hands on with their exercises. "Learn you some Erlang" is a very good on-line source.<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br>Once you are a little bit familiar with Erlang, I would recommend you to run the simple mg/mgc examples in the Megaco app. Use the Erlang debugger to follow the call flow from socket to socket.<br><br>When you got the overall picture you can inspect the transport callback modules in Megaco (TCP and UDP) to see how they are reading packets. You can either use them or roll your own. Once you have read a packet you can feed it into a suitable decoder that fit your needs. There are several decoders provided, both textual and binary.<br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Good luck!<br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr">/Håkan<br><br></div></div></div>
<br><div class="gmail_quote">On Sat, Feb 14, 2015 at 7:35 PM, 曾杰 <span dir="ltr"><<a href="mailto:zengjiestc@gmail.com" target="_blank">zengjiestc@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi <div><br></div><div>I'm new user of erlang, I want to encode & decode h248 packets captured from network. I want to use open source h248 protocol stack to complete this work. Use google, I found erlang/otp can do this, but my program experience is c++, so I have to learn erlang for this problem. In erlang's megaco document, the example is about how to implement mg/mgc, but I need not to implement mg/mgc, I only need encode & decode h248 protocol, and recover the calling procedure in human readable format.</div><div><br></div><div>My problem is: how to use erlang's lib to encode & decode h248 packets captured from network ( use tcpdump), and recover the calling procedure? Please give me some hints about this ( as simple as possible, because I have learned erlang only one day ).</div><div><br></div><div>Thank you very much!</div></div>
<br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div></div>