cljain.sip.core documentation

*sip-provider*

Before call any function expect 'sip-provider!' in the cljain.sip.core namespace,
please binding *sip-provider* with the current provider object first.

already-bound-provider?

(already-bound-provider?)
Check whether the *sip-provider* has been bound in current thread.

dialog?

(dialog? object)
Check the obj is an instance of javax.sip.Dialog

gen-call-id-header

(gen-call-id-header)
Generate a new Call-ID header use current bound provider.

global-bind-sip-provider!

(global-bind-sip-provider! provider)
Bind the sip-provider in global scope.

global-unbind-sip-provider!

(global-unbind-sip-provider!)
Unbind the sip-provider in global scope.

listening-point

(listening-point)(listening-point transport)
Get the current bound listening ip, port and transport information.

new-client-transcation!

(new-client-transcation! request)
Before an application can send a new request it must first request
a new client transaction to handle that Request.

new-dialog!

(new-dialog! transaction)
Create a dialog for the given transaction.

new-server-transaction!

(new-server-transaction! request)
An application has the responsibility of deciding to respond to a Request
that does not match an existing server transaction.

provider-can-be-found?

(provider-can-be-found?)
Check where the *sip-provider* has been bound or global sip-provider has been set.

send-request!

(send-request! request)
Send out of dialog SipRequest use current bound provider.

set-listener!

(set-listener! {:keys [request response timeout io-exception transaction-terminated dialog-terminated]})
Set several event listening function to current bound provider.
Because JAIN-SIP just allow set listener once, if call 'set-listener' more then one times,
an exception will be thrown.

sip-factory

The instance of JAIN-SIP SipFactory.

sip-provider

(sip-provider)
Get the current bound *sip-provider* or global-sip-provider.

sip-provider!

(sip-provider! name ip port transport & properties)
Create a new SipProvider with meaningful name, local ip, port, transport and other optional SipStack properties.
Rember, the name must be unique to make a distinction between other provider.
To set standard SipStack properties, use the property's lowcase short name as keyword.
If want to set the nist define property, let property keys lead with 'nist'.

(sip-provider! "cool-phone" "192.168.1.2" 5060 "UDP" :outbound-proxy "192.168.1.128")

More SipStack properties document can be found here:
http://hudson.jboss.org/hudson/job/jain-sip/lastSuccessfulBuild/artifact/javadoc/index.html
and
http://hudson.jboss.org/hudson/job/jain-sip/lastSuccessfulBuild/artifact/javadoc/index.html

sip-stack

(sip-stack)
Get the SipStack object from a SipProvider object.

stack-name

(stack-name)
Get the SipStack name from a SipProvider object.

start!

(start!)
Start to run the stack which bound with current bound provider.

stop-and-release!

(stop-and-release!)
Stop the stack wich bound with current bound provider. And release all resource associated the stack.
Becareful, after called 'stop!' function, all other function include 'start!' will be invalid.
A new provider need be generated for later call.

transaction?

(transaction? object)
Check the obj is an instance of javax.sip.Transaction.
Both ClientTransaction and ServerTransaction are pass.