Project

General

Profile

Sip session » History » Version 5

Adrian Georgescu, 03/30/2009 11:35 AM

1 2 Adrian Georgescu
== sip_session ==
2 1 Adrian Georgescu
3 2 Adrian Georgescu
[[TOC(SipTesting*, sip_*, depth=2)]]
4
5
To use this script you must to have a valid [wiki:SipSettingsAPI configuration].
6 1 Adrian Georgescu
7 4 Adrian Georgescu
=== Description ===
8 5 Adrian Georgescu
9
This script can be used to establish SIP sessions with more than one media type. One can add and remove RTP audio and MSRP chat to the same SIP session. The defaul behaviour is to establish outgoing session with both audio and chat media.
10
11 1 Adrian Georgescu
{{{
12
Usage: sip_session [options] [target-user@target-domain.com]
13
14
This script will either sit idle waiting for an incoming MSRP session, or
15
start a MSRP session with the specified target SIP address. The program will
16
close the session and quit when CTRL+D is pressed.
17
18
Options:
19
  -h, --help            show this help message and exit
20
  -a ACCOUNT_ID, --account-id=ACCOUNT_ID
21 3 Adrian Georgescu
  -c [FILE], --config_file=[FILE]
22
                        The path to a configuration file to use. This
23
                        overrides the default location of the configuration
24
                        file.
25
  -S, --disable-sound   Disables initializing the sound card.
26 1 Adrian Georgescu
  -s, --trace-sip       Dump the raw contents of incoming and outgoing SIP
27
                        messages.
28
  -j, --trace-pjsip     Print PJSIP logging output.
29
  --trace-engine        Print core's events.
30 3 Adrian Georgescu
  -m, --trace-msrp      Log the raw contents of incoming and outgoing MSRP
31
                        messages.
32
  --no-relay            Don't use the MSRP relay.
33
  --msrp-tcp            Use TCP for MSRP connections.
34 4 Adrian Georgescu
}}}
35
36
37
=== Example ===
38
39
{{{
40
adigeo@ag-imac3:~$sip_session   
41
Using account 31208005169@ag-projects.com
42
Press Ctrl-d to quit or Control-n to switch between active sessions
43
Waiting for incoming SIP session requests...
44
Registering "Adrian G." <sip:31208005169@ag-projects.com> at 81.23.228.150:5060
45
Registered SIP contact address: sip:hctoyfvx@192.168.1.6:61277 (expires in 600 seconds)
46
Incoming Audio request from "Adrian G." <sip:31208005169@ag-projects.com>, do you accept? (y/n) y
47
Connecting SIP session to "Adrian G." <sip:31208005169@ag-projects.com>
48
Session established, using "speex" codec at 32000Hz
49
Audio RTP endpoints 192.168.1.6:50018 <-> 81.23.228.150:58260
50
Remote SIP User Agent is "sip2sip-0.9.0-pjsip-1.0.2-trunk-r2553"
51
Detected NAT type: Port Restricted
52
Audio to Adrian G. (31208005169@ag-projects.com): 
53
54 1 Adrian Georgescu
}}}