Project

General

Profile

Sip message » History » Version 13

Adrian Georgescu, 01/24/2010 03:38 PM

1 13 Adrian Georgescu
== sip-message ==
2
3 7 Adrian Georgescu
[[TOC(SipTesting*, sip_*, depth=2)]]
4 2 Adrian Georgescu
5 5 Adrian Georgescu
=== Description ===
6 3 Adrian Georgescu
7 12 Adrian Georgescu
> This script is available in ''sipclients'' package that must be installed separately from SIP SIMPLe client SDK package.
8 3 Adrian Georgescu
9 1 Adrian Georgescu
{{{
10 12 Adrian Georgescu
Usage: sip-message [options] [user@domain]
11 1 Adrian Georgescu
12
This will either sit idle waiting for an incoming MESSAGE request, or send a
13
MESSAGE request to the specified SIP target. In outgoing mode the program will
14
read the contents of the messages to be sent from standard input, Ctrl+D
15
signalling EOF as usual. In listen mode the program will quit when Ctrl+D is
16
pressed.
17
18
Options:
19
  -h, --help            show this help message and exit
20 9 Adrian Georgescu
  -a NAME, --account=NAME
21
                        The account name to use for any outgoing traffic. If
22
                        not supplied, the default account will be used.
23 11 Adrian Georgescu
  -c FILE, --config-file=FILE
24 9 Adrian Georgescu
                        The path to a configuration file to use. This
25 1 Adrian Georgescu
                        overrides the default location of the configuration
26
                        file.
27 11 Adrian Georgescu
  -s, --trace-sip       Dump the raw contents of incoming and outgoing SIP
28
                        messages.
29
  -j, --trace-pjsip     Print PJSIP logging output.
30
  -n, --trace-notifications
31
                        Print all notifications (disabled by default).
32
  -b, --batch           Run the program in batch mode: reading control input
33
                        from the console is disabled. This is particularly
34
                        useful when running this script in a non-interactive
35
                        environment.
36 9 Adrian Georgescu
  -m MESSAGE, --message=MESSAGE
37 1 Adrian Georgescu
                        Contents of the message to send. This disables reading
38
                        the message from standard input.
39 11 Adrian Georgescu
40 9 Adrian Georgescu
41 1 Adrian Georgescu
}}}
42
43
44 5 Adrian Georgescu
=== Example for receiving a message ===
45 1 Adrian Georgescu
46
47
{{{
48 12 Adrian Georgescu
adigeo@ag-imac3:~$sip-message 
49 1 Adrian Georgescu
Accounts available: 'alice', 'ew', 'mrg', 'pbx', 'tf', 'umts', 'unet', default
50
Using default account: 31208005169@ag-projects.com
51
Registering ""Adrian G." <sip:31208005169@ag-projects.com>" at 81.23.228.150:5060
52
REGISTER was successful
53
Contact: <sip:4f855cb09b@192.168.1.6:51408> (expires in 300 seconds)
54
Other registered contacts:
55
<sip:31208005169@192.168.1.122:5062;line=634g6j67> (expires in 480 seconds)
56
<sip:5dac4295e9@192.168.1.6:51375> (expires in 95 seconds)
57
<sip:31208005169@192.168.1.123:5060> (expires in 77 seconds)
58
<sip:31208005169@192.168.1.1;uniq=5B2860C44383A3D6705629A7E1FB8> (expires in 1563 seconds)
59
<sip:31208005169@80.101.96.20:61578> (expires in 3069 seconds)
60
Press Ctrl+D to stop the program.
61
Received MESSAGE from ""Adi UMTS" <sip:adi@umts.ro>", Content-Type: text/plain
62
dsgsgddsgs
63
Received MESSAGE from ""Adi UMTS" <sip:adi@umts.ro>", Content-Type: text/plain
64
Testing short text messages in page mode!
65
}}}
66
67
=== Example for sending a message ===
68
69
{{{
70 12 Adrian Georgescu
adigeo@ag-imac3:~$sip-message  -a umts ag@ag-projects.com
71 1 Adrian Georgescu
Accounts available: 'alice', 'ew', 'mrg', 'pbx', 'tf', 'umts', 'unet', default
72
Using account 'umts': adi@umts.ro
73
Press Ctrl+D on an empty line to end input and send the MESSAGE request.
74
dsgsgddsgs
75
Sending MESSAGE from ""Adi UMTS" <sip:adi@umts.ro>" to "<sip:ag@ag-projects.com>" using proxy 81.23.228.150:5060
76
MESSAGE was accepted by remote party.
77
adigeo@ag-imac3:~$sip_message  -a umts ag@ag-projects.com
78
Accounts available: 'alice', 'ew', 'mrg', 'pbx', 'tf', 'umts', 'unet', default
79
Using account 'umts': adi@umts.ro
80
Press Ctrl+D on an empty line to end input and send the MESSAGE request.
81
Testing short text messages in page mode!
82
Sending MESSAGE from ""Adi UMTS" <sip:adi@umts.ro>" to "<sip:ag@ag-projects.com>" using proxy 81.23.228.150:5060
83
MESSAGE was accepted by remote party.
84
}}}