diff --git a/.github/workflows/RFC8760.yml b/.github/workflows/RFC8760.yml deleted file mode 100644 index 39e9ed7..0000000 --- a/.github/workflows/RFC8760.yml +++ /dev/null @@ -1,71 +0,0 @@ -# This is a basic workflow to help you get started with Actions - -name: Alice->OpenSIPS(RFC8760)->Bob - -# Controls when the action will run. -on: - # Triggers the workflow on push or pull request events but only for the master branch - push: - branches: [ master ] - pull_request: - branches: [ master ] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - - schedule: - - cron: "30 0 * * *" - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "build" - build: - # The type of runner that the job will run on - runs-on: ${{ matrix.os }} - env: - MM_TYPE: opensips - MM_BRANCH: master - MM_REPO: https://github.com/OpenSIPS/opensips.git - MM_AUTH: ${{ matrix.mm-auth }} - RTPP_BRANCH: master - RTPPC_TYPE: ${{ matrix.rtppc-type }} - python-version: '3.8' - PYTHON_CMD: "python3.8" - - strategy: - matrix: - os: [ubuntu-latest] - rtppc-type: ['unix', 'udp', 'udp6', 'tcp', 'tcp6'] - mm-auth: ['passtr', 'UAC', 'UAS/auth', 'UAS/auth_db/calculate_ha1', 'UAS/auth_db/ha1'] - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3 - with: - ref: master - - - name: Set up Python ${{ env.python-version }} - uses: actions/setup-python@v3 - with: - python-version: ${{ env.python-version }} - - - name: before_install - run: sh -x cibits/before_install.sh - - - name: script - run: sh -x ./test_run.sh - - - name: transform_var - id: transform_var - run: echo "::set-output name=mm_auth::`echo ${{ matrix.mm-auth }} | sed 's|/|.|g'`" - - - name: Test logs - uses: actions/upload-artifact@v3 - with: - name: test-logs_${{ matrix.rtppc-type }}_${{ steps.transform_var.outputs.mm_auth }} - path: | - opensips.cfg - bob.log - alice.log - rtpproxy.log diff --git a/.github/workflows/b2bua.yml b/.github/workflows/b2bua.yml deleted file mode 100644 index 38f4567..0000000 --- a/.github/workflows/b2bua.yml +++ /dev/null @@ -1,63 +0,0 @@ -# This is a basic workflow to help you get started with Actions - -name: Alice->Sippy Python B2B->Bob - -# Controls when the action will run. -on: - # Triggers the workflow on push or pull request events but only for the master branch - push: - branches: [ master ] - pull_request: - branches: [ master ] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - - schedule: - - cron: "0 0 * * *" - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "build" - build: - # The type of runner that the job will run on - runs-on: ubuntu-latest - env: - MM_TYPE: b2bua - MM_BRANCH: ${{ matrix.mm-branch }} - RTPP_BRANCH: master - RTPPC_TYPE: ${{ matrix.rtppc-type }} - PYTHON_CMD: "python${{ matrix.python-version }}" - - strategy: - matrix: - python-version: ['2.7', '3.8', '3.9', '3.10'] - mm-branch: ['master', 'PRACK'] - rtppc-type: ['unix', 'cunix', 'udp', 'udp6', 'tcp', 'tcp6'] - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3 - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - - name: before_install - run: sh -x cibits/before_install.sh - - - name: script - run: sh -x ./test_run.sh - - - - name: Test logs - uses: actions/upload-artifact@v3 - with: - name: test-logs_${{ matrix.python-version }}_${{ matrix.mm-branch }}_${{ matrix.rtppc-type }} - path: | - b2bua.log - bob.log - alice.log - rtpproxy.log diff --git a/.github/workflows/go-b2bua.yml b/.github/workflows/go-b2bua.yml deleted file mode 100644 index a14324f..0000000 --- a/.github/workflows/go-b2bua.yml +++ /dev/null @@ -1,64 +0,0 @@ -# This is a basic workflow to help you get started with Actions - -name: Alice->Sippy GO B2B->Bob - -# Controls when the action will run. -on: - # Triggers the workflow on push or pull request events but only for the master branch - push: - branches: [ master ] - pull_request: - branches: [ master ] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - - schedule: - - cron: "10 0 * * *" - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "build" - build: - # The type of runner that the job will run on - runs-on: ubuntu-latest - env: - MM_TYPE: go-b2bua - MM_BRANCH: master - RTPP_BRANCH: master - RTPPC_TYPE: ${{ matrix.rtppc-type }} - python-version: '3.8' - PYTHON_CMD: "python3.8" - - strategy: - matrix: - rtppc-type: ['unix', 'cunix', 'udp', 'udp6', 'tcp', 'tcp6'] - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3 - - - name: Set up Python ${{ env.python-version }} - uses: actions/setup-python@v3 - with: - python-version: ${{ env.python-version }} - - - name: Install Golang - run: sudo apt-get update && sudo apt-get -y install golang-go - - - name: before_install - run: sh -x cibits/before_install.sh - - - name: script - run: sh -x ./test_run.sh - - - name: Test logs - uses: actions/upload-artifact@v3 - with: - name: test-logs_${{ matrix.rtppc-type }} - path: | - b2bua.log - bob.log - alice.log - rtpproxy.log diff --git a/.github/workflows/kamailio.yml b/.github/workflows/kamailio.yml deleted file mode 100644 index 108cfc2..0000000 --- a/.github/workflows/kamailio.yml +++ /dev/null @@ -1,62 +0,0 @@ -# This is a basic workflow to help you get started with Actions - -name: Alice->Kamailio->Bob - -# Controls when the action will run. -on: - # Triggers the workflow on push or pull request events but only for the master branch - push: - branches: [ master ] - pull_request: - branches: [ master ] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - - schedule: - - cron: "20 0 * * *" - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "build" - build: - # The type of runner that the job will run on - runs-on: ubuntu-20.04 - env: - MM_TYPE: kamailio - MM_BRANCH: ${{ matrix.mm-branch }} - RTPP_BRANCH: master - RTPPC_TYPE: ${{ matrix.rtppc-type }} - python-version: '3.8' - PYTHON_CMD: "python3.8" - - strategy: - matrix: - mm-branch: ['master', '5.6', '5.5', '5.4', '5.3', '5.2', '5.1', '5.0', '4.4', '4.3', '4.2'] - rtppc-type: ['unix', 'udp', 'udp6'] - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v3 - - - name: Set up Python ${{ env.python-version }} - uses: actions/setup-python@v3 - with: - python-version: ${{ env.python-version }} - - - name: before_install - run: sh -x cibits/before_install.sh - - - name: script - run: sh -x ./test_run.sh - - - name: Test logs - uses: actions/upload-artifact@v3 - with: - name: test-logs_${{ matrix.mm-branch }}_${{ matrix.rtppc-type }} - path: | - kamailio.cfg - bob.log - alice.log - rtpproxy.log diff --git a/.github/workflows/opensips.yml b/.github/workflows/opensips.yml index c03ffcf..9a3b295 100644 --- a/.github/workflows/opensips.yml +++ b/.github/workflows/opensips.yml @@ -6,9 +6,9 @@ name: Alice->OpenSIPS->Bob on: # Triggers the workflow on push or pull request events but only for the master branch push: - branches: [ master ] +# branches: [ master ] pull_request: - branches: [ master ] +# branches: [ master ] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -25,32 +25,18 @@ jobs: env: MM_TYPE: opensips MM_BRANCH: ${{ matrix.mm-branch }} + MM_REV: ${{ matrix.mm-rev }} RTPP_BRANCH: master RTPPC_TYPE: ${{ matrix.rtppc-type }} - python-version: '3.8' - PYTHON_CMD: "python3.8" + python-version: '3.10' + PYTHON_CMD: "python3.10" strategy: matrix: os: [ubuntu-latest] - mm-branch: ['master', '3.3', '3.2', '3.1', '3.0', '2.4'] + mm-branch: ['master'] + mm-rev: ['b3644964573d7083001e2fbf12d4580808b664dc', 'e00300c46178eb0e22d3bc062b6fc0abf63ca9fb'] rtppc-type: ['unix', 'udp', 'udp6'] - include: - - mm-branch: 'master' - os: ubuntu-latest - rtppc-type: 'tcp' - - mm-branch: 'master' - os: ubuntu-latest - rtppc-type: 'tcp6' - - mm-branch: '2.3' - os: ubuntu-20.04 - rtppc-type: 'unix' - - mm-branch: '2.3' - os: ubuntu-20.04 - rtppc-type: 'udp' - - mm-branch: '2.3' - os: ubuntu-20.04 - rtppc-type: 'udp6' # Steps represent a sequence of tasks that will be executed as part of the job steps: diff --git a/scenarios/UAC/opensips.cfg.in b/scenarios/UAC/opensips.cfg.in index 3f6e309..9125c0d 100644 --- a/scenarios/UAC/opensips.cfg.in +++ b/scenarios/UAC/opensips.cfg.in @@ -33,6 +33,11 @@ modparam("rtpproxy", "rtpproxy_sock", RTPP_SOCK_TEST) listen=udp:127.0.0.1:5060 listen=udp:[::1]:5060 +#if OPENSIPS_VER_FULL == master +stderror_enabled=yes +syslog_enabled=no +#endif + route { XLOG("OpenSIPS received a request $rm from $si\n"); ## initial sanity checks -- messages with diff --git a/scenarios/UAS/auth/opensips.cfg.in b/scenarios/UAS/auth/opensips.cfg.in index 5233c7b..5d90fbe 100644 --- a/scenarios/UAS/auth/opensips.cfg.in +++ b/scenarios/UAS/auth/opensips.cfg.in @@ -39,6 +39,11 @@ modparam("rtpproxy", "rtpproxy_sock", RTPP_SOCK_TEST) listen=udp:127.0.0.1:5060 listen=udp:[::1]:5060 +#if OPENSIPS_VER_FULL == master +stderror_enabled=yes +syslog_enabled=no +#endif + route { XLOG("OpenSIPS received a request $rm from $si\n"); ## initial sanity checks -- messages with diff --git a/scenarios/UAS/auth_db/calculate_ha1/opensips.cfg.in b/scenarios/UAS/auth_db/calculate_ha1/opensips.cfg.in index 2e10644..a8adbf7 100644 --- a/scenarios/UAS/auth_db/calculate_ha1/opensips.cfg.in +++ b/scenarios/UAS/auth_db/calculate_ha1/opensips.cfg.in @@ -43,6 +43,11 @@ modparam("rtpproxy", "rtpproxy_sock", RTPP_SOCK_TEST) listen=udp:127.0.0.1:5060 listen=udp:[::1]:5060 +#if OPENSIPS_VER_FULL == master +stderror_enabled=yes +syslog_enabled=no +#endif + route { XLOG("OpenSIPS received a request $rm from $si\n"); ## initial sanity checks -- messages with diff --git a/scenarios/UAS/auth_db/ha1/opensips.cfg.in b/scenarios/UAS/auth_db/ha1/opensips.cfg.in index d244521..c7d89bc 100644 --- a/scenarios/UAS/auth_db/ha1/opensips.cfg.in +++ b/scenarios/UAS/auth_db/ha1/opensips.cfg.in @@ -43,6 +43,11 @@ modparam("rtpproxy", "rtpproxy_sock", RTPP_SOCK_TEST) listen=udp:127.0.0.1:5060 listen=udp:[::1]:5060 +#if OPENSIPS_VER_FULL == master +stderror_enabled=yes +syslog_enabled=no +#endif + route { XLOG("OpenSIPS received a request $rm from $si\n"); ## initial sanity checks -- messages with diff --git a/scenarios/passtr/opensips.cfg.in b/scenarios/passtr/opensips.cfg.in index 5683acc..6abe475 100644 --- a/scenarios/passtr/opensips.cfg.in +++ b/scenarios/passtr/opensips.cfg.in @@ -70,6 +70,11 @@ modparam("rtpproxy", "rtpproxy_sock", RTPP_SOCK_TEST) listen=udp:127.0.0.1:5060 listen=udp:[::1]:5060 +#if OPENSIPS_VER_FULL == master +stderror_enabled=yes +syslog_enabled=no +#endif + route { XLOG("OpenSIPS received a request $rm from $si\n"); ## initial sanity checks -- messages with diff --git a/scenarios/simple/opensips.cfg.in b/scenarios/simple/opensips.cfg.in index 8f47d88..a9ad5d1 100644 --- a/scenarios/simple/opensips.cfg.in +++ b/scenarios/simple/opensips.cfg.in @@ -54,6 +54,11 @@ modparam("rtpproxy", "rtpproxy_sock", RTPP_SOCK_TEST) listen=udp:127.0.0.1:5060 listen=udp:[::1]:5060 +#if OPENSIPS_VER_FULL == master +stderror_enabled=yes +syslog_enabled=no +#endif + route { XLOG("OpenSIPS received a request $rm from $si\n"); ## initial sanity checks -- messages with diff --git a/test_cases/reinv_bad_ack.py b/test_cases/reinv_bad_ack.py index 2e48c20..7f83560 100644 --- a/test_cases/reinv_bad_ack.py +++ b/test_cases/reinv_bad_ack.py @@ -26,6 +26,8 @@ from .t1 import a_test1, b_test1 from .reinvite import test_reinvite +from sippy.CCEvents import CCEventFail + class a_test_reinv_bad_ack(test_reinvite, a_test1): cld = 'bob_reinv_bad_ack' cli = 'alice_reinv_bad_ack' @@ -46,6 +48,11 @@ def on_reinvite_connected(self, ua): ua.tr.ack.getHFBody('cseq').cseq = 0 ua.global_config['_sip_tm'].sendACK(ua.tr) + def on_reinvite_failed(self, ua, event): + if isinstance(event, CCEventFail): + ua.global_config['_sip_tm'].sendACK(ua.tr) + a_test1.on_reinvite_failed(self, ua, event) + def disconnect(self, ua): if not self.disconnect_done: self.nerrs += 1 diff --git a/test_cases/reinvite.py b/test_cases/reinvite.py index 0e6b075..3712534 100644 --- a/test_cases/reinvite.py +++ b/test_cases/reinvite.py @@ -81,17 +81,22 @@ def recvEvent(self, event, ua): elif (isinstance(event, CCEventDisconnect) or \ isinstance(event, CCEventFail)): self.nerrs += 1 - raise ScenarioFailure('%s: re-INVITE has failed' % (self.failed_msg(),)) rval = super(test_reinvite, self).recvEvent(event, ua) if isinstance(event, CCEventConnect): self.reinvite_done = True self.on_reinvite_connected(ua) #print('self.reinvite_done = True') + elif isinstance(event, CCEventDisconnect) or \ + isinstance(event, CCEventFail): + self.on_reinvite_failed(ua, event) return rval def on_reinvite_connected(self, ua): pass + def on_reinvite_failed(self, ua, event): + raise ScenarioFailure('%s: re-INVITE has failed' % (self.failed_msg(),)) + def process_reinvite(self, ua): if self.reinv_answ_delay > 0: Timeout(self._process_reinvite, self.reinv_answ_delay, 1, \ diff --git a/test_run.sh b/test_run.sh index c93287b..fcfc717 100755 --- a/test_run.sh +++ b/test_run.sh @@ -81,7 +81,12 @@ start_mm() { echo "--- Config Begins ---" cat -n "${MM_CFG}" echo "--- Config Ends ---" - ${BUILDDIR}/dist/opensips/opensips -f "${MM_CFG}" ${MM_ARGS} -F -E -n 1 & + _MM_ARGS="-f ${MM_CFG} ${MM_ARGS} -F -n 1" + if [ "${MM_BRANCH}" != "master" ] + then + _MM_ARGS="${_MM_ARGS} -E" + fi + ${BUILDDIR}/dist/opensips/opensips ${_MM_ARGS} & MM_PID=${!} ALICE_ARGS="-46" ;;