about Megaco implementation

cy <>
Fri Jul 12 03:46:38 CEST 2002

I have got a project on implementing a Megaco - MGC/MG for load generation
In using the megaco protocol stack with megaco_session for C interface,
I got the following problem in implementing the start of MG:
   It always return a {error, {bad_option,host}} for 
MegacoSessionUdp_open() from the megaco_session.
Am I composing the "ipOptions" wrongly or I still missed something?

By the way, is it possible to include a simple_MG in the megaco_session 
for example.

Best regards,
CY Tang
Advanced Telesoft Ltd.

Output from megaco_session :

Eshell V5.1.1  (abort with ^G)
()1> MSTI: init -> start transport
MSTI: init -> transport started: <0.87.0>
MSUI: init -> start transport
MSUI: init -> transport started: <0.92.0>
MSUI: open -> entry with
   RequestRef:    1
   ReplyTo:       <51.99.0>
MSUI: open -> error:
   Error: {error,{bad_option,host}}

=ERROR REPORT==== 12-Jul-2002::09:15:37 ===
'Megaco_SessionFactory_impl'(<0.85.0>): SessionUser node died - 

Source code from mg

Megaco_SessionUser_startUserResponse__cb(Megaco_SessionUser oe_obj,
                     CORBA_long *ref,
                     Megaco_Status *status,
                     CORBA_Environment *oe_env) {

   V( ("received startUserResponse\n") );

     Megaco_ReceiveHandle      rh;
     MegacoSessionIp_IpOption  port[2];
     MegacoSessionIp_IpOptions ipOptions;

      V( ("setup restart\n") );

      rh.localMid = mid;

      // Setup text port for UDP
      port[0]._d      = MegacoSessionIp_Ip_host;
      port[0]._u.host = "rhlinux1";
      port[1]._d      = MegacoSessionIp_Ip_port;
      port[1]._u.port = 2944;

      ipOptions._buffer  = port;
      ipOptions._length  = 2;
      ipOptions._maximum = 2;


      /* prepare receive handle for udp text */
      rh.encodingMod    = (CORBA_char*)"megaco_pretty_text_encoder";
      rh.encodingConfig = (CORBA_char*)"";
      rh.sendMod        = (CORBA_char*)"megaco_udp";

      V( ("open UDP text (port 2944) connection\n") );

More information about the erlang-questions mailing list