1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
|
.TH megaco_transport 3 "megaco 3.8" "Ericsson AB" "ERLANG MODULE DEFINITION"
.SH MODULE
megaco_transport \- Megaco transport begaviour\&.
.SH DESCRIPTION
.LP
The following functions should be exported from a \fImegaco_transport\fR callback module:
.RS 2
.TP 2
*
send_message/2 [\fImandatory\fR]
.TP 2
*
send_message/3 [\fIoptional\fR]
.TP 2
*
resend_message/2 [\fIoptional\fR]
.TP 2
*
.RE
.SH EXPORTS
.LP
.B
Module:send_message(Handle, Msg) -> ok | {cancel, Reason} | Error
.br
.B
Module:send_message(Handle, Msg, Resend) -> ok | {cancel, Reason} | Error
.br
.RS
.TP
Types
Handle = term()
.br
Msg = binary() | iolist()
.br
Resend = boolean()
.br
Reason = term()
.br
Error = term()
.br
.RE
.RS
.LP
Send a megaco message\&.
.LP
If the function returns \fI{cancel, Reason}\fR, this means the transport module decided not to send the message\&. This is \fInot\fR an error\&. No error messages will be issued and no error counters incremented\&. What actions this will result in depends on what kind of message was sent\&.
.LP
In the case of requests, megaco will cancel the message in much the same way as if \fImegaco:cancel\fR had been called (after a successfull send)\&. The information will be propagated back to the user differently dependning on how the request(s) where issued: For requests issued using megaco:call, the info will be delivered in the return value\&. For requests issued using \fImegaco:cast\fR the info will be delivered via a call to the callback function handle_trans_reply\&.
.LP
In the case of reply, megaco will cancel the reply and information of this will be returned to the user via a call to the callback function handle_trans_ack\&.
.LP
The function \fIsend_message/3\fR will only be called if the resend_indication config option has been set to the value \fIflag\fR\&. The third argument, \fIResend\fR then indicates if the message send is a resend or not\&.
.RE
.LP
.B
Module:resend_message(Handle, Msg) -> ok | {cancel, Reason} | Error
.br
.RS
.TP
Types
Handle = term()
.br
Msg = binary() | iolist()
.br
Reason = term()
.br
Error = term()
.br
.RE
.RS
.LP
Re-send a megaco message\&.
.LP
Note that this function will only be called if the user has set the resend_indication config option to \fItrue\fR\fIand\fR it is infact a message resend\&. If not \fIboth\fR of these condition\&'s are meet, \fIsend_message\fR will be called\&.
.LP
If the function returns \fI{cancel, Reason}\fR, this means the transport module decided not to send the message\&. This is \fInot\fR an error\&. No error messages will be issued and no error counters incremented\&. What actions this will result in depends on what kind of message was sent\&.
.LP
In the case of requests, megaco will cancel the message in much the same way as if \fImegaco:cancel\fR had been called (after a successfull send)\&. The information will be propagated back to the user differently dependning on how the request(s) where issued: For requests issued using megaco:call, the info will be delivered in the return value\&. For requests issued using \fImegaco:cast\fR the info will be delivered via a call to the callback function handle_trans_reply\&.
.LP
In the case of reply, megaco will cancel the reply and information of this will be returned to the user via a call to the callback function handle_trans_ack\&.
.RE
|