Skip to content
Snippets Groups Projects
Commit e445b3c8 authored by Alexandre Savard's avatar Alexandre Savard
Browse files

[#2536] Fix small issue for sipp script

parent b3605548
Branches
Tags
No related merge requests found
...@@ -37,8 +37,6 @@ ...@@ -37,8 +37,6 @@
]]> ]]>
</send> </send>
<pause milliseconds="200"/>
<send retrans="500"> <send retrans="500">
<![CDATA[ <![CDATA[
...@@ -69,6 +67,9 @@ ...@@ -69,6 +67,9 @@
<recv request="INVITE"> <recv request="INVITE">
</recv> </recv>
<pause milliseconds="200">
</recv>
<send retrans="500"> <send retrans="500">
<![CDATA[ <![CDATA[
......
...@@ -53,15 +53,18 @@ ...@@ -53,15 +53,18 @@
<recv response="200"> <recv response="200">
<action>
<ereg regexp="tag=.*" search_in="hdr" header="To:" check_it="true" assign_to="1" />
</action>
</recv> </recv>
<send> <send>
<![CDATA[ <![CDATA[
ACK sip:192.168.50.79 SIP/2.0 ACK sip:[remote_ip] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch] Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: <sip:[local_ip]:[local_port]>;tag=[call_number] From: <sip:[local_ip]:[local_port]>;tag=[call_number]
To: <sip:192.168.50.79:[remote_port]> To: <sip:[remote_ip]:[remote_port]>;tag=[$1]
Call-ID: [call_id] Call-ID: [call_id]
CSeq: 2 ACK CSeq: 2 ACK
Contact: sip:[local_ip]:[local_port] Contact: sip:[local_ip]:[local_port]
...@@ -78,7 +81,7 @@ ...@@ -78,7 +81,7 @@
BYE sip:192.168.50.79 SIP/2.0 BYE sip:192.168.50.79 SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch] Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: <sip:[local_ip]:[local_port]>;tag=[call_number] From: <sip:[local_ip]:[local_port]>;tag=[call_number]
To: <sip:192.168.50.79:[remote_port]> To: <sip:[remote_ip]:[remote_port]>;tag=[$1]
Call-ID: [call_id] Call-ID: [call_id]
CSeq: 3 BYE CSeq: 3 BYE
Contact: sip:[local_ip]:[local_port] Contact: sip:[local_ip]:[local_port]
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
ACK sip:192.168.50.79 SIP/2.0 ACK sip:192.168.50.79 SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch] Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: <sip:[local_ip]:[local_port]>;tag=[call_number] From: <sip:[local_ip]:[local_port]>;tag=[call_number]
To: <sip:192.168.50.79:[remote_port]> To: <sip:[remote_ip]:[remote_port]>
Call-ID: [call_id] Call-ID: [call_id]
CSeq: 2 ACK CSeq: 2 ACK
Contact: sip:[local_ip]:[local_port] Contact: sip:[local_ip]:[local_port]
......
...@@ -46,42 +46,17 @@ ...@@ -46,42 +46,17 @@
]]> ]]>
</send> </send>
<!-- tag from From: header is required to build the To: header in
-- Bye request. -->
<recv request="ACK"> <recv request="ACK">
<action> <action>
<ereg regexp="tag=.*" search_in="hdr" header="From:" check_it="true" assign_to="1" /> <ereg regexp="tag=.*" search_in="hdr" header="From:" check_it="true" assign_to="1" />
</action> </action>
</recv> </recv>
<pause milliseconds="500"/> <pause milliseconds="500"/>
<!--
<send retrans="500">
<![CDATA[
BYE sip:[service] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];rport;branch=[branch]
From: <sip:test@[local_ip]:[local_port]>;tag=[call_number]
To: <sip:alexandresavard@alexandresavard-desktop>;[$1]
[last_Call-ID:]
CSeq: [cseq] BYE
Contact: <sip:test@[local_ip]:[local_port]>
Max-Forwards: 70
Subject: Functional Test
Content-Length: 0
]]>
</send>
-->
<!-- [last_From:] -->
<!-- [last_To:] -->
<!-- From: <sip:test@[local_ip]:[local_port]>;tag=[call_number] -->
<!-- To: <sip:alexandresavard@alexandresavard-desktop>;[$1] -->
<send retrans="500"> <send retrans="500">
<![CDATA[ <![CDATA[
......
...@@ -184,12 +184,12 @@ bashtrap() ...@@ -184,12 +184,12 @@ bashtrap()
# SCENARIO 1: Normal flow calls (IP2IP) # SCENARIO 1: Normal flow calls (IP2IP)
# test_ip2ip_send_hangup # test_ip2ip_send_hangup
test_ip2ip_send_peer_hungup # test_ip2ip_send_peer_hungup
# test_ip2ip_recv_hangup # test_ip2ip_recv_hangup
# test_ip2ip_recv_peer_hungup # test_ip2ip_recv_peer_hungup
# SCENARIO X: Normal flow calls (Account) # SCENARIO X: Normal flow calls (Account)
# test_account_send_hangup test_account_send_hangup
# test_account_send_peer_hungup # test_account_send_peer_hungup
# test_account_recv_hangup # test_account_recv_hangup
# test_account_recv_peer_hungup # test_account_recv_peer_hungup
\ No newline at end of file
...@@ -127,17 +127,17 @@ class SflPhoneTests(): ...@@ -127,17 +127,17 @@ class SflPhoneTests():
"""Send new account call, hangup once peer answered""" """Send new account call, hangup once peer answered"""
print "test account send hangup" print "test account send hangup"
i = 0 i = 0
while(i < 10): while(i < 1):
callid = self.sflphone.Call("27182") callid = self.sflphone.Call("27182")
time.sleep(0.5) time.sleep(1.0)
self.sflphone.HangUp(callid) self.sflphone.HangUp(callid)
time.sleep(0.5) time.sleep(1.0)
i = i+1 i = i+1
del self.sflphone # del self.sflphone
def test_account_send_peer_hungup(self): def test_account_send_peer_hungup(self):
...@@ -190,7 +190,7 @@ sflphone.setFirstRegisteredAccount(); ...@@ -190,7 +190,7 @@ sflphone.setFirstRegisteredAccount();
# Test 1: - Send an IP2IP call # Test 1: - Send an IP2IP call
# - Hangup # - Hangup
# testsuite.test_ip2ip_send_hangup() # testsuite.test_ip2ip_send_hangup()
testsuite.test_ip2ip_send_peer_hungup() # testsuite.test_ip2ip_send_peer_hungup()
# testsuite.test_ip2ip_recv_hangup() # testsuite.test_ip2ip_recv_hangup()
# testsuite.test_ip2ip_recv_peer_hungup() # testsuite.test_ip2ip_recv_peer_hungup()
...@@ -202,7 +202,7 @@ testsuite.test_ip2ip_send_peer_hungup() ...@@ -202,7 +202,7 @@ testsuite.test_ip2ip_send_peer_hungup()
# - Wait for incoming calls # - Wait for incoming calls
# - Answer # - Answer
# - Call is hanged up by calle # - Call is hanged up by calle
# testsuite.test_account_send_hangup() testsuite.test_account_send_hangup()
# testsuite.test_account_send_peer_hungup() # testsuite.test_account_send_peer_hungup()
# testsuite.test_account_recv_hangup() # testsuite.test_account_recv_hangup()
# testsuite.test_account_recv_peer_hungup() # testsuite.test_account_recv_peer_hungup()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment