Skip to content
Merged
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 => user1,1,NoOp()
same => n,MessageSend(pjsip:user1)
same => n,Hangup()
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[local]
type=transport
protocol=udp
bind=0.0.0.0

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[user]
type=aor
contact=sip:user@127.0.0.1:5061
max_contacts=1

[user]
type=endpoint
context=default
aors=user
direct_media=no
disallow=all
allow=ulaw

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[user1]
type=aor
contact=sip:user1@127.0.0.1:5062
max_contacts=1

[user1]
type=endpoint
context=default
aors=user1
direct_media=no
disallow=all
allow=ulaw
21 changes: 21 additions & 0 deletions tests/channels/pjsip/message/message_out_dialog/sipp/message.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<scenario name="Message No contact">
<send retrans="500">
<![CDATA[
MESSAGE sip:user1@127.0.0.1:5062 SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: user <sip:user@[local_ip]:[local_port]>;tag=[pid]bit[call_number]
To: user1 <sip:user1@127.0.0.1:5062>
Contact: <sip:user@[local_ip]:[local_port]>
Call-ID: [call_id]
CSeq: 1 MESSAGE
Max-Forwards: 70
Content-Type: text/plain
Content-Length: 11

Hello World
]]>
</send>

<recv response="202" />
</scenario>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<scenario name="Message No Contact">
<recv request="MESSAGE" crlf="true">
<action>
<ereg search_in="hdr" header="Contact:" regexp=".+" check_it_inverse="true" assign_to="1"/>
<log message="Detected Contact header: [$1]"/>
</action>
</recv>

<send>
<![CDATA[
SIP/2.0 202 Accepted
[last_Via:]
[last_From:]
[last_To:];tag=[call_number]
[last_Call-ID:]
[last_CSeq:]
Content-Length: 0
]]>
</send>

</scenario>
25 changes: 25 additions & 0 deletions tests/channels/pjsip/message/message_out_dialog/test-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
testinfo:
summary: 'Verify RFC 3428 compliance: No Contact header in MESSAGE'
description: 'Ensures msg_send strips Contact headers from out-of-dialog MESSAGE.'

properties:
dependencies:
- app : 'sipp'
- asterisk : 'res_pjsip'
- asterisk : 'res_pjsip_messaging'
tags:
- pjsip

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

test-object-config:
test-object-config:
test-iterations:
-
scenarios:
- { 'key-args': { 'scenario':'message_recv.xml', '-p':'5062' } }
- { 'key-args': { 'scenario':'message.xml', '-p':'5061' } }

1 change: 1 addition & 0 deletions tests/channels/pjsip/message/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ tests:
- test: 'message_to_uri'
- test: 'message_confbridge'
- test: 'message_destination_parsing'
- test: 'message_out_dialog'
Loading