From c4bae4ea9ea7af534c072556489840fe26c4e2f9 Mon Sep 17 00:00:00 2001
From: Alexandre Savard <alexandresavard@alexandresavard-desktop.(none)>
Date: Thu, 25 Mar 2010 15:04:07 -0400
Subject: [PATCH] [#3076] Fixed authentication issue and hardcoded ip address
 in test suite

---
 sippxml/ip2ip_uac_send_hangup.xml       |  2 +-
 sippxml/testsuiteuac.sh                 | 29 ++++++++++++++++++++++---
 tools/pysflphone/pysflphone_testdbus.py |  4 ++--
 3 files changed, 29 insertions(+), 6 deletions(-)

diff --git a/sippxml/ip2ip_uac_send_hangup.xml b/sippxml/ip2ip_uac_send_hangup.xml
index 8b801eb494..5c9673644d 100644
--- a/sippxml/ip2ip_uac_send_hangup.xml
+++ b/sippxml/ip2ip_uac_send_hangup.xml
@@ -78,7 +78,7 @@
   <send retrans="500">
     <![CDATA[
 
-      BYE sip:192.168.50.79 SIP/2.0
+      BYE sip:[remote_ip] SIP/2.0
       Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
       From: <sip:[local_ip]:[local_port]>;tag=[call_number]
       To: <sip:[remote_ip]:[remote_port]>;tag=[$1]
diff --git a/sippxml/testsuiteuac.sh b/sippxml/testsuiteuac.sh
index 9e993dfeb8..fb6359edf8 100644
--- a/sippxml/testsuiteuac.sh
+++ b/sippxml/testsuiteuac.sh
@@ -62,12 +62,35 @@ function test_ip2ip_recv_hangup {
     # sleep 1;
 
     # start sipp client and send calls 
-    sipp -sf ip2ip_uac_send_peer_hungup.xmlip2ip_uac_send_hangup.xml ${REMOTEADDR_lo} -i ${LOCALIP_lo} -p ${LOCALPORT} -l 1 -m 10
+    sipp -sf ip2ip_uac_send_peer_hungup.xml ${REMOTEADDR_lo} -i ${LOCALIP_lo} -p ${LOCALPORT} -l 1 -m 10
 
     # kill every one
     # bashtrap 
 }
 
+
+# SCENARIO 1 Test 4
+function test_ip2ip_recv_peer_hungup {
+
+    # start sflphoned
+    # /usr/lib/sflphone/sflphoned& 
+
+    # wait some time to make sure sflphoned is started
+    # sleep 1;
+
+    # python ../tools/pysflphone/pysflphone_testdbus.py &
+
+    # wait some time to make sure client is bound
+    # sleep 1;
+
+    # start sipp client and send calls 
+    sipp -sf ip2ip_uac_send_hangup.xml ${REMOTEADDR_lo} -i ${LOCALIP_lo} -p ${LOCALPORT} -l 1 -m 10
+
+    # kill every one
+    # bashtrap 
+}
+
+
 # SCENARIO 2 Test 1
 function test_account_send_hangup {
 
@@ -276,7 +299,7 @@ bashtrap()
 
 # Test 4: - Receive an ACCOUNT call
 #         - Peer Hangup
-# test_account_recv_peer_hungup
+test_account_recv_peer_hungup
 
 
 
@@ -302,4 +325,4 @@ bashtrap()
 
 # Test 1: - Receive a call
 #         - Refuse (hangup without answer)
-test_ip2ip_send_refused
\ No newline at end of file
+# test_ip2ip_send_refused
\ No newline at end of file
diff --git a/tools/pysflphone/pysflphone_testdbus.py b/tools/pysflphone/pysflphone_testdbus.py
index 933f8736c9..035b20a27f 100644
--- a/tools/pysflphone/pysflphone_testdbus.py
+++ b/tools/pysflphone/pysflphone_testdbus.py
@@ -300,7 +300,7 @@ sflphone.setFirstRegisteredAccount();
 
 # Test 4: - Receive an ACCOUNT call
 #         - Peer Hangup
-# testsuite.test_account_recv_peer_hungup()
+testsuite.test_account_recv_peer_hungup()
 
 
 
@@ -327,4 +327,4 @@ sflphone.setFirstRegisteredAccount();
 
 # Test 1: - Receive an incoming call
 #         - Hangup without answer
-testsuite.test_ip2ip_recv_refuse()
+# testsuite.test_ip2ip_recv_refuse()
-- 
GitLab