From b45c089d4b21c7778106d467a8d5d8b96733291d Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Wed, 10 Sep 2008 16:21:56 +0000 Subject: [PATCH] Wed Sep 10 10:22:28 EDT 2008 Pekka Pessi * check_session.c: added TCP call cases call_2_1_2_2 and call_2_1_3_2 git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9510 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- .../libsofia-sip-ua/nua/check_session.c | 54 ++++++++++++++++--- 1 file changed, 47 insertions(+), 7 deletions(-) diff --git a/libs/sofia-sip/libsofia-sip-ua/nua/check_session.c b/libs/sofia-sip/libsofia-sip-ua/nua/check_session.c index 314e30083f..baaa6aa20f 100644 --- a/libs/sofia-sip/libsofia-sip-ua/nua/check_session.c +++ b/libs/sofia-sip/libsofia-sip-ua/nua/check_session.c @@ -420,11 +420,11 @@ START_TEST(call_2_1_1) END_TEST -START_TEST(call_2_1_2) +START_TEST(call_2_1_2_1) { nua_handle_t *nh; - s2_case("2.1.2", "Basic call", + s2_case("2.1.2.1", "Basic call", "NUA sends INVITE, NUA receives BYE"); nh = nua_handle(nua, NULL, SIPTAG_TO(s2->local), TAG_END()); @@ -437,12 +437,32 @@ START_TEST(call_2_1_2) } END_TEST - -START_TEST(call_2_1_3) +START_TEST(call_2_1_2_2) { nua_handle_t *nh; - s2_case("2.1.3", "Incoming call", + s2_case("2.1.2.2", "Basic call over TCP", + "NUA sends INVITE, NUA receives BYE"); + + nh = nua_handle(nua, NULL, SIPTAG_TO(s2->local), + TAG_END()); + + invite_by_nua(nh, + NUTAG_PROXY(s2->tcp.contact->m_url), + TAG_END()); + + bye_to_nua(nh, TAG_END()); + + nua_handle_destroy(nh); +} +END_TEST + + +START_TEST(call_2_1_3_1) +{ + nua_handle_t *nh; + + s2_case("2.1.3.1", "Incoming call", "NUA receives INVITE and BYE"); nh = invite_to_nua(TAG_END()); @@ -454,6 +474,24 @@ START_TEST(call_2_1_3) END_TEST +START_TEST(call_2_1_3_2) +{ + nua_handle_t *nh; + + s2_case("2.1.3.2", "Incoming call over TCP", + "NUA receives INVITE and BYE"); + + dialog->tport = s2->tcp.tport; + + nh = invite_to_nua(TAG_END()); + + bye_to_nua(nh, TAG_END()); + + nua_handle_destroy(nh); +} +END_TEST + + START_TEST(call_2_1_4) { nua_handle_t *nh; @@ -632,8 +670,10 @@ TCase *invite_tcase(void) tcase_add_checked_fixture(tc, call_setup, call_teardown); { tcase_add_test(tc, call_2_1_1); - tcase_add_test(tc, call_2_1_2); - tcase_add_test(tc, call_2_1_3); + tcase_add_test(tc, call_2_1_2_1); + tcase_add_test(tc, call_2_1_2_2); + tcase_add_test(tc, call_2_1_3_1); + tcase_add_test(tc, call_2_1_3_2); tcase_add_test(tc, call_2_1_4); tcase_add_test(tc, call_2_1_5); tcase_add_test(tc, call_2_1_6);