|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mobicents.slee.util.SipUtilsImpl
public class SipUtilsImpl
| Constructor Summary | |
|---|---|
SipUtilsImpl(net.java.slee.resource.sip.SleeSipProvider sipProvider,
javax.sip.header.HeaderFactory headerFactory,
javax.sip.message.MessageFactory messageFactory,
javax.sip.address.AddressFactory addressFactory)
|
|
| Method Summary | |
|---|---|
javax.sip.message.Request |
buildAck(javax.sip.Dialog dialog,
java.lang.Object content)
Build an ACK request based on a dialog and an optional content. |
javax.sip.message.Request |
buildInvite(javax.sip.address.Address fromAddress,
javax.sip.address.Address toAddress,
byte[] content,
int cSeq)
Sends an SIP invite request from caller to callee |
javax.sip.message.Request |
buildInvite(javax.sip.address.Address fromAddress,
javax.sip.address.Address toAddress,
byte[] content,
int cSeq,
java.lang.String callId)
|
javax.sip.message.Request |
buildRequestWithAuthorizationHeader(javax.sip.ResponseEvent event,
java.lang.String password)
Build the request associated with the event again but this time include an authorization header or proxy authorization header based on the Digest Scheme presented in RFC 2069. |
javax.sip.address.SipURI |
convertAddressToSipURI(javax.sip.address.Address address)
|
javax.sip.address.Address |
convertURIToAddress(java.lang.String uri)
|
javax.sip.address.SipURI |
convertURIToSipURI(java.lang.String uri)
|
javax.sip.header.ContactHeader |
createLocalContactHeader(java.lang.String user)
Add a contact header (which is mandatory for INVITE's). |
javax.sip.header.ViaHeader |
createLocalViaHeader()
Create a ViaHeader based on the local ip of the sip stack, the port and transport based on the sip providers first listening point. |
java.lang.String |
generateTag()
Generates a tag to be used e.g. |
javax.sip.Dialog |
getDialog(javax.sip.RequestEvent event)
Returns the Dialog for a RequestEvent. |
javax.sip.Dialog |
getDialog(javax.sip.ResponseEvent event)
Returns the Dialog for a ResponseEvent. |
java.lang.String[] |
parseSipUri(java.lang.String sipURI)
Parses a String in the format "sip:user@host" and returns a String array containing user in index 0 and host in index 1. |
void |
sendCancel(javax.sip.ClientTransaction ct)
Sends a sip CANCEL request in the context of the transaction that is to be cancelled. |
void |
sendOk(javax.sip.message.Request request)
Sends a sip OK request |
void |
sendStatefulOk(javax.sip.RequestEvent event)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SipUtilsImpl(net.java.slee.resource.sip.SleeSipProvider sipProvider,
javax.sip.header.HeaderFactory headerFactory,
javax.sip.message.MessageFactory messageFactory,
javax.sip.address.AddressFactory addressFactory)
| Method Detail |
|---|
public javax.sip.Dialog getDialog(javax.sip.ResponseEvent event)
throws javax.sip.SipException
SipUtils
getDialog in interface SipUtilsjavax.sip.SipException
public javax.sip.Dialog getDialog(javax.sip.RequestEvent event)
throws javax.sip.SipException
SipUtils
getDialog in interface SipUtilsjavax.sip.SipExceptionpublic java.lang.String generateTag()
SipUtils
generateTag in interface SipUtilspublic javax.sip.address.Address convertURIToAddress(java.lang.String uri)
convertURIToAddress in interface SipUtilspublic javax.sip.address.SipURI convertURIToSipURI(java.lang.String uri)
convertURIToSipURI in interface SipUtils
public java.lang.String[] parseSipUri(java.lang.String sipURI)
throws java.net.URISyntaxException
SipUtils
parseSipUri in interface SipUtilsjava.net.URISyntaxException - If the URI is malformed
public javax.sip.address.SipURI convertAddressToSipURI(javax.sip.address.Address address)
throws java.text.ParseException
convertAddressToSipURI in interface SipUtilsjava.text.ParseException
public void sendCancel(javax.sip.ClientTransaction ct)
throws javax.sip.SipException
SipUtils
sendCancel in interface SipUtilsct - The client transaction that was used to send e.g. the initial INVITE that is to be cancelled.
javax.sip.SipException
public javax.sip.message.Request buildInvite(javax.sip.address.Address fromAddress,
javax.sip.address.Address toAddress,
byte[] content,
int cSeq)
throws java.text.ParseException,
javax.sip.InvalidArgumentException
SipUtils
buildInvite in interface SipUtilsfromAddress - The originator addresstoAddress - The destination addresscontent - The SDP content (use null if not present)cSeq - The sequence number of the INVITE
java.text.ParseException - If illegal address format
javax.sip.InvalidArgumentException - If cSeq invalid number
public javax.sip.message.Request buildInvite(javax.sip.address.Address fromAddress,
javax.sip.address.Address toAddress,
byte[] content,
int cSeq,
java.lang.String callId)
throws java.text.ParseException,
javax.sip.InvalidArgumentException
java.text.ParseException
javax.sip.InvalidArgumentException
public javax.sip.header.ContactHeader createLocalContactHeader(java.lang.String user)
throws java.text.ParseException
SipUtils
createLocalContactHeader in interface SipUtilsjava.text.ParseException
public javax.sip.header.ViaHeader createLocalViaHeader()
throws java.text.ParseException,
javax.sip.InvalidArgumentException
SipUtils
createLocalViaHeader in interface SipUtilsjava.text.ParseException
javax.sip.InvalidArgumentException
public javax.sip.message.Request buildRequestWithAuthorizationHeader(javax.sip.ResponseEvent event,
java.lang.String password)
throws javax.sip.TransactionUnavailableException
SipUtils
buildRequestWithAuthorizationHeader in interface SipUtilsevent - The event containing the 401 Unauthorized or 407 Proxy
Authentication Required response and the request that
generated this response.password - The password used to authenticate the user
javax.sip.TransactionUnavailableException
public javax.sip.message.Request buildAck(javax.sip.Dialog dialog,
java.lang.Object content)
throws javax.sip.SipException
SipUtils
buildAck in interface SipUtilsdialog - The dialog to which this ACK should be connectedcontent - The content to append to the ACK Request (use null if no content)
javax.sip.SipException
public void sendOk(javax.sip.message.Request request)
throws java.text.ParseException,
javax.sip.SipException
SipUtils
sendOk in interface SipUtilsrequest - The request to which the OK is sent
java.text.ParseException
javax.sip.SipException
public void sendStatefulOk(javax.sip.RequestEvent event)
throws java.text.ParseException,
javax.sip.SipException,
javax.sip.InvalidArgumentException
sendStatefulOk in interface SipUtilsjava.text.ParseException
javax.sip.SipException
javax.sip.InvalidArgumentException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||