[erlang-questions] Megaco: Disconnection of remote mg when syntax error

Micael Karlberg bmk@REDACTED
Wed Feb 20 15:13:01 CET 2008


Hi,

Try to use the Extra argument.
The transport module calls the megaco:process_received_message/5 function
to deliver a new message. The Extra argument is an opaque data structure
that is passed through to the user callback module, in this case
the handle_syntax_error/4 function. You can put info here to allow the
megaco user to identify which connection the message is related to.

Regards,
	/BMK

Maxim Treskin wrote:
> Hello
> 
> How I can disconnect remote media gateway when I receive message with 
> syntax error from it?
> In this case megaco stack calls function UserMod:handle_syntax_error/4 
> with parameters:
>   ReceiveHandle, Version, ErrorDesc, Extra
> and I cannot retrieve ConnHandler of remote MG. Digging in 
> megaco_messenger.erl did not helps me.
> 
> Thank you.
> 
> -- 
> Maxim Treskin
> 
> 




More information about the erlang-questions mailing list