File: run

package info (click to toggle)
sip-tester 1%3A3.7.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,932 kB
  • sloc: cpp: 29,383; xml: 13,436; ansic: 2,381; python: 2,218; sh: 505; makefile: 13
file content (22 lines) | stat: -rwxr-xr-x 796 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
# This regression test is a part of SIPp.
# Author: Walter Doekes, OSSO B.V., 2019
. "`dirname "$0"`/../functions"; init

sippbg -m 1 -sf uas.xml -p 5070
if ! sippfg -m 1 -sf uac.xml 127.0.0.1:5070 \
      -trace_msg -message_file tmp.log -trace_err \
      -timeout 4 -timeout_error >/dev/null 2>&1; then
    fail "call failed"
fi

from="$(sed -e '/message received/,$!d;/^From/!d;s/[[:cntrl:]]*$//' tmp.log)"
if test "$from" = "From: Alice <sip:alice@localhost>;tag=uniquetag"; then
    # From: Alice <sip:alice@localhost>;tag=uniquetag
    # ^-- last_From only gets the SIP-body from
    ok
else
    # From: Alice <sip:alice@localhost>;tag=uniquetag, <sip:anonymous@anonymous.invalid>)
    # ^-- last_From incorrectly gets the body-from too
    fail "got From from body? ($from)"
fi