#include <AmSession.h>
Inheritance diagram for AmSession:

Public Member Functions | |
| AmSession () | |
| void | process (AmEvent *) |
| void | addHandler (AmSessionEventHandler *) |
| void | setCallgroup (const string &cg) |
| string | getCallgroup () |
| int | acceptAudio (const string &body, const string &hdrs="", string *sdp_reply=0) |
| void | lockAudio () |
| void | unlockAudio () |
| AmAudio * | getInput () |
| AmAudio * | getOutput () |
| void | setInput (AmAudio *in) |
| void | setOutput (AmAudio *out) |
| void | setInOut (AmAudio *in, AmAudio *out) |
| void | clearAudio () |
| void | setMute (bool mute) |
| const string & | getCallID () const |
| const string & | getRemoteTag () const |
| const string & | getLocalTag () const |
| void | setLocalTag (const string &tag) |
| const SdpPayload * | getPayload () |
| int | getRPort () |
| void | setNegotiateOnReply (bool n) |
| virtual void | negotiate (const string &sdp_body, bool force_symmetric_rtp, string *sdp_reply) |
| void | sendUpdate () |
| void | sendReinvite () |
| void | sendInvite () |
| void | destroy () |
| void | setStopped () |
| bool | getStopped () |
| bool | getDetached () |
| void | postDtmfEvent (AmDtmfEvent *) |
| void | processDtmfEvents () |
| bool | isDtmfDetectionEnabled () |
| void | setDtmfDetectionEnabled (bool e) |
| void | putDtmfAudio (const unsigned char *buf, int size, int user_ts) |
| virtual void | onDtmf (int event, int duration) |
| virtual void | onStart () |
| virtual void | onInvite (const AmSipRequest &req) |
| virtual void | onCancel () |
| virtual void | onSessionStart (const AmSipRequest &req) |
| virtual void | onSessionStart (const AmSipReply &reply) |
| virtual void | onBye (const AmSipRequest &req) |
| virtual void | onSipEvent (AmSipEvent *sip_ev) |
| virtual void | onSipRequest (const AmSipRequest &req) |
| virtual void | onSipReply (const AmSipReply &reply) |
| virtual void | onRtpTimeout () |
| virtual void | onSendRequest (const string &method, const string &content_type, const string &body, string &hdrs) |
| virtual void | onSendReply (const AmSipRequest &req, unsigned int code, const string &reason, const string &content_type, const string &body, string &hdrs) |
Static Public Member Functions | |
| static string | getNewId () |
Data Fields | |
| AmSipDialog | dlg |
Protected Attributes | |
| AmSdp | sdp |
| AmRtpAudio | rtp_str |
Friends | |
| class | AmMediaProcessor |
| class | AmMediaProcessorThread |
| class | AmSessionContainer |
| class | AmSessionFactory |
Data Structures | |
| struct | Exception |
| Exception occured in a Session. More... | |
The session is identified by Call-ID, From-Tag and To-Tag.
| AmSession::AmSession | ( | ) |
Session constructor.
| int AmSession::acceptAudio | ( | const string & | body, | |
| const string & | hdrs = "", |
|||
| string * | sdp_reply = 0 | |||
| ) |
Accept the SDP proposal thus setting up audio stream
| void AmSession::clearAudio | ( | ) |
Clears input & ouput (no need to lock)
| void AmSession::destroy | ( | ) |
Destroy the session. It causes the session to be erased from the active session list and added to the dead session list.
| const string & AmSession::getCallID | ( | ) | const |
Gets the Session's call ID
| AmAudio* AmSession::getInput | ( | ) | [inline] |
Audio input & output get methods. Note: audio must be locked.
| const string & AmSession::getLocalTag | ( | ) | const |
Gets the Session's local tag
| string AmSession::getNewId | ( | ) | [static] |
Creates a new Id which can be used within sessions.
| const SdpPayload * AmSession::getPayload | ( | ) |
Gets the current RTP payload
| const string & AmSession::getRemoteTag | ( | ) | const |
Gets the Session's remote tag
| int AmSession::getRPort | ( | ) |
Gets the port number of the remote part of the session
| bool AmSession::getStopped | ( | ) | [inline] |
Has the session already been stopped ?
| void AmSession::lockAudio | ( | ) |
Lock and unlock audio input & output (inclusive RTP stream)
| void AmSession::negotiate | ( | const string & | sdp_body, | |
| bool | force_symmetric_rtp, | |||
| string * | sdp_reply | |||
| ) | [virtual] |
handle SDP negotiation: only for INVITEs & re-INVITEs
| void AmSession::onBye | ( | const AmSipRequest & | req | ) | [virtual] |
| virtual void AmSession::onCancel | ( | ) | [inline, virtual] |
onCancel will be called if a CANCEL for a running dialog has been received. At this point, the CANCEL transaction has been replied with 200.
A normal plug-in does not have to do anything special, as normal dialogs are immediatly replied with 200 or error code.
Note: You are still responsible for responding the initial transaction.
| void AmSession::onDtmf | ( | int | event, | |
| int | duration | |||
| ) | [virtual] |
event handler for apps to use
| void AmSession::onInvite | ( | const AmSipRequest & | req | ) | [virtual] |
onInvite will be called if an INVITE or re-INVITE has been received for the session.
| void AmSession::onRtpTimeout | ( | ) | [virtual] |
This callback is called if RTP timeout encountered
| virtual void AmSession::onSessionStart | ( | const AmSipReply & | reply | ) | [inline, virtual] |
onSessionStart method for calls originating from SEMS.
Throw AmSession::Exception if you want to signal any error.
Warning: Sems will NOT send any BYE on his own.
| virtual void AmSession::onSessionStart | ( | const AmSipRequest & | req | ) | [inline, virtual] |
onSessionStart will be called after call setup.
Throw AmSession::Exception if you want to signal any error.
Warning: Sems will NOT send any BYE on his own.
Reimplemented in AmB2BCallerSession.
| void AmSession::onSipEvent | ( | AmSipEvent * | sip_ev | ) | [virtual] |
Entry point for SIP events
| virtual void AmSession::onStart | ( | ) | [inline, virtual] |
onStart will be called before everything else.
| void AmSession::postDtmfEvent | ( | AmDtmfEvent * | ) |
Entry point for DTMF events
| void AmSession::process | ( | AmEvent * | ) | [virtual] |
| void AmSession::setCallgroup | ( | const string & | cg | ) |
Set the call group for this call.
Note: this must be set before inserting the session to the scheduler!
| void AmSession::setInput | ( | AmAudio * | in | ) |
Audio input & output set methods. Note: audio will be locked by the methods.
| void AmSession::setMute | ( | bool | mute | ) | [inline] |
setter for rtp_str->mute
| void AmSession::setNegotiateOnReply | ( | bool | n | ) | [inline] |
Set whether on positive reply session should be negotiated
| void AmSession::setStopped | ( | ) | [inline] |
Signals the session it should stop. This will cause the session to be able to exit the main loop.
1.4.7