Brekeke SIP Server Wiki

2. Event Methods

Event methods are called at the beginning of a session, when talking starts, when talking stops, and at the end of a session.

Please use these methods if necessary.

 


1. eventSessionStart
public int eventSessionStart( EventStat evstat, String[] argprm )

An event method which is called at the beginning of a session,
i.e. when Brekeke SIP Server receives INVITE.

argprm includes parameters which are specified in the Dial Plan.

 

Parameters:

EventStat evstat – Status
String[] argprm – Parameters

 

Return:
The value 0 to accept this session
Error code (A response code which is greater than or equal to 400) to reject this session

If an error code is returned, the response packet is sent to the caller and the session will not start.


2. eventTalkStart
public void eventTalkStart( EventStat evstat )

An event method which is called when talking starts,

i.e. when Brekeke SIP Server receives 2xx response.

 

Parameters:

EventStat evstat – Status


3. eventTalkEnd
public void eventTalkEnd( EventStat evstat )

An event method which is called when talking ends,
i.e. when Brekeke SIP Server receives BYE.

 

Parameters:

EventStat evstat – Status


4. eventSessionEnd
public void eventSessionEnd( EventStat evstat )

An event method which is called at the end of a session,
i.e. when Brekeke SIP Server receives 2xx response for BYE after talking or when releasing all related resources such as RTP after receiving an error response for INVITE.


5. eventTimerup
public void eventTimerup( EventStat evstat, long id )

An event method which is called at a scheduled time.
A Timer can be set using setSchedule().

 

Parameters:

EventStat evstat – Status
long id – timer ID

 

 

Yes No
Suggest Edit