megaco_test_mg and megaco_test_mgc

Miguel Willigs mwilligs@REDACTED
Thu Oct 16 21:10:42 CEST 2003


Hi there

I have a problem triyng to run these test files.
I wrote the commands as follow:
In the MGC side:

erl -sname mgc
(mgc@REDACTED)1>megaco_test_mgc:start(node(),[{deviceName,"ctrl"}],[{text,tcp}],debug).

and in the MG side:

erl -sname mg
(mg@REDACTED)1> megaco_test_mg:start(node(), {deviceName,"mg"}, text, tcp,
debug).

No problem in this point, but when I am triyng to run
megaco_test_mg:service_change/1 in the mg side, I get the following error
message:

<0.37.0>:MG: loop(initiated) -> received request to perform service change
DBG: <0.37.0>:MG: loop(initiated) -> service change result: {error,
                                                                {bad_megaco_conn_handle,
                                                                    {error,
                                                                        {megaco_tcp_connect,
                                                                            {gen_tcp_connect,
                                                                                econnrefused}}}}}

But the most common message error is in the MGC side, is the following:

*** [2003:10:16 19:18:45 4444] DBG:  <0.37.0> MGC ***
   loop -> received megaco request from <0.74.0>:
{handle_trans_request,{megaco_conn_handle,
                          [{deviceName,"ctrl"}],
                          {deviceName,"mg"}},
                      1,
                      [{'ActionRequest',
                           0,
                           asn1_NOVALUE,
                           asn1_NOVALUE,
                           [{'CommandRequest',
                                {serviceChangeReq,
                                    {'ServiceChangeRequest',
                                        [{megaco_term_id,false,["root"]}],
                                        {'ServiceChangeParm',
                                            restart,
                                            asn1_NOVALUE,
                                            asn1_NOVALUE,
                                            asn1_NOVALUE,
                                            ["901"],
                                            asn1_NOVALUE,
                                            asn1_NOVALUE,
                                            asn1_NOVALUE,
                                            asn1_NOVALUE}}},
                                asn1_NOVALUE,
                                asn1_NOVALUE}]}]}

*** [2003:10:16 19:18:45 4451] DBG:  <0.37.0> MGC ***
   loop -> send request reply:
{delay_reply,0,
             {discard_ack,[{'ActionReply',
                               0,
                               asn1_NOVALUE,
                               asn1_NOVALUE,
                               [{serviceChangeReply,
                                    {'ServiceChangeReply',
                                        [{megaco_term_id,false,["root"]}],
                                        {serviceChangeResParms,
                                            {'ServiceChangeResParm',
                                                [{deviceName,"ctrl"}],
                                                asn1_NOVALUE,
                                                asn1_NOVALUE,
                                                asn1_NOVALUE,
                                                asn1_NOVALUE}}}}]}]}}

*** [2003:10:16 19:18:45 4454] DBG:  <0.37.0> MGC ***
   loop -> await request

(mgc@REDACTED)2>
=ERROR REPORT==== 16-Oct-2003::16:18:45 ===
encode trans reply body failed:
{megaco_pretty_text_encoder,encode_message,[[],{'MegacoMessage',asn1_NOVALUE,{'Message',1,[{deviceName,[99,116,114,108]}],{transactions,[{transactionReply,{'TransactionReply',1,asn1_NOVALUE,{actionReplies,[{'ActionReply',0,asn1_NOVALUE,asn1_NOVALUE,[{serviceChangeReply,{'ServiceChangeReply',[{megaco_term_id,false,[[114,111,111,116]]}],{serviceChangeResParms,{'ServiceChangeResParm',[{deviceName,[99,116,114,108]}],asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE}}}}]}]}}}]}}}],{error,{function_clause,[{megaco_pretty_text_encoder,enc_MId,[[{deviceName,[99,116,114,108]}],[]]},{megaco_pretty_text_encoder,enc_Message,2},{megaco_pretty_text_encoder,enc_MegacoMessage,2},{megaco_pretty_text_encoder,encode_message,2},{megaco_messenger_misc,encode_body,3},{megaco_messenger,send_reply,3},{megaco_messenger,handle_request_callback,3},{megaco_messenger,handle_requests,2}|more]}}}



Could somebody tell me what's wrong?

thanks in advance,




More information about the erlang-questions mailing list