SofSipCli

From OpenSource

Jump to: navigation, search

[edit] Description

Sofsip-cli is a simple example client (sofsip_cli) demonstrating how to use the Sofia-SIP libsofia-sip-ua library to implement a SIP VoIP/IM client.

Links:

 "darcs get http://sofia-sip.org/repos/sofsip-cli/"

[edit] Requirements for building

The following components are needed to build Sofsip-cli (last update 2006-07-20, matching the sofsip-cli-0.10.1 release):

  • Sofia-SIP 1.11.8 or newer
  • GStreamer 0.10.2 or newer
  • Gst-plugins-{base,good} packages, 0.10.x
  • Optional for better RTP support: Gst/RTP plugins from gst-plugins-farsight (latest snapshot from the darcs tree)
    http://farsight.sourceforge.net/download.html - for example
    darcs get http://projects.collabora.co.uk/darcs/farsight/gst-plugins-farsight --to-match "date 20060519000000"
  • Optional for RTCP support: JRtpLib 3.4.1 or newer

To verify that all components are found succesfully, run the sofsip-cli/src/test_media tool. It will print a list of required elements and whether they were found or not.

[edit] Documentation

Example of basic registration to network follows. You'll need a SIP account from some provider (try a web search for free SIP services).

 sh> ./sofsip_cli sip:first.surname@mysipprovider.net
 [ sofsip_cli starts ]
 UA> r
 [ registration is performed, you might get a prompt for password ]
 UA> k first.surname:mypassword
 [ you should now be succesfully logged in ]

After you are registered, you can send instant messages, and make calls as follows:

 UA> m sip:friend@otherprovider.net
 Enter message> hi there!
 [ message is sent ]

 UA> i sip:friend@otherprovider.net
 [ an outgoing call is made ]

If you can't, or don't want to, use SIP servers, you can also run multiple SIP clients, and make calls and send messages directly:

 UA> i sip:192.168.0.1
 [ call to SIP client listening on 192.168.0.1:5060 ]
 UA> i sip:192.168.0.1:40000
 [ call to SIP client listening on non-default port 40000 ]

To select a specific transport protocol, or network protocol (IPv4 or IPv6), etc, you can use SIP URI params:

 UA> ./sofsip_cli --contact="sip:*:5060;transport=tcp"
 [ sofsip_cli will always use TCP as the transport ]

If you want to explicitly define which SIP registrar to use, or to use a SIP proxy for outgoing message, use the '--proxy=SIPURI' and '--registrar=SIPURI' parameters.

If you are behind a NAT, you can use STUN (RFC3489) for NAT traversal. You'll need an address of an STUN server (try a web search for free STUN servers):

 sh> ./sofsip_cli --stun-server=stun.someprovider.com
 [ enables STUN support for signaling and media ]

See sofsip_cli(1) man page for more information.

--KaiVehmanen 05:19, 20 July 2006 (EDT)

Personal tools
MediaWiki Resources