Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[default]

exten => bob,1,Dial(PJSIP/bob)
same => n,Hangup()
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
[global]
type=global
rfc7329_enable=no

[transport-udp]
type=transport
protocol=udp
bind=127.0.0.1:5060

[endpoint-template](!)
type=endpoint
transport=transport-udp
context=default
identify_by=ip
direct_media=no
disallow=all
allow=ulaw

[aor-template](!)
type=aor
max_contacts=1

[alice](aor-template)
contact=sip:alice@127.0.0.1:5061

[alice](endpoint-template)
aors=alice

[bob](aor-template)
contact=sip:bob@127.0.0.1:5062

[bob](endpoint-template)
aors=bob

[alice-identify]
type=identify
endpoint=alice
match=127.0.0.1:5061

[bob-identify]
type=identify
endpoint=bob
match=127.0.0.1:5062
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE scenario SYSTEM "sipp.dtd">

<scenario name="RFC7329 disabled caller with Session-ID">
<User variables="nosid_180,nosid_200,nosid_bye_200" />

<send retrans="500">
<![CDATA[

INVITE sip:[service]@[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: alice <sip:alice@[local_ip]:[local_port]>;tag=[call_number]
To: bob <sip:[service]@[remote_ip]:[remote_port]>
Call-ID: [call_id]
CSeq: 1 INVITE
Session-ID: 13579bdf2468ace013579bdf2468ace0
Contact: <sip:alice@[local_ip]:[local_port];transport=[transport]>
Max-Forwards: 70
Subject: Test
Content-Type: application/sdp
Content-Length: [len]

v=0
o=alice 53655765 2353687637 IN IP[local_ip_type] [local_ip]
s=-
c=IN IP[media_ip_type] [media_ip]
t=0 0
m=audio [media_port] RTP/AVP 0
a=rtpmap:0 PCMU/8000

]]>
</send>

<recv response="100" optional="true" />

<recv response="180" crlf="true">
<action>
<ereg regexp="Session-ID: .*"
search_in="msg"
check_it_inverse="true"
assign_to="nosid_180" />
</action>
</recv>

<recv response="200" rtd="true" crlf="true">
<action>
<ereg regexp="Session-ID: .*"
search_in="msg"
check_it_inverse="true"
assign_to="nosid_200" />
</action>
</recv>

<send>
<![CDATA[

ACK sip:[service]@[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: alice <sip:alice@[local_ip]:[local_port]>;tag=[call_number]
To: bob <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]
Call-ID: [call_id]
CSeq: 1 ACK
Session-ID: 13579bdf2468ace013579bdf2468ace0
Contact: <sip:alice@[local_ip]:[local_port];transport=[transport]>
Max-Forwards: 70
Content-Length: 0

]]>
</send>

<pause milliseconds="1000"/>

<send retrans="500">
<![CDATA[

BYE sip:[service]@[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: alice <sip:alice@[local_ip]:[local_port]>;tag=[call_number]
To: bob <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]
Call-ID: [call_id]
CSeq: 2 BYE
Session-ID: 13579bdf2468ace013579bdf2468ace0
Contact: <sip:alice@[local_ip]:[local_port];transport=[transport]>
Max-Forwards: 70
Content-Length: 0

]]>
</send>

<recv response="200" crlf="true">
<action>
<ereg regexp="Session-ID: .*"
search_in="msg"
check_it_inverse="true"
assign_to="nosid_bye_200" />
</action>
</recv>

<Reference variables="nosid_180,nosid_200,nosid_bye_200" />
</scenario>
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE scenario SYSTEM "sipp.dtd">

<scenario name="RFC7329 disabled callee with Session-ID">
<User variables="nosid_invite,nosid_ack,nosid_bye" />

<recv request="INVITE" crlf="true">
<action>
<ereg regexp="Session-ID: .*"
search_in="msg"
check_it_inverse="true"
assign_to="nosid_invite" />
</action>
</recv>

<send>
<![CDATA[

SIP/2.0 180 Ringing
[last_Via:]
[last_From:]
[last_To:];tag=[pid]SIPpTag01[call_number]
[last_Call-ID:]
[last_CSeq:]
Session-ID: abcdefabcdefabcdefabcdefabcdefab
Contact: <sip:[local_ip]:[local_port];transport=[transport]>
Content-Length: 0

]]>
</send>

<send retrans="500">
<![CDATA[

SIP/2.0 200 OK
[last_Via:]
[last_From:]
[last_To:];tag=[pid]SIPpTag01[call_number]
[last_Call-ID:]
[last_CSeq:]
Session-ID: abcdefabcdefabcdefabcdefabcdefab
Contact: <sip:[local_ip]:[local_port];transport=[transport]>
Content-Type: application/sdp
Content-Length: [len]

v=0
o=bob 53655765 2353687637 IN IP[local_ip_type] [local_ip]
s=-
c=IN IP[media_ip_type] [media_ip]
t=0 0
m=audio [media_port] RTP/AVP 0
a=rtpmap:0 PCMU/8000

]]>
</send>

<recv request="ACK" crlf="true">
<action>
<ereg regexp="Session-ID: .*"
search_in="msg"
check_it_inverse="true"
assign_to="nosid_ack" />
</action>
</recv>

<recv request="BYE" crlf="true">
<action>
<ereg regexp="Session-ID: .*"
search_in="msg"
check_it_inverse="true"
assign_to="nosid_bye" />
</action>
</recv>

<send retrans="500">
<![CDATA[

SIP/2.0 200 OK
[last_Via:]
[last_From:]
[last_To:]
[last_Call-ID:]
[last_CSeq:]
Content-Length: 0

]]>
</send>

<Reference variables="nosid_invite,nosid_ack,nosid_bye" />
</scenario>
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
testinfo:
summary: 'RFC7329 disabled: with_sid caller/callee only'
description: |
'With rfc7329_enable=no, both caller and callee send Session-ID,
but Asterisk must not inject Session-ID on forwarded in-dialog
requests and responses.'

test-modules:
test-object:
config-section: test-object-config
typename: 'sipp.SIPpTestCase'

test-object-config:
memcheck-delay-stop: 7
test-iterations:
-
scenarios:
- { 'key-args': {'scenario': 'bob_with_sid.xml', '-i': '127.0.0.1', '-p': '5062'} }
- { 'key-args': {'scenario': 'alice_with_sid.xml', '-i': '127.0.0.1', '-p': '5061', '-s': 'bob'} }

properties:
dependencies:
- app: 'sipp'
- asterisk: 'app_dial'
- asterisk: 'chan_pjsip'
- asterisk: 'res_pjsip'
- asterisk: 'res_pjsip_session'
- asterisk: 'res_pjsip_rfc7329'
tags:
- pjsip
- rfc7329
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
[global]
type=global
rfc7329_enable=no

[transport-udp]
type=transport
protocol=udp
bind=127.0.0.1:5060

[endpoint-template](!)
type=endpoint
transport=transport-udp
context=default
identify_by=username
direct_media=no
disallow=all
allow=ulaw

[aor-template](!)
type=aor
max_contacts=1

[auth-template](!)
type=auth
auth_type=userpass

[alice](aor-template)

[alice](endpoint-template)
aors=alice
auth=alice-auth

[alice-auth](auth-template)
username=alice
password=alicepass

[bob](aor-template)

[bob](endpoint-template)
aors=bob
auth=bob-auth

[bob-auth](auth-template)
username=bob
password=bobpass
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE scenario SYSTEM "sipp.dtd">

<scenario name="RFC7329 alice register">
<User variables="nosid_401,nosid_200" />

<send retrans="500">
<![CDATA[

REGISTER sip:[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: alice <sip:alice@[local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number]
To: alice <sip:alice@[remote_ip]:[remote_port]>
Call-ID: [call_id]
CSeq: 1 REGISTER
Session-ID: 13579bdf2468ace013579bdf2468ace0
Contact: <sip:alice@[local_ip]:[local_port];transport=[transport]>
Max-Forwards: 70
Expires: 300
Content-Length: 0

]]>
</send>

<recv response="401" auth="true" crlf="true">
<action>
<ereg regexp="Session-ID: .*"
search_in="msg"
check_it_inverse="true"
assign_to="nosid_401" />
</action>
</recv>

<send retrans="500">
<![CDATA[

REGISTER sip:[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: alice <sip:alice@[local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number]
To: alice <sip:alice@[remote_ip]:[remote_port]>
Call-ID: [call_id]
CSeq: 2 REGISTER
Session-ID: 13579bdf2468ace013579bdf2468ace0
Contact: <sip:alice@[local_ip]:[local_port];transport=[transport]>
Max-Forwards: 70
Expires: 300
[authentication username=alice password=alicepass]
Content-Length: 0

]]>
</send>

<recv response="200" crlf="true">
<action>
<ereg regexp="Session-ID: .*"
search_in="msg"
check_it_inverse="true"
assign_to="nosid_200" />
</action>
</recv>

<Reference variables="nosid_401,nosid_200" />
</scenario>
Loading