1megaco_transport(3)        Erlang Module Definition        megaco_transport(3)
2
3
4

NAME

6       megaco_transport - Megaco transport behaviour.
7

DESCRIPTION

9       The  following  functions  should  be  exported from a megaco_transport
10       callback module:
11
12         * send_message/2 [mandatory]
13
14         * send_message/3 [optional]
15
16         * resend_message/2 [optional]
17
18         *
19
20

EXPORTS

22       Module:send_message(Handle, Msg) -> ok | {cancel, Reason} | Error
23       Module:send_message(Handle, Msg, Resend) -> ok  |  {cancel,  Reason}  |
24       Error
25
26              Types:
27
28                 Handle = term()
29                 Msg = binary() | iolist()
30                 Resend = boolean()
31                 Reason = term()
32                 Error = term()
33
34              Send a megaco message.
35
36              If  the function returns {cancel, Reason}, this means the trans‐
37              port module decided not to send the  message.  This  is  not  an
38              error.  No  error  messages will be issued and no error counters
39              incremented. What actions this will result in  depends  on  what
40              kind of message was sent.
41
42              In  the case of requests, megaco will cancel the message in much
43              the same way as if megaco:cancel had been called (after  a  suc‐
44              cessfull  send).  The information will be propagated back to the
45              user differently depending on how the request(s)  where  issued:
46              For  requests  issued using megaco:call, the info will be deliv‐
47              ered in the return value. For requests issued using  megaco:cast
48              the  info  will be delivered via a call to the callback function
49              handle_trans_reply.
50
51              In the case of reply, megaco will cancel the reply and  informa‐
52              tion  of  this  will  be  returned to the user via a call to the
53              callback function handle_trans_ack.
54
55              The  function  send_message/3  will  only  be  called   if   the
56              resend_indication  config option has been set to the value flag.
57              The third argument, Resend then indicates if the message send is
58              a resend or not.
59
60       Module:resend_message(Handle, Msg) -> ok | {cancel, Reason} | Error
61
62              Types:
63
64                 Handle = term()
65                 Msg = binary() | iolist()
66                 Reason = term()
67                 Error = term()
68
69              Re-send a megaco message.
70
71              Note  that this function will only be called if the user has set
72              the resend_indication config option to trueand it is in  fact  a
73              message  resend.  If  not  both  of  these condition's are meet,
74              send_message will be called.
75
76              If the function returns {cancel, Reason}, this means the  trans‐
77              port  module  decided  not  to  send the message. This is not an
78              error. No error messages will be issued and  no  error  counters
79              incremented.  What  actions  this will result in depends on what
80              kind of message was sent.
81
82              In the case of requests, megaco will cancel the message in  much
83              the  same  way as if megaco:cancel had been called (after a suc‐
84              cessfull send). The information will be propagated back  to  the
85              user  differently  depending on how the request(s) where issued:
86              For requests issued using megaco:call, the info will  be  deliv‐
87              ered  in the return value. For requests issued using megaco:cast
88              the info will be delivered via a call to the  callback  function
89              handle_trans_reply.
90
91              In  the case of reply, megaco will cancel the reply and informa‐
92              tion of this will be returned to the user  via  a  call  to  the
93              callback function handle_trans_ack.
94
95
96
97Ericsson AB                      megaco 3.18.4             megaco_transport(3)
Impressum