diff --git a/.gitignore b/.gitignore index a09e434f..341ce676 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ result *_test.yml sipp_scenario_responder*_reg.xml *.csv +presence_*xml +presence.sh diff --git a/scenarios/presence/0003_test.yml.tt2 b/scenarios/presence/0003_test.yml.tt2 new file mode 100644 index 00000000..e95d664d --- /dev/null +++ b/scenarios/presence/0003_test.yml.tt2 @@ -0,0 +1,32 @@ +flow: + - start|MAIN: + - start|ROUTE_NET_INFO: + - end|ROUTE_NET_INFO: + - start|ROUTE_IMP_REQUEST: + - start|ROUTE_IMP_WITHINDLG: + - end|ROUTE_IMP_WITHINDLG: + - start|ROUTE_AUTH: + - exit|ROUTE_AUTH: +sip_in: + - '^SUBSCRIBE sip:testuser1002@' + - 'Contact: ', + 'Content-Length: 0' + ] + - [ + '^NOTIFY sip:127.1.1.1', + 'CSeq: 2 NOTIFY', + 'From: ', + 'Content-Length: 0', + 'Subscription-State: pending;expires=30' + ] diff --git a/scenarios/presence/0007_test.yml.tt2 b/scenarios/presence/0007_test.yml.tt2 new file mode 100644 index 00000000..67772f56 --- /dev/null +++ b/scenarios/presence/0007_test.yml.tt2 @@ -0,0 +1,32 @@ +flow: + - start|MAIN: + - start|ROUTE_NET_INFO: + - end|ROUTE_NET_INFO: + - start|ROUTE_IMP_REQUEST: + - start|ROUTE_IMP_WITHINDLG: + - end|ROUTE_IMP_WITHINDLG: + - start|ROUTE_AUTH: + - exit|ROUTE_AUTH: +sip_in: + - '^SUBSCRIBE sip:testuser1002@' + - 'Contact: ', + 'Content-Length: 0' + ] + - [ + '^NOTIFY sip:127.1.1.1', + 'CSeq: 2 NOTIFY', + 'From: ', + 'Content-Length: 0', + 'Subscription-State: pending;expires=30' + ] diff --git a/scenarios/presence/0011_test.yml.tt2 b/scenarios/presence/0011_test.yml.tt2 new file mode 100644 index 00000000..568caeb3 --- /dev/null +++ b/scenarios/presence/0011_test.yml.tt2 @@ -0,0 +1,33 @@ +flow: + - start|MAIN: + - start|ROUTE_NET_INFO: + - end|ROUTE_NET_INFO: + - start|ROUTE_IMP_REQUEST: + - start|ROUTE_IMP_WITHINDLG: + - end|ROUTE_IMP_WITHINDLG: + - start|ROUTE_AUTH: + - exit|ROUTE_AUTH: +sip_in: + - '^SUBSCRIBE sip:testuser1002@' + - 'Contact: sip:testuser1002@' + - 'To: ', + 'Content-Length: 0' + ] + - [ + '^NOTIFY sip:testuser1002@', + 'CSeq: 2 NOTIFY', + 'From: ', + 'Subscription-State: active;expires=30', + 'Content-Type: application/watcherinfo\+xml', + 'sip:testuser1001@spce.test' + ] diff --git a/scenarios/presence/scenario.yml b/scenarios/presence/scenario.yml new file mode 100644 index 00000000..1b2b6ab2 --- /dev/null +++ b/scenarios/presence/scenario.yml @@ -0,0 +1,35 @@ +subscribers: + spce.test: + testuser1001: + password: testuser + cc: 43 + ac: 1 + sn: 1001 + testuser1002: + password: testuser + cc: 43 + ac: 1 + sn: 1002 + testuser1003: + password: testuser + cc: 43 + ac: 1 + sn: 1003 +presence: + - username: testuser1002 + domain: spce.test + allow: [ testuser1001@scpce.test ] +scenarios: + - ip: 127.126.0.1 + username: testuser1002 + domain: spce.test + responders: + - ip: 127.1.1.2 + username: testuser1002 + domain: spce.test + register: yes + active: no + - ip: 127.1.1.1 + username: testuser1001 + domain: spce.test + register: yes diff --git a/scenarios/presence/sipp_scenario00.xml b/scenarios/presence/sipp_scenario00.xml new file mode 100644 index 00000000..b54cbd02 --- /dev/null +++ b/scenarios/presence/sipp_scenario00.xml @@ -0,0 +1,483 @@ + + + + + + ;tag=[pid]SIPpTag00[call_number] + To: + Call-ID: [call_id] + CSeq: [cseq] SUBSCRIBE + Contact: sip:[field0 file="caller.csv"]@[local_ip]:[local_port] + Max-Forwards: 70 + Expires: 30 + Event: presence.winfo + Accept: application/watcherinfo+xml + Content-Length: [len] + + ]]> + + + + + + + + + ;tag=[pid]SIPpTag00[call_number] + To: [peer_tag_param] + Call-ID: [call_id] + CSeq: [cseq] ACK + Contact: sip:[field0 file="caller.csv"]@[local_ip]:[local_port] + Max-Forwards: 70 + Content-Length: [len] + + ]]> + + + + ;tag=[pid]SIPpTag00[call_number] + To: + Call-ID: [call_id] + CSeq: [cseq] SUBSCRIBE + Contact: sip:[field0 file="caller.csv"]@[local_ip]:[local_port] + [field1 file="caller.csv"] + Max-Forwards: 70 + Expires: 30 + Event: presence.winfo + Accept: application/watcherinfo+xml + Content-Length: [len] + + ]]> + + + + + + + + + + + + + + + + ;tag=[pid]SIPpTag00[call_number] + To: [peer_tag_param] + Call-ID: [call_id] + [routes] + CSeq: [cseq] ACK + Contact: sip:[field0 file="caller.csv"]@[local_ip]:[local_port] + Max-Forwards: 70 + Content-Length: 0 + + ]]> + + + + + + + Content-Length: [len] + + ]]> + + + + ;tag=[pid]SIPpTag00[call_number] + To: [peer_tag_param] + Call-ID: [call_id] + CSeq: [cseq] NOTIFY + Contact: sip:[field0 file="caller.csv"]@[local_ip]:[local_port] + Max-Forwards: 70 + Event: presence;winfo + Subscription-State: active;expires=15 + Content-Type: application/watcherinfo+xml + Content-Length: [len] + + + + + sip:[field0 file="callee.csv" line=1]@[field3 file="callee.csv" line=1] + + + + ]]> + + + + + + + + + ;tag=[pid]SIPpTag00[call_number] + To: [peer_tag_param] + Call-ID: [call_id] + CSeq: [cseq] ACK + Contact: sip:[field0 file="caller.csv"]@[local_ip]:[local_port] + Max-Forwards: 70 + Content-Length: 0 + + ]]> + + + + + + + Content-Length: [len] + + ]]> + + + + + + ;tag=[pid]SIPpTag00[call_number] + To: [peer_tag_param] + Call-ID: [call_id] + CSeq: [cseq] NOTIFY + Contact: sip:[field0 file="caller.csv"]@[local_ip]:[local_port] + [field1 file="caller.csv"] + Max-Forwards: 70 + Event: presence;winfo + Subscription-State: active;expires=15 + Content-Type: application/watcherinfo+xml + Content-Length: [len] + + + + + sip:[field0 file="callee.csv" line=1]@[field3 file="callee.csv" line=1] + + + + ]]> + + + + + + + + + + + + + + + + ;tag=[pid]SIPpTag00[call_number] + To: [peer_tag_param] + Call-ID: [call_id] + [routes] + CSeq: [cseq] ACK + Contact: sip:[field0 file="caller.csv"]@[local_ip]:[local_port] + Max-Forwards: 70 + Content-Length: [len] + + ]]> + + + + ;tag=[pid]SIPpTag00[call_number] + To: + Call-ID: [call_id] + CSeq: [cseq] PUBLISH + Contact: sip:[field0 file="caller.csv"]@[local_ip]:[local_port] + Max-Forwards: 70 + Expires: 30 + Allow: REFER, UPDATE, INFO, OPTIONS, ACK, INVITE, BYE, CANCEL, NOTIFY, SUBSCRIBE + Supported: timer,replaces + Event: presence + Content-Type: application/pidf+xml + Content-Length: [len] + +open + + ]]> + + + + + + + + + ;tag=[pid]SIPpTag00[call_number] + To: [peer_tag_param] + Call-ID: [call_id] + CSeq: [cseq] ACK + Contact: sip:[field0 file="caller.csv"]@[local_ip]:[local_port] + Max-Forwards: 70 + Content-Length: [len] + + ]]> + + + + + + ;tag=[pid]SIPpTag00[call_number] + To: + Call-ID: [call_id] + CSeq: [cseq] PUBLISH + Contact: sip:[field0 file="caller.csv"]@[local_ip]:[local_port] + [field1 file="caller.csv"] + Max-Forwards: 70 + Expires: 30 + Allow: REFER, UPDATE, INFO, OPTIONS, ACK, INVITE, BYE, CANCEL, NOTIFY, SUBSCRIBE + Supported: timer,replaces + Event: presence + Content-Type: application/pidf+xml + Content-Length: [len] + +open + + ]]> + + + + + + + + + + + + + + + + ;tag=[pid]SIPpTag00[call_number] + To: [peer_tag_param] + Call-ID: [call_id] + [routes] + CSeq: [cseq] ACK + Contact: sip:[field0 file="caller.csv"]@[local_ip]:[local_port] + Max-Forwards: 70 + Content-Length: [len] + + ]]> + + + + + ;tag=[pid]SIPpTag00[call_number] + To: [peer_tag_param] + Call-ID: [call_id] + CSeq: [cseq] SUBSCRIBE + Contact: sip:[field0 file="caller.csv"]@[local_ip]:[local_port] + Max-Forwards: 70 + Event: presence;winfo + Expires: 0 + Accept: application/watcherinfo+xml + Content-Length: [len] + + ]]> + + + + + + + + + ;tag=[pid]SIPpTag00[call_number] + To: [peer_tag_param] + Call-ID: [call_id] + CSeq: [cseq] SUBSCRIBE + Contact: sip:[field0 file="caller.csv"]@[local_ip]:[local_port] + [field1 file="caller.csv"] + Max-Forwards: 70 + Expires: 0 + Event: presence;winfo + Accept: application/watcherinfo+xml + Content-Length: [len] + + ]]> + + + + + + + + + + + + + + + + ;tag=[pid]SIPpTag00[call_number] + To: [peer_tag_param] + Call-ID: [call_id] + [routes] + CSeq: [cseq] ACK + Contact: sip:[field0 file="caller.csv"]@[local_ip]:[local_port] + Max-Forwards: 70 + Content-Length: 0 + + ]]> + + + + + + + Content-Length: [len] + + ]]> + + + + + + + Content-Length: [len] + + ]]> + + + + + + + Content-Length: [len] + + ]]> + + + + + + + Content-Length: [len] + + ]]> + + + + + + + + From: ;tag=[pid] + Call-ID: [call_id] + CSeq: [cseq] SUBSCRIBE + Max-Forwards: 70 + Event: presence + Accept: application/pidf+xml + Contact: + Expires: 0 + Content-Length: 0 + + ]]> + + + + + + + + + ;tag=[pid] + To: [peer_tag_param] + Call-ID: [call_id] + CSeq: [cseq] ACK + Contact: + Max-Forwards: 70 + Content-Length: 0 + + ]]> + + + + + From: ;tag=[pid] + Call-ID: [call_id] + CSeq: [cseq] SUBSCRIBE + Max-Forwards: 70 + [field2 file="callee.csv" line=1] + Event: presence + Accept: application/pidf+xml + Contact: + Expires: 30 + Content-Length: 0 + + ]]> + + + + + + + + + + + + + + Content-Length: [len] + + ]]> + + + + + + +