Session hangup

From FreeSWITCH Wiki
Jump to: navigation, search

Hangs up the current channel. Do not call this method inside your hangup hook.

The hangup method can be called with a Q.931 cause code (either the string or numerical representation) that will be transmitted to the remote end.

Synopsis

hangup(cause)

Example

session.hangup("NORMAL_CLEARING");

Or,

session.hangup(16);

In a SIP session, the cause code will be mapped to its equivalent SIP response code according to RFC4497.

See also