-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
app_dial: Add tests for new option "j" - preserve topology
- Loading branch information
1 parent
09a501f
commit d9b7d1d
Showing
8 changed files
with
687 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
[general] | ||
|
||
[globals] | ||
|
||
[calling] | ||
exten => bob,1,NoOp() | ||
same => n,Dial(PJSIP/bob,1,jg) | ||
same => n,NoOp() | ||
same => n,Dial(PJSIP/carol,,j) | ||
same => n,Hangup() | ||
|
||
exten => no_pres,1,NoOp() | ||
same => n,Dial(PJSIP/bob,1,g) | ||
same => n,NoOp() | ||
same => n,Dial(PJSIP/carol) | ||
same => n,Hangup() | ||
|
||
exten => part_pres,1,NoOp() | ||
same => n,Dial(PJSIP/bob,1,g) | ||
same => n,NoOp() | ||
same => n,Dial(PJSIP/carol,,j) | ||
same => n,Hangup() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
[system] | ||
type=system | ||
timer_t1=100 | ||
timer_b=6400 | ||
|
||
[global] | ||
type=global | ||
debug=yes | ||
allow_sending_180_after_183=yes | ||
|
||
[local-transport] | ||
type=transport | ||
bind=127.0.0.1 | ||
protocol=udp | ||
|
||
[alice] | ||
type=endpoint | ||
allow=g722,ulaw,alaw,h264,h263 | ||
context=calling | ||
direct_media=no | ||
inband_progress=yes | ||
media_address=127.0.0.1 | ||
aors=alice | ||
|
||
[bob] | ||
type=endpoint | ||
allow=g722,ulaw,alaw,h264,h263 | ||
context=calling | ||
direct_media=no | ||
inband_progress=yes | ||
media_address=127.0.0.1 | ||
aors=bob | ||
|
||
[bob] | ||
type=aor | ||
max_contacts=1 | ||
contact=sip:[email protected]:5060\;transport=udp | ||
|
||
[carol] | ||
type=endpoint | ||
allow=g722,ulaw,alaw,h264,h263 | ||
context=calling | ||
direct_media=no | ||
inband_progress=yes | ||
media_address=127.0.0.1 | ||
aors=carol | ||
|
||
[carol] | ||
type=aor | ||
max_contacts=1 | ||
contact=sip:[email protected]:5060\;transport=udp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
<?xml version="1.0" encoding="ISO-8859-1" ?> | ||
|
||
<scenario name="Send Call"> | ||
|
||
<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: <sip:alice@[local_ip]:[local_port]>;tag=[pid]SIPpTag[call_number] | ||
To: <sip:[service]@[remote_ip]:[remote_port]> | ||
Call-ID: [call_id] | ||
CSeq: [cseq] INVITE | ||
Contact: <sip:alice@[local_ip]:[local_port];transport=[transport]> | ||
Max-Forwards: 70 | ||
Content-Type: application/sdp | ||
Content-Length: [len] | ||
v=0 | ||
o=- 53655765 2353687637 IN IP[local_ip_type] [local_ip] | ||
s=- | ||
c=IN IP[media_ip_type] [media_ip] | ||
t=0 0 | ||
m=audio [custom_media_port] RTP/AVP 9 0 8 | ||
a=rtpmap:0 PCMU/8000 | ||
a=rtpmap:8 PCMA/8000 | ||
a=rtpmap:9 G722/8000 | ||
a=sendrecv | ||
m=video 6000 RTP/AVP 99 34 | ||
a=rtpmap:99 H264/90000 | ||
a=rtpmap:34 H263/90000 | ||
a=sendrecv | ||
]]> | ||
</send> | ||
|
||
<recv response="100" optional="true" /> | ||
<recv response="180" /> | ||
|
||
<recv response="183" rtd="true"> | ||
</recv> | ||
|
||
<recv response="200" rtd="true"> | ||
<!-- Save the To tag. --> | ||
<action> | ||
<ereg regexp="(;tag=.*)" | ||
header="To:" | ||
search_in="hdr" | ||
check_it="true" | ||
assign_to="remote_tag"/> | ||
</action> | ||
</recv> | ||
|
||
<send> | ||
<![CDATA[ | ||
ACK sip:[service]@[remote_ip]:[remote_port] SIP/2.0 | ||
[last_Via:] | ||
[last_From:] | ||
[last_To:] | ||
Call-ID: [call_id] | ||
CSeq: [cseq] ACK | ||
Contact: <sip:alice@[local_ip]:[local_port];transport=[transport]> | ||
Max-Forwards: 70 | ||
Content-Length: 0 | ||
]]> | ||
</send> | ||
|
||
<recv request="INVITE" crlf="true" /> | ||
|
||
<send retrans="500"> | ||
<![CDATA[ | ||
SIP/2.0 200 OK | ||
[last_Via:] | ||
[last_From:] | ||
[last_To:];tag=[pid]SIPpTag[call_number] | ||
[last_Call-ID:] | ||
[last_CSeq:] | ||
Contact: <sip:bob@[local_ip]:[local_port];transport=[transport]> | ||
Content-Type: application/sdp | ||
Content-Length: [len] | ||
v=0 | ||
o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip] | ||
s=- | ||
c=IN IP[media_ip_type] [media_ip] | ||
t=0 0 | ||
m=audio [custom_media_port] RTP/AVP 0 | ||
a=rtpmap:0 PCMU/8000 | ||
a=sendrecv | ||
m=video 6000 RTP/AVP 99 | ||
a=rtpmap:99 H264/90000 | ||
a=sendonly | ||
]]> | ||
</send> | ||
|
||
<recv request="ACK" crlf="true" /> | ||
|
||
<pause milliseconds="2000" /> | ||
|
||
<send retrans="500"> | ||
<![CDATA[ | ||
BYE sip:[service]@[remote_ip]:[remote_port] SIP/2.0 | ||
[last_Via:] | ||
From: <sip:alice@[local_ip]:[local_port]>;tag=[pid]SIPpTag[call_number] | ||
To: <sip:[service]@[remote_ip]:[remote_port]>[$remote_tag] | ||
Call-ID: [call_id] | ||
CSeq: [cseq] BYE | ||
Contact: sip:alice@[local_ip]:[local_port] | ||
Max-Forwards: 70 | ||
Subject: Codec Negotiation Test | ||
Content-Length: 0 | ||
]]> | ||
</send> | ||
|
||
<recv response="200" crlf="true"> | ||
</recv> | ||
|
||
</scenario> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
<?xml version="1.0" encoding="ISO-8859-1" ?> | ||
<!DOCTYPE scenario SYSTEM "sipp.dtd"> | ||
|
||
<scenario name="Basic UAS responder"> | ||
|
||
<recv request="INVITE" crlf="true"> | ||
<action> | ||
<ereg regexp="sip:[^;>]+" | ||
header="Contact:" | ||
search_in="hdr" | ||
check_it="true" | ||
assign_to="contact_h"/> | ||
</action> | ||
</recv> | ||
|
||
<send> | ||
<![CDATA[ | ||
SIP/2.0 180 Ringing | ||
[last_Via:] | ||
[last_From:] | ||
[last_To:];tag=[pid]SIPpTag[call_number] | ||
[last_Call-ID:] | ||
[last_CSeq:] | ||
Contact: <sip:bob@[local_ip]:[local_port];transport=[transport]> | ||
Content-Length: 0 | ||
]]> | ||
</send> | ||
|
||
<pause milliseconds="200" /> | ||
|
||
<send> | ||
<![CDATA[ | ||
SIP/2.0 183 Progress | ||
[last_Via:] | ||
[last_From:] | ||
[last_To:];tag=[pid]SIPpTag[call_number] | ||
[last_Call-ID:] | ||
[last_CSeq:] | ||
Contact: <sip:bob@[local_ip]:[local_port];transport=[transport]> | ||
Content-Type: application/sdp | ||
Content-Length: [len] | ||
v=0 | ||
o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip] | ||
s=- | ||
c=IN IP[media_ip_type] [media_ip] | ||
t=0 0 | ||
m=audio [custom_media_port] RTP/AVP 0 | ||
a=inactive | ||
a=rtpmap:0 PCMU/8000 | ||
m=video 6000 RTP/AVP 99 | ||
a=rtpmap:99 H264/90000 | ||
a=recvonly | ||
]]> | ||
</send> | ||
|
||
<pause milliseconds="200" /> | ||
|
||
<send> | ||
<![CDATA[ | ||
SIP/2.0 200 OK | ||
[last_Via:] | ||
[last_From:] | ||
[last_To:];tag=[pid]SIPpTag[call_number] | ||
[last_Call-ID:] | ||
[last_CSeq:] | ||
Contact: <sip:bob@[local_ip]:[local_port];transport=[transport]> | ||
Content-Type: application/sdp | ||
Content-Length: [len] | ||
v=0 | ||
o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip] | ||
s=- | ||
c=IN IP[media_ip_type] [media_ip] | ||
t=0 0 | ||
m=audio [custom_media_port] RTP/AVP 0 | ||
a=inactive | ||
a=rtpmap:0 PCMU/8000 | ||
m=video 6000 RTP/AVP 99 | ||
a=rtpmap:99 H264/90000 | ||
a=recvonly | ||
]]> | ||
</send> | ||
|
||
<recv request="ACK" | ||
rtd="true" | ||
crlf="true"> | ||
<action> | ||
<ereg regexp="(.*)" | ||
header="To:" | ||
search_in="hdr" | ||
check_it="true" | ||
assign_to="to_h"/> | ||
<ereg regexp="(.*)" | ||
header="From:" | ||
search_in="hdr" | ||
check_it="true" | ||
assign_to="from_h"/> | ||
</action> | ||
</recv> | ||
|
||
<pause milliseconds="500" /> | ||
|
||
<send retrans="500"> | ||
<![CDATA[ | ||
BYE [$contact_h] SIP/2.0 | ||
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch] | ||
From:[$to_h] | ||
To:[$from_h] | ||
[last_Call-ID:] | ||
CSeq: [cseq] BYE | ||
Max-Forwards: 70 | ||
]]> | ||
</send> | ||
|
||
<recv response="200" crlf="true"> | ||
</recv> | ||
|
||
<ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/> | ||
|
||
<CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/> | ||
|
||
</scenario> | ||
|
Oops, something went wrong.