Erlang Mailing Lists

Author Message

<  Erlang questions mailing list  ~  Reply command

mwilligs at uninet.com.py
Posted: Thu Nov 06, 2003 7:53 pm Reply with quote
Guest
We want to send that Reply package:

MEGACO/1 ...
Transaction = 1237{
Context = 1 {
Subtract = Trunk1/line1{Audit{}}
}



So we modify the 'megaco_test_mg.erl' file in this function:

handle_megaco_request({handle_trans_request, CH, _PV, _AR}, S) ->
ED = cre_error_descr(?megaco_not_implemented, "Transaccion no
soportada"),
{{discard_ack, ED}, S#mg{conn_handle = CH}};





We modify like this:


handle_megaco_request({handle_trans_request, CH, _PV, _AR}, S) ->
%ED = cre_error_descr(?megaco_not_implemented, "Transaccion no
soportada"),

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SUBR = cre_ammsReply(?A4444),
ED = cre_commandRep({subtractReply, SUBR}),
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

{{discard_ack, [ED]}, S#mg{conn_handle = CH}};


cre_commandRep(Cmd)->
#'CommandRequest'{ command = Cmd}.

cre_ammsReply(Id)->
#'AmmsReply'{ terminationID = [#megaco_term_id{id=Id}]}.



What is wrong in my code?

Thanks in advance.


Post generated using Mail2Forum (http://m2f.sourceforge.net)
micael.karlberg at ericss
Posted: Fri Nov 07, 2003 11:01 am Reply with quote
Guest
Hi,

There is no "command reply" type. Instead, you wrap this as
follows:

handle_megaco_request({handle_trans_request, CH, _PV, AR}, S) ->
do_something_usefull_with_the_request(CH, AR),

%% Compose a reply
ContextId = 1,
AmmsReply = cre_ammsReply(?A4444),
CmdReply = [{subtractReply, AmmsReply}],
ActReplies = [cre_actionReply(ContextId, CmdReply)],
{discard_ack, ActReplies}.

You can find more message examples by looking at the
megaco_codec_test.erl file (search for e.g. 'msg25(Mid)').

/BMK

mwilligs_at_uninet.com.py writes:
> We want to send that Reply package:
>
> MEGACO/1 ...
> Transaction = 1237{
> Context = 1 {
> Subtract = Trunk1/line1{Audit{}}
> }
>
>
>
> So we modify the 'megaco_test_mg.erl' file in this function:
>
> handle_megaco_request({handle_trans_request, CH, _PV, _AR}, S) ->
> ED = cre_error_descr(?megaco_not_implemented, "Transaccion no
> soportada"),
> {{discard_ack, ED}, S#mg{conn_handle = CH}};
>
>
>
>
>
> We modify like this:
>
>
> handle_megaco_request({handle_trans_request, CH, _PV, _AR}, S) ->
> %ED = cre_error_descr(?megaco_not_implemented, "Transaccion no
> soportada"),
>
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> SUBR = cre_ammsReply(?A4444),
> ED = cre_commandRep({subtractReply, SUBR}),
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>
> {{discard_ack, [ED]}, S#mg{conn_handle = CH}};
>
>
> cre_commandRep(Cmd)->
> #'CommandRequest'{ command = Cmd}.
>
> cre_ammsReply(Id)->
> #'AmmsReply'{ terminationID = [#megaco_term_id{id=Id}]}.
>
>
>
> What is wrong in my code?
>
> Thanks in advance.

--
Micael Karlberg Ericsson AB,
yeti
Posted: Sat Sep 01, 2012 5:58 am Reply with quote
User Joined: 01 Sep 2012 Posts: 17 Location: fgf
cheap designer *beep* are the most suitable accessories for women who are fond of attending parties.There are different style in our cheap *beep* shop.cheap purses are a kind of practical products and are full of vitality.If you can choose cheap designer bags right now, we can supply all kinds of cheap bags from stock.
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum