| Author |
Message |
|
| mwilligs at uninet.com.py |
Posted: Thu Nov 06, 2003 7:53 pm |
|
|
|
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) |
|
|
| Back to top |
|
| micael.karlberg at ericss |
Posted: Fri Nov 07, 2003 11:01 am |
|
|
|
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, |
|
|
| Back to top |
|
| yeti |
Posted: Sat Sep 01, 2012 5:58 am |
|
|
|
User
Joined: 01 Sep 2012
Posts: 17
Location: fgf
|
|
| Back to top |
|
|
|
All times are GMT
|
|
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
|
|
|