Skip to content

Commit

Permalink
modified README
Browse files Browse the repository at this point in the history
  • Loading branch information
tmakkonen committed Aug 29, 2012
1 parent d04121e commit 4029001
Show file tree
Hide file tree
Showing 2 changed files with 158 additions and 36 deletions.
122 changes: 86 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,54 @@
testphone
=========
<html>
<head>
<meta name="title" content="sipcmd - the command line sip/h323 softphone">
<title>sipcmd - the command line SIP and H.323 softphone</title>

<!-- i has ccs! -->
<style>
pre { border-style: solid;
border-width: 1px 1px 1px 1px;
border-color: #CCCCCC;
background-color: #FFFFF0;
padding: 6px 0px 5px 10px;
}
</style>

### Introduction
<head>
<body>

Command line soft phone that makes phone calls, accepts calls,
enters DTMF digits, plays back WAV files and records them.
<h2>sipcmd - the command line SIP/H.323/RTP softphone</h2>

Not quite yet, though. WIP
<h3>Introduction</h3>
<p>
Command line soft phone that makes phone calls, accepts calls, enters DTMF digits, plays back WAV files and records them. A useful testing tool for VoIP systems. Runs on Linux.
</p>

### Run
<h3> NEWS </h3>
Upgraded to latest versions of ptlib and opal avaliable on apt repos on Ubuntu 12.04. (3.10.2 and 2.10.2, respectively).

testphone options:
<h3> HOWTO </h3>
<h4>### Dependencies</h4>
<p>
Apt-get install opal-dev and ptlib-dev packages.

<h4>### Download</h4>
<p>
Get source tarball from GitHub.
</p>

<h4>### Compile</h4>
<p>
<code> make </code>
</p>

<h4>### Environment</h4>
<p>
If you compile the dependencies from source, make sure that libpt and libopal are in your <code>LD_LIBRARY_PATH</code>. The default installation location is <code>/usr/local/lib</code>.
</p>

<h4>### Run</h4>
<b>testphone options:</b>
<pre>
-u <name> --user <name> username (required)
-a <name> --alias <name> username alias
-l <addr> --localaddress <addr> local address to listen on
Expand All @@ -22,19 +59,22 @@ testphone options:
-f <file> --file <file> the name of played sound file
-g <addr> --gatekeeper <addr> gatekeeper to use
-w <addr> --gateway <addr> gateway to use
</pre>
<p>
<code>-l</code> or <code>-p</code> without <code>-x</code> assumes answer mode. Additional <code>-r</code> forces caller id checking. <code>-r</code> without <code>-l</code>, <code>-p</code> or <code>-x</code> assumes call mode.
</p>

-l or -p without -x assumes answer mode. Additional -r forces
caller id checking. -r without -l, -p or -x assumes call mode.
<br>
<b>WAV file requirements:</b>
<ul>
<li>mono
<li> 8 kHz sampling rate
<li> 16 bits sample size
</ul>

WAV file requirements:
* format PCM
* mono
* 8 kHz sampling rate
* 16 bits sample size


The EBNF definition of the program syntax:
<prog> := cmd ';' <prog> |
<b>The EBNF definition of the program syntax:</b>
<pre>
prog := cmd ';' <prog> |
cmd := call | answer | hangup
| dtmf | voice | record | wait
| setlabel | loop
Expand All @@ -52,21 +92,31 @@ activity:= 'a'
wait := 'w' [ activity | silence ] [ closed ] millis
setlabel:= 'l' label
loop := 'j' [ how-many-times ] [ 'l' label ]
</pre>
<b>Example:</b><br><br>
<code>
"l4;c333;ws3000;d123;w200;lthrice;ws1000;vaudio;rsi4000f.out;j3lthrice;h;j4"
</code>
<br><br>
Parses to the following:
<ol>
<li> do this four times:
<ol>
<li> call to 333
<li> wait until silent (max 3000 ms)
<li> send dtmf digits 123
<li> wait 200 ms
<li> do this three times:
<ol>
<li> wait until silent (max 1000 ms)
<li> send sound file 'audio'
<li> record until silent (max 4000 ms) to files 'f-[0-3]-[0-2].out'
</ol>
<li> hangup
<li> wait 2000 ms
</ol>
</ol>
<hr>
</body>
</html>

Example:
"c333;ws3000;d123;w200;lthrice;ws1000;vaudio;rsi4000f.out;j3lthrice;h;j4"
parses to
1. do this four times:
1.1. call to 333
1.2. wait until silent (max 3000 ms)
1.3. send digits 123
1.4. wait 200 ms
1.5. do this three times:
1.5.1. wait until silent (max 1000 ms)
1.5.2. send voice file 'audio'
1.5.3. record until silent (max 4000 ms) to files 'f-'<0-3>'-'<0-2>'.out'
1.6. hangup
1.7. wait 2000 ms


### END OF FILE ###
72 changes: 72 additions & 0 deletions doc/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
testphone
=========


### Introduction

Command line soft phone that makes phone calls, accepts calls,
enters DTMF digits, plays back WAV files and records them.

Not quite yet, though. WIP

### Run

testphone options:
-u <name> --user <name> username (required)
-a <name> --alias <name> username alias
-l <addr> --localaddress <addr> local address to listen on
-p <port> --listenport <port> the port to listen on
-r <nmbr> --remoteparty <nmbr> the party to call to
-x <prog> --execute <prog> program to follow
-d <prfx> --audio-prefix <prfx> recorded audio filename prefix
-f <file> --file <file> the name of played sound file
-g <addr> --gatekeeper <addr> gatekeeper to use
-w <addr> --gateway <addr> gateway to use

-l or -p without -x assumes answer mode. Additional -r forces
caller id checking. -r without -l, -p or -x assumes call mode.

WAV file requirements:
* format PCM
* mono
* 8 kHz sampling rate
* 16 bits sample size


The EBNF definition of the program syntax:
<prog> := cmd ';' <prog> |
cmd := call | answer | hangup
| dtmf | voice | record | wait
| setlabel | loop
call := 'c' remoteparty
answer := 'a' [ expectedremoteparty ]
hangup := 'h'
dtmf := 'd' digits
voice := 'v' audiofile
record := 'r' [ append ] [ silence ] [ iter ] millis audiofile
append := 'a'
silence := 's'
closed := 'c'
iter := 'i'
activity:= 'a'
wait := 'w' [ activity | silence ] [ closed ] millis
setlabel:= 'l' label
loop := 'j' [ how-many-times ] [ 'l' label ]

Example:
"c333;ws3000;d123;w200;lthrice;ws1000;vaudio;rsi4000f.out;j3lthrice;h;j4"
parses to
1. do this four times:
1.1. call to 333
1.2. wait until silent (max 3000 ms)
1.3. send digits 123
1.4. wait 200 ms
1.5. do this three times:
1.5.1. wait until silent (max 1000 ms)
1.5.2. send voice file 'audio'
1.5.3. record until silent (max 4000 ms) to files 'f-'<0-3>'-'<0-2>'.out'
1.6. hangup
1.7. wait 2000 ms


### END OF FILE ###

0 comments on commit 4029001

Please sign in to comment.