Module echo_esme

Sample echo ESME.

Copyright © 2004 Enrique Marcote Peña

Version: 1.1, {23 Jun 2004} 11:26:50.

Behaviour: gen_esme.

Authors: Enrique Marcote Peña ( [web site:].


Sample echo ESME.

This ESME echoes SMs back to the caller.

Function Index

code_change/3 gen_esme - code_change/2 callback implementation.
handle_alert_notification/3gen_esme - handle_alert_notification/3 callback implementation.
handle_call/3gen_esme - handle_call/3 callback implementation.
handle_cast/2 gen_esme - handle_cast/2 callback implementation.
handle_info/2 gen_esme - handle_info/2 callback implementation.
handle_listen_error/1gen_esme - handle_listen_error/1 callback implementation.
handle_operation/3gen_esme - handle_operation/3 callback implementation.
handle_outbind/3gen_esme - handle_outbind/3 callback implementation.
handle_unbind/3gen_esme - handle_unbind/3 callback implementation.
init/1 gen_esme - init/1 callback implementation.
start_link/0Starts the ESME server.
stop/0Stops the ESME server.
terminate/2 gen_esme - terminate/2 callback implementation.

Function Details


code_change(OldVsn, State, Extra) -> {ok, NewState}

gen_esme - code_change/2 callback implementation.

Convert process state when code is changed.


handle_alert_notification(X1::AlertNotification, From, State) -> Result

gen_esme - handle_alert_notification/3 callback implementation.

Handle alert_notification requests from the peer SMSC.


handle_call(X1::Request, From, State) -> Result

gen_esme - handle_call/3 callback implementation.

Handling call messages.

See also: terminate/2.


handle_cast(Request, State) -> Result

gen_esme - handle_cast/2 callback implementation.

Handling cast messages.

See also: terminate/2.


handle_info(Info, S::State) -> Result

gen_esme - handle_info/2 callback implementation.

Handling all non call/cast messages.

See also: terminate/2.


handle_listen_error(State) -> Result

gen_esme - handle_listen_error/1 callback implementation.

Handle listen failures.


handle_operation(X1::Operation, From, S::State) -> Result

gen_esme - handle_operation/3 callback implementation.

Handle deliver_sm and data_sm operations (from the peer SMSCs) to the callback ESME.

The ParamList included in the response is used to construct the response PDU. If a command_status other than ESME_ROK is to be returned by the ESME in the response PDU, the callback should return the term {error, Error, ParamList}, where Error is the desired command_status error code.


handle_outbind(X1::Outbind, From, State) -> Result

gen_esme - handle_outbind/3 callback implementation.

Handle oubind requests from the peer SMSC.


handle_unbind(X1::Unbind, From, S::State) -> Result

gen_esme - handle_unbind/3 callback implementation.

Handle unbind requests from the peer SMSC.

If ok returned an unbind_resp with a ESME_ROK command_status is sent to the MC and the session moves into the unbound state. When {error, Error} is returned by the ESME, the response PDU sent by the session to the MC will have an Error command_status and the session will remain on it's current bound state (bound_rx, bound_tx or bound_trx).


init(X1::Args) -> Result

gen_esme - init/1 callback implementation.

Initiates the server.


start_link() -> Result

Starts the ESME server.

See also: gen_esme, start/0.


stop() -> ok

Equivalent to gen_esme:call(SERVER, die, 10000).

Stops the ESME server.

See also: handle_call/3.


terminate(Reason, S::State) -> ok

gen_esme - terminate/2 callback implementation.

Shutdown the ESME server.

Return value is ignored by gen_esme.