org.lastbamboo.common.sip.client
Interface SipClient

All Superinterfaces:
org.lastbamboo.common.offer.answer.Offerer
All Known Implementing Classes:
SipClientImpl

public interface SipClient
extends org.lastbamboo.common.offer.answer.Offerer

Interface for an individual SIP client connected to an individual SIP proxy.


Method Summary
 void connect()
          Connects to the proxy server.
 URI getContactUri()
          Accessor the contact URI for the client.
 org.apache.commons.id.uuid.UUID getInstanceId()
          Accessor for the unique instance ID for this client.
 URI getProxyUri()
          Accessor for the URI of the SIP proxy the client is connected to and registered with.
 URI getSipUri()
          Accessor for the SIP URI for this client.
 void register()
          Registers the SIP client.
 void writeCrlfKeepAlive()
          Sends a CRLF keep-alive message, as specified in the SIP outbound draft at: http://www.ietf.org/internet-drafts/draft-ietf-sip-outbound-08.txt
 void writeInviteOk(org.lastbamboo.common.sip.stack.message.Invite invite, org.littleshoot.mina.common.ByteBuffer body)
          Sends an INVITE OK message.
 void writeInviteRejected(org.lastbamboo.common.sip.stack.message.Invite invite, int responseCode, String reasonPhrase)
          Writes an INVITE rejected response.
 
Methods inherited from interface org.lastbamboo.common.offer.answer.Offerer
offer
 

Method Detail

getInstanceId

org.apache.commons.id.uuid.UUID getInstanceId()
Accessor for the unique instance ID for this client.

Returns:
The instance ID for this client.

getContactUri

URI getContactUri()
Accessor the contact URI for the client.

Returns:
The contact URI for the client.

getSipUri

URI getSipUri()
Accessor for the SIP URI for this client.

Returns:
The SIP URI for this client.

getProxyUri

URI getProxyUri()
Accessor for the URI of the SIP proxy the client is connected to and registered with.

Returns:
The URI of the SIP proxy the client is connected to and registered with.

writeCrlfKeepAlive

void writeCrlfKeepAlive()
Sends a CRLF keep-alive message, as specified in the SIP outbound draft at: http://www.ietf.org/internet-drafts/draft-ietf-sip-outbound-08.txt


writeInviteOk

void writeInviteOk(org.lastbamboo.common.sip.stack.message.Invite invite,
                   org.littleshoot.mina.common.ByteBuffer body)
Sends an INVITE OK message.

Parameters:
invite - The INVITE we're responding to.
body - The body of the INVITE OK.

writeInviteRejected

void writeInviteRejected(org.lastbamboo.common.sip.stack.message.Invite invite,
                         int responseCode,
                         String reasonPhrase)
Writes an INVITE rejected response.

Parameters:
invite - The invite.
responseCode - The response code.
reasonPhrase - The reason phrase for the error.

register

void register()
              throws IOException
Registers the SIP client.

Throws:
IOException - If we do not get a successful registration response.

connect

void connect()
             throws IOException
Connects to the proxy server.

Throws:
IOException - If we cannot connect.


Copyright © 2013 LittleShoot. All Rights Reserved.