6
LOCALIP_eth0=192.168.50.182
8
REMOTEADDR_lo=127.0.0.1:5060
9
REMOTEADDR_ast=192.168.50.79
12
function test_ip2ip_send_hangup {
15
# /usr/lib/sflphone/sflphoned&
17
# start sipp server to receive calls from sflphone
18
sipp -sf ip2ip_uas_recv_peer_hungup.xml ${REMOTEADDR_lo} -i ${LOCALIP_lo} -p ${LOCALPORT}
20
# wait some time to make sure sflphoned is started
23
# run python client and script to make calls
24
# python ../tools/pysflphone/pysflphone_testdbus.py &
31
function test_ip2ip_send_peer_hungup {
34
# /usr/lib/sflphone/sflphoned&
36
# start sipp server to receive calls from sflphone and then hangup
37
sipp -sf ip2ip_uas_recv_hangup.xml ${REMOTEADDR_lo} -s ${REMOTEADDR_lo} -i ${LOCALIP_lo} -p ${LOCALPORT}
39
# wait some time to make sure sflphoned is started
42
# run python client and script to make calls
43
# python ../tools/pysflphone/pysflphone_testdbus.py &
51
function test_ip2ip_recv_hangup {
54
# /usr/lib/sflphone/sflphoned&
56
# wait some time to make sure sflphoned is started
59
# python ../tools/pysflphone/pysflphone_testdbus.py &
61
# wait some time to make sure client is bound
64
# start sipp client and send calls
65
sipp -sf ip2ip_uac_send_peer_hungup.xml ${REMOTEADDR_lo} -i ${LOCALIP_lo} -p ${LOCALPORT} -l 1 -m 10
73
function test_ip2ip_recv_peer_hungup {
76
# /usr/lib/sflphone/sflphoned&
78
# wait some time to make sure sflphoned is started
81
# python ../tools/pysflphone/pysflphone_testdbus.py &
83
# wait some time to make sure client is bound
86
# start sipp client and send calls
87
sipp -sf ip2ip_uac_send_hangup.xml ${REMOTEADDR_lo} -i ${LOCALIP_lo} -p ${LOCALPORT} -l 1 -m 10
95
function test_account_send_hangup {
98
# /usr/lib/sflphone/sflphoned&
100
# wait some time to make sure sflphoned is started
103
# python ../tools/pysflphone/pysflphone_testdbus.py &
105
# wait some time to make sure client is bound
108
# process only one registration
109
sipp -sf account_uas_register.xml ${REMOTEADDR_ast} -i ${LOCALIP_eth0} -p ${LOCALPORT} -l 1 -m 1
111
# start sipp client and send calls
112
sipp -sf account_uas_recv_peer_hungup.xml ${REMOTEADDR_ast} -i ${LOCALIP_eth0} -p ${LOCALPORT} -l 1
119
function test_account_send_peer_hungup {
122
# /usr/lib/sflphone/sflphoned&
124
# wait some time to make sure sflphoned is started
127
# python ../tools/pysflphone/pysflphone_testdbus.py &
129
# wait some time to make sure client is bound
132
# process only one registration
133
sipp -sf account_uas_register.xml ${REMOTEADDR_ast} -i ${LOCALIP_eth0} -p ${LOCALPORT} -l 1 -m 1
135
# start sipp client and send calls
136
sipp -sf account_uas_recv_hangup.xml ${REMOTEADDR_ast} -i ${LOCALIP_eth0} -p ${LOCALPORT} -l 1
143
function test_account_recv_hangup {
146
# /usr/lib/sflphone/sflphoned&
148
# wait some time to make sure sflphoned is started
151
# python ../tools/pysflphone/pysflphone_testdbus.py &
153
# wait some time to make sure client is bound
156
# process only one registration
157
sipp -sf account_uas_register.xml ${REMOTEADDR_ast} -i ${LOCALIP_eth0} -p ${LOCALPORT} -l 1 -m 1
159
# start sipp client and send calls
160
sipp -sf account_uac_send_peer_hungup.xml ${REMOTEADDR_ast} -i ${LOCALIP_eth0} -p ${LOCALPORT} -l 1 -m 10
166
function test_account_recv_peer_hungup {
169
# /usr/lib/sflphone/sflphoned&
171
# wait some time to make sure sflphoned is started
174
# python ../tools/pysflphone/pysflphone_testdbus.py &
176
# wait some time to make sure client is bound
179
# process only one registration
180
sipp -sf account_uas_register.xml ${REMOTEADDR_ast} -i ${LOCALIP_eth0} -p ${LOCALPORT} -l 1 -m 1
182
# start sipp client and send calls
183
sipp -sf account_uac_send_hangup.xml ${REMOTEADDR_ast} -i ${LOCALIP_eth0} -p ${LOCALPORT} -l 1 -m 10
190
function test_ip2ip_send_hold_offhold {
193
# /usr/lib/sflphone/sflphoned&
195
# wait some time to make sure sflphoned is started
198
# python ../tools/pysflphone/pysflphone_testdbus.py &
200
# wait some time to make sure client is bound
203
# start sipp client and send calls
204
sipp -sf ip2ip_uas_recv_hold_offhold.xml ${REMOTEADDR_lo} -i ${LOCALIP_lo} -p ${LOCALPORT}
210
function test_account_send_transfer {
213
# /usr/lib/sflphone/sflphoned&
215
# wait some time to make sure sflphoned is started
218
# python ../tools/pysflphone/pysflphone_testdbus.py &
220
# wait some time to make sure client is bound
223
# process only one registration
224
sipp -sf account_uas_register.xml ${REMOTEADDR_ast} -i ${LOCALIP_eth0} -p ${LOCALPORT} -l 1 -m 1
226
# start sipp client and send calls
227
sipp -sf account_uas_recv_transfered.xml ${REMOTEADDR_ast} -i ${LOCALIP_eth0} -p ${LOCALPORT} -l 1
235
function test_ip2ip_send_refused {
238
# /usr/lib/sflphone/sflphoned&
240
# start sipp server to receive calls from sflphone and then hangup
241
sipp -sf ip2ip_uac_send_refused.xml ${REMOTEADDR_lo} -s ${REMOTEADDR_lo} -i ${LOCALIP_lo} -p ${LOCALPORT} -l 1
243
# wait some time to make sure sflphoned is started
246
# run python client and script to make calls
247
# python ../tools/pysflphone/pysflphone_testdbus.py &
255
function test_mult_ip2ip_send_hangup {
258
# /usr/lib/sflphone/sflphoned&
260
# start sipp server to receive calls from sflphone
261
sipp -sf ip2ip_uac_send_hangup.xml 127.0.0.1:5060 -i 127.0.0.1 -p 5062 -l 1 -m 10
262
sipp -sf ip2ip_uac_send_hangup.xml 127.0.0.1:5060 -i 127.0.0.1 -p 5064 -l 1 -m 10
263
sipp -sf ip2ip_uac_send_hangup.xml 127.0.0.1:5060 -i 127.0.0.1 -p 5066 -l 1 -m 10
264
# sipp -sf ip2ip_uac_send_hangup.xml ${REMOTEADDR_lo} -i ${LOCALIP_lo} -p ${LOCALPORT} -l 1 -m 10
266
# wait some time to make sure sflphoned is started
269
# run python client and script to make calls
270
# python ../tools/pysflphone/pysflphone_testdbus.py &
278
function test_mult_ip2ip_recv_peer_hangup {
281
# /usr/lib/sflphone/sflphoned&
283
# start sipp server to receive calls from sflphone
284
sipp -sf ip2ip_uac_send_hangup.xml 127.0.0.1 -i 127.0.0.1:5060 -p 5062
285
sipp -sf ip2ip_uac_send_hangup.xml 127.0.0.1 -i 127.0.0.1:5060 -p 5064
286
sipp -sf ip2ip_uac_send_hangup.xml 127.0.0.1 -i 127.0.0.1:5060 -p 5066
287
# sipp -sf ip2ip_uas_recv_peer_hungup.xml ${REMOTEADDR_lo} -i ${LOCALIP_lo} -p ${LOCALPORT}
289
# wait some time to make sure sflphoned is started
292
# run python client and script to make calls
293
# python ../tools/pysflphone/pysflphone_testdbus.py &
300
# function called if CTRL-C detected
308
# ============================ Test Suite ============================
312
# SCENARIO 1: (IP2IP) Normal flow calls
314
# Test 1: - Send an IP2IP call
316
test_ip2ip_send_hangup
318
# Test 2: - Send an IP2IP call
320
# test_ip2ip_send_peer_hungup
322
# Test 3: - Receive an IP2IP call
324
# test_ip2ip_recv_hangup
326
# Test 4: - Receive an IP2IP call
328
# test_ip2ip_recv_peer_hungup
332
# SCENARIO 2: (ACCOUNT) Normal flow calls
334
# Test 1: - Send an ACCOUNT call
336
# test_account_send_hangup
338
# Test 2: - Send an ACCOUNT call
340
# test_account_send_peer_hungup
342
# Test 3: - Receive an ACCOUNT call
344
# test_account_recv_hangup
346
# Test 4: - Receive an ACCOUNT call
348
# test_account_recv_peer_hungup
352
# SCENARIO 3: Hold/offHold calls (Account)
354
# Test 1: - Send an IP2IP call
355
# - Put this call on HOLD
356
# - Off HOLD this call
358
# test_ip2ip_send_hold_offhold
362
# SCENARIO 4: Transfer calls (Account)
364
# Test 1: - Send an IP2IP call
365
# - Transfer this call to another sipp instance
367
# test_account_send_transfer
370
#SCENARIO 5: Refuse call (IP2IP)
372
# Test 1: - Receive a call
373
# - Refuse (hangup without answer)
374
# test_ip2ip_send_refused
377
#SCENARIO 6: Multiple simultaneous Call
380
# test_mult_ip2ip_send_hangup
383
# test_mult_ip2ip_recv_peer_hangup
b'\\ No newline at end of file'