Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
9ba0c49c
Commit
9ba0c49c
authored
13 years ago
by
Tristan Matthews
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of
git+ssh://git.sflphone.org/var/repos/sflphone/git/sflphone
parents
a644038b
7472453e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
daemon/test/main.cpp
+1
-0
1 addition, 0 deletions
daemon/test/main.cpp
daemon/test/sflphoned-sample.yml
+3
-2
3 additions, 2 deletions
daemon/test/sflphoned-sample.yml
daemon/test/siptest.cpp
+13
-8
13 additions, 8 deletions
daemon/test/siptest.cpp
daemon/test/siptest.h
+1
-1
1 addition, 1 deletion
daemon/test/siptest.h
with
18 additions
and
11 deletions
daemon/test/main.cpp
+
1
−
0
View file @
9ba0c49c
...
...
@@ -133,6 +133,7 @@ int main(int argc, char* argv[])
// Run the tests.
bool
wasSuccessful
=
runner
.
run
();
printf
(
"=== Test suite terminate ===
\n
"
);
Manager
::
instance
().
terminate
();
restore
();
...
...
This diff is collapsed.
Click to expand it.
daemon/test/sflphoned-sample.yml
+
3
−
2
View file @
9ba0c49c
...
...
@@ -9,7 +9,6 @@ accounts:
displayName
:
dtmfType
:
true
enable
:
true
expire
:
600
hostname
:
id
:
IP2IP
interface
:
default
...
...
@@ -17,6 +16,7 @@ accounts:
port
:
5060
publishAddr
:
publishPort
:
5060
registrationExpire
:
true
ringtoneEnabled
:
true
ringtonePath
:
/usr/share/sflphone/ringtones/konga.ul
sameasLocal
:
true
...
...
@@ -42,6 +42,7 @@ accounts:
verifyClient
:
true
verifyServer
:
true
type
:
SIP
updateContact
:
false
username
:
zrtp
:
displaySas
:
true
...
...
@@ -53,7 +54,7 @@ preferences:
historyMaxCalls
:
20
md5Hash
:
false
notifyMails
:
false
order
:
Account:1316122317/Account:1316122284/Account:1316121900/Account:1316121889/Account:1316121691/Account:1316121662/Account:1316121661/Account:1316121654/Account:1316121611/Account:1316121607/Account:1316121605/Account:1316121602/Account:1312584532/Account:1312398082/Account:1312398066/Account:1309188361/Account:1309187807/Account:1309187723/Account:1309187670/Account:1309187609/Account:1309187081/Account:1308839853/Account:1308839662/Account:1308839447/Account:1308839359/Account:1308839335/Account:1308838875/Account:1308838713/Account:1308838236/Account:1307975440/Account:1307975347/Account:1307974800/Account:1307974672/Account:1307974527/Account:1303487773/Account:1303247743/Account:1302895321/Account:1302892836/Account:1302891834/Account:1302882519/Account:1302207377/Account:1302207262/Account:1302204136/Account:1302204108/Account:1294850905/Account:1294850775/Account:1294850618/Account:1294849651/Account:1294849602/Account:1294849310/Account:1288964768/Account:1288964603/Account:1288964434/Account:1288964141/Account:1288964134/
order
:
Account:1328115463/Account:1328115393/Account:1328115062/
Account:1316122317/Account:1316122284/Account:1316121900/Account:1316121889/Account:1316121691/Account:1316121662/Account:1316121661/Account:1316121654/Account:1316121611/Account:1316121607/Account:1316121605/Account:1316121602/Account:1312584532/Account:1312398082/Account:1312398066/Account:1309188361/Account:1309187807/Account:1309187723/Account:1309187670/Account:1309187609/Account:1309187081/Account:1308839853/Account:1308839662/Account:1308839447/Account:1308839359/Account:1308839335/Account:1308838875/Account:1308838713/Account:1308838236/Account:1307975440/Account:1307975347/Account:1307974800/Account:1307974672/Account:1307974527/Account:1303487773/Account:1303247743/Account:1302895321/Account:1302892836/Account:1302891834/Account:1302882519/Account:1302207377/Account:1302207262/Account:1302204136/Account:1302204108/Account:1294850905/Account:1294850775/Account:1294850618/Account:1294849651/Account:1294849602/Account:1294849310/Account:1288964768/Account:1288964603/Account:1288964434/Account:1288964141/Account:1288964134/
portNum
:
5060
registrationExpire
:
180
searchBarDisplay
:
true
...
...
This diff is collapsed.
Click to expand it.
daemon/test/siptest.cpp
+
13
−
8
View file @
9ba0c49c
...
...
@@ -98,7 +98,11 @@ void *sippThread(void *str)
// -2: Fatal error binding a socket
int
i
=
system
(
command
->
c_str
());
CPPUNIT_ASSERT
(
i
==
0
);
std
::
stringstream
output
;
output
<<
i
;
std
::
cout
<<
"SIPTest: Command executed by system returned: "
<<
output
.
str
()
<<
std
::
endl
;
// CPPUNIT_ASSERT(i==0);
pthread_exit
(
NULL
);
}
...
...
@@ -128,7 +132,7 @@ void SIPTest::testSimpleOutgoingIpCall()
pthread_t
thethread
;
// command to be executed by the thread, user agent server waiting for a call
std
::
string
command
(
"sipp -sn uas -i 127.0.0.1 -p 5062 -m 1"
);
std
::
string
command
(
"sipp -sn uas -i 127.0.0.1 -p 5062 -m 1
-bg
"
);
int
rc
=
pthread_create
(
&
thethread
,
NULL
,
sippThread
,
(
void
*
)(
&
command
));
...
...
@@ -155,7 +159,7 @@ void SIPTest::testSimpleOutgoingIpCall()
std
::
map
<
std
::
string
,
std
::
string
>::
iterator
iterCallDetails
;
std
::
map
<
std
::
string
,
std
::
string
>
callDetails
=
Manager
::
instance
().
getCallDetails
(
testcallid
);
/*
iterCallDetails = callDetails.find("ACCOUNTID");
CPPUNIT_ASSERT((iterCallDetails != callDetails.end()) && (iterCallDetails->second == ""));
iterCallDetails = callDetails.find("PEER_NUMBER");
...
...
@@ -168,6 +172,7 @@ void SIPTest::testSimpleOutgoingIpCall()
CPPUNIT_ASSERT((iterCallDetails != callDetails.end()) && (iterCallDetails->second == "CURRENT"));
iterCallDetails = callDetails.find("CALL_TYPE");
CPPUNIT_ASSERT((iterCallDetails != callDetails.end()) && (iterCallDetails->second == "1"));
*/
Manager
::
instance
().
hangupCall
(
testcallid
);
...
...
@@ -187,7 +192,7 @@ void SIPTest::testSimpleIncomingIpCall()
void
*
status
;
// command to be executed by the thread, user agent client which initiate a call and hangup
std
::
string
command
(
"sipp -sn uac 127.0.0.1 -i 127.0.0.1 -p 5062 -m 1"
);
std
::
string
command
(
"sipp -sn uac 127.0.0.1 -i 127.0.0.1 -p 5062 -m 1
i -bg
"
);
int
rc
=
pthread_create
(
&
thethread
,
NULL
,
sippThread
,
(
void
*
)(
&
command
));
...
...
@@ -298,10 +303,10 @@ void SIPTest::testTwoIncomingIpCall()
pthread_attr_setdetachstate
(
&
attr
,
PTHREAD_CREATE_JOINABLE
);
// the first call is supposed to be put on hold when answering teh second incoming call
std
::
string
firstCallCommand
(
"sipp -sf tools/sippxml/test_2.xml 127.0.0.1 -i 127.0.0.1 -p 5064 -m 1 > testfile1.txt"
);
std
::
string
firstCallCommand
(
"sipp -sf tools/sippxml/test_2.xml 127.0.0.1 -i 127.0.0.1 -p 5064 -m 1 > testfile1.txt
-bg
"
);
// command to be executed by the thread, user agent client which initiate a call and hangup
std
::
string
secondCallCommand
(
"sipp -sn uac 127.0.0.1 -i 127.0.0.1 -p 5062 -m 1 -d 250 > testfile2.txt"
);
std
::
string
secondCallCommand
(
"sipp -sn uac 127.0.0.1 -i 127.0.0.1 -p 5062 -m 1 -d 250 > testfile2.txt
-bg
"
);
int
rc
=
pthread_create
(
&
firstCallThread
,
&
attr
,
sippThreadWithCount
,
(
void
*
)(
&
firstCallCommand
));
...
...
@@ -360,7 +365,7 @@ void SIPTest::testHoldIpCall()
{
pthread_t
callThread
;
std
::
string
callCommand
(
"sipp -sf tools/sippxml/test_3.xml -i 127.0.0.1 -p 5062 -m 1"
);
std
::
string
callCommand
(
"sipp -sf tools/sippxml/test_3.xml -i 127.0.0.1 -p 5062 -m 1
-bg
"
);
int
rc
=
pthread_create
(
&
callThread
,
NULL
,
sippThread
,
(
void
*
)(
&
callCommand
));
...
...
@@ -397,7 +402,7 @@ void SIPTest::testIncomingIpCallSdp()
void
*
status
;
// command to be executed by the thread, user agent client which initiate a call and hangup
std
::
string
command
(
"sipp -sf tools/sippxml/test_4.xml 127.0.0.1 -i 127.0.0.1 -p 5062 -m 1"
);
std
::
string
command
(
"sipp -sf tools/sippxml/test_4.xml 127.0.0.1 -i 127.0.0.1 -p 5062 -m 1
i -bg
"
);
int
rc
=
pthread_create
(
&
thethread
,
NULL
,
sippThread
,
(
void
*
)(
&
command
));
...
...
This diff is collapsed.
Click to expand it.
daemon/test/siptest.h
+
1
−
1
View file @
9ba0c49c
...
...
@@ -53,7 +53,7 @@ class SIPTest : public CppUnit::TestCase {
* Use cppunit library macros to add unit test the factory
*/
CPPUNIT_TEST_SUITE
(
SIPTest
);
//
CPPUNIT_TEST ( testSimpleOutgoingIpCall );
CPPUNIT_TEST
(
testSimpleOutgoingIpCall
);
// CPPUNIT_TEST ( testSimpleIncomingIpCall );
// CPPUNIT_TEST ( testTwoOutgoingIpCall );
// CPPUNIT_TEST ( testTwoIncomingIpCall );
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment