-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDevelopmentNotes.txt
More file actions
157 lines (96 loc) · 9.16 KB
/
Copy pathDevelopmentNotes.txt
File metadata and controls
157 lines (96 loc) · 9.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
Visual Studio Professional 2008 C++ with the latest Service Packs are required to build to build the projects. It is possible that Visual Studio Standard can be used, this has not been tested. Express version will not work due to ATL and MFC requirements.
There are 2 primary Solutions.
OnSip.sln
OnSipTAPI\OnSipTAPI.sln
All Output application files for both solutions are in the \Debug or \Release directory.
OnSip.sln Solution
-------------------
This solution contains all the OnSip and gloox core code, along with a Console application (TestOnSipCore.exe) for testing. The Console application will initialize and connect to the OnSip server. From there, it will monitor and display all XMPP and debug tracing. Command line parameters are used to specify the connection values. Run the TestOnSipCore.exe without any command line parameters to see the required values.
The required command line parameters are...
name password domain
where
name - OnSip user name
password - OnSip password
domain - the OnSip domain
e.g.
TestOnSipCore bob password bob.onsip.com
Typically, the name and domain form the OnSip sip address, e.g. sip:bob@bob.onsip.com
Once the TestOnSipCore.exe application has connected to the server, then XMPP and other internal operation can be monitored by creating incoming calls and outgoing calls using the SIP phone. A phone number can be entered in the console application (e.g. 19725551212, press ENTER) and the number will be dialed using XMPP. Just pressing ENTER in the console application will exit.
If trying to debug the XMPP and state machine code, it is recommanded that this is done using the TestOnSipCore console application. The command line parameters can be specified in the Properties section of the application, and then run directly from Visual Studio Professional 2008.
To build, simply build the entire solution. Either specify Debug or Release mode. The output binaries will be placed in either the Debug or Release directory of the root of the source code tree.
OnSipTAPI.sln
-------------
This is full TAPI driver solution. Building the TAPI driver will create the following binaries in the Release directory
OnSIP.tsp
OnSIPui.dll
OnSipInstall.dll
x64\OnSIP.tsp
x64\OnSIPui.dll
x64\OnSipInstall64.exe
Following are the details on the binaries...
OnSIP.tsp - 32-bit DLL, it is the actual TAPI driver
OnSIPui.dll - 32-bit DLL, it is the user interface part of the TAPI driver
OnSipInstall.dll - 32-bit DLL, used by the install program to integrate with the TAPI 32-bit and 64-bit install
x64\OnSIP.tsp - 32-bit DLL, it is the actual TAPI driver for 64-bit installs
x64\OnSIPui.dll - 32-bit DLL, it is the user interface part of the TAPI driver for 64-bit installs
x64\OnSipInstall64.exe = 64-bit exe, used by the install program to integrate with the TAPI install
To do a manual install
1) copy the OnSIP.tsp and OnSIPui.dll files to the c:\Windows\system32 directory
2) Go to the Control Panel \ Phone and Modem Options applet
3) Advanced Tab
4) Press "Add" button and select the OnSIP tapi driver.
5) Enter in the logon info.
More details on this can be seen in the Releases\Install TAPI Driver.doc, as well as how to install for Outlook. Also, refer to the OnSipInstall\OnSIP Hosted PBX Details.doc for full details on installation and use. To update the TAPI driver, it is required to first uninstall it using the Control Panel before being able to copy over new binaries into the System32 directory.
To build, simply build the entire solution. Either specify Debug or Release mode. The output binaries will be placed in either the Debug or Release directory of the root of the source code tree. Do not use the Unicode options as this will not compile. The TAPI driver is developed using ANSI.
Debug Tracing
-------------
Extensive debug tracing has been used in the OnSip source code. This allows a debug trace to captured to help track down a problem. There are several levels of debug tracing in the code...
NONE=0
ERROR=1
WARN=2
APP=3
DEBUG=4
TRACE=5
If using a debug version, then default level is DEBUG. For release mode, the default level is WARN. The debug output is sent to Windows OutputDebugString. This can be viewed by Windows Debug capture programs such as DBMON.EXE and SysInternals/Microsoft DbgView.exe.
DBMON.EXE is a console application and can typically be run in a Windows CMD and display the tracing output. To capture the debug into a file, simply redirect the output to a file, e.g.
DBMON >log.txt
Sometimes DBMON will not work due to user permissions or OS user sessions (e.g. Vista). In this case, DbgView may have to be used. When running DbgView, be sure to enable the Capture / Capture Win32 and Capture / Capture Global Win32 options. The debug tracing will be displayed in GUI or optionally can be logged to a file. It may also be required to run DbgView as an Administrator, this is definetly required if running under 64-bit.
There are 2 tracing systems in the TAPI driver. The tracing system in the Julmar TSP code, and in the OnSip specific code (typically in the OnSipCommon, OnSipCore, and OnSipTAPI directories). The Julmar TAPI driver framework was used for development of the TAPI driver.
The Julmar TSP layer has its own debug layer. The Julmar TSP debug tracing levels are set similar as the OnSip specific code for debug and release versions.
For debugging a release version, the debug level typically should be set to the DEBUG level. This can be done using the specified registry variables...
DWORD HKLM\Software\OnSIP\TSPDebugLevel
DWORD HKLM\Software\OnSIP\DebugLevel
where
DebugLevel is used to set the tracing level in OnSip specific code (non Julmar), and TSPDebugLevel is used to enable the Julmar TSP layer tracing.
DebugLevel can be set to the values described above (e.g. ERROR=1, DEBUG=4, ..). Typically a TRACE level is not set as this enables some very detailed output in some areas.
TSPDebugLevel corresponds to bit-level flags as defined in the Julmar TSP core code.
See the Releases\Enable Debug Tracing.txt for full details, along with references to registry .REG files that can be used to enable or disable typical tracing settings.
To enable debug trace for 64-bit installs, the registry settings should be enabled for both the 64-bit registry and the 32-bit WOW64 registry. The additional registry values that should be specified...
DWORD HKLM\Software\Wow6432Node\OnSIP\TSPDebugLevel
DWORD HKLM\Software\Wow6432Node\OnSIP\DebugLevel
These additional settings are not required for general trace logging of the TSP, they are only required if debugging the installation since the installation is comprised of both 32-bit and 64-bit parts.
Install
-------
The Inno Setup is used for the installation program (http://www.innosetup.com). The InnoS Setup QuckStart Pack was used during development, primarily due to ISTool script editor. The version of Inno Setup used for the OnSIP TAPI driver is available at OnSipInstall\ispack-5.2.4.exe.
To build the install, install the Inno Setup. This will install the IsTool script editor. In Windows Explorer, go to the OnSipInstall directory and right click on the OnSipTapi.iss and select "Open with ISTool". This is the main install script for the TAPI release.
To build the binaries for the install...
1) Open the OnSipTAPI.sln
2) Select "Release" "Win32" for the current configuration
3) Right click on the top solution and select "Clean Solution"
4) Right click on the top solution and select "Build Solution"
5) Select "Release" "x64" for the current configuration
6) Right click on the top solution and select "Clean Solution"
7) Right click on the top solution and select "Build Solution"
All binaries will be in the Release and Release\x64 directory. This is the expected directory where the install script will use to build the installation program.
To build the install, select Project \ Compile Setup. This will build the Release \ OnSIPTapi.exe installation program. The install is built using the Release binaries. Therefore, it is required that first the OnSipTAPI.sln is built in release mode.
If changes are made to the TAPI driver, then typically the version number should be incremented. There are 2 places that the version number needs to be updated...
1) In the OnSipTapi.iss install script, e.g.
AppVerName={#MyAppName} v1.05
2) In the OnSipCore \ version.h, e.g.
#define TSP_VERSION 1, 0, 5, 0
#define STR_TSP_VERSION "1, 0, 5, 0\0"
#define PRODUCT_VERSION 1, 0, 0, 0
#define STR_PRODUCT_VERSION "1, 0, 0, 0\0"
#define DISPLAY_VERSION "v1.05"
The version numbers should be insync. Be sure to rebuild the OnSipTapi.sln after changing the version numbers.
Typically after a release of the TAPI driver, a zip of the TAPI binaries and the installation program are placed in the Releases directory and checked into version control. See the Releases directory for examples of the ZIP files and the file naming conventions. The Releases \ Releases.txt file is also updated with info on the changes and the release.