about Megaco implementation
Micael Karlberg
micael.karlberg@REDACTED
Fri Jul 12 11:13:50 CEST 2002
cy wrote:
> 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?
You should not supply the host address (as part of IpOptions)
in the call to open. Also, the portnumber should propably be
zero (0).
>
> By the way, is it possible to include a simple_MG in the megaco_session
> for example.
We had originally planned to do so, but we ran out of time.
It's still on my todo-list.
Regards,
/BMK
>
> Best regards,
> CY Tang
> Advanced Telesoft Ltd.
> (852)-2634-0246
>
>
> Output from megaco_session :
>
> Eshell V5.1.1 (abort with ^G)
> (megaco_session@REDACTED)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>
> ReceiveHandle:
> {'Megaco_ReceiveHandle',{'MegacoMessage_MIdUnion','MIdChoice_deviceName',[109,121,95,109,103]},[109,101,103,97,99,111,95,112,114,101,116,116,121,95,116,101,120,116,95,101,110,99,111,100,101,114],[],[109,101,103,97,99,111,95,117,100,112]}
>
> Options:
> [{'MegacoSessionIp_IpOption','Ip_host',[114,104,108,105,110,117,120,49]},{'MegacoSessionIp_IpOption','Ip_port',2944}]
>
> 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 - mg@REDACTED
>
>
>
>
> Source code from mg
>
> Megaco_SessionUser_startUserResponse__rs*
> Megaco_SessionUser_startUserResponse__cb(Megaco_SessionUser oe_obj,
> CORBA_long *ref,
> Megaco_Status *status,
> CORBA_Environment *oe_env) {
>
> V( ("received startUserResponse\n") );
> ASSERT_OK(status);
>
> 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_udp(&dummy);
>
> /* 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") );
> MegacoSessionUdp_open(NULL,
> *ref,
> &session_user_pid,
> &rh,
> &ipOptions,
> send_env);
> ASSERT_SEND();
> }
>
More information about the erlang-questions
mailing list