[Asterisk-code-review] res_pjsip_sdp_rtp: implement full state machine for MOH_PASSTHROUGH (testsuite[13])
Kevin Harwell
asteriskteam at digium.com
Tue Mar 3 15:10:41 CST 2020
Kevin Harwell has posted comments on this change. ( https://gerrit.asterisk.org/c/testsuite/+/13803 )
Change subject: res_pjsip_sdp_rtp: implement full state machine for MOH_PASSTHROUGH
......................................................................
Patch Set 7: Code-Review-1
(15 comments)
https://gerrit.asterisk.org/c/testsuite/+/13803/7/tests/channels/pjsip/moh_passthru_inactive/sipp/uac_cluster_hold_reinvite.xml
File tests/channels/pjsip/moh_passthru_inactive/sipp/uac_cluster_hold_reinvite.xml:
https://gerrit.asterisk.org/c/testsuite/+/13803/7/tests/channels/pjsip/moh_passthru_inactive/sipp/uac_cluster_hold_reinvite.xml@63
PS7, Line 63: <!-- Packet lost can be simulated in any send/recv message by -->
: <!-- by adding the 'lost = "10"'. Value can be [1-100] percent. -->
Remove this comment as you're not doing packet loss testing.
https://gerrit.asterisk.org/c/testsuite/+/13803/7/tests/channels/pjsip/moh_passthru_inactive/sipp/uac_cluster_hold_reinvite.xml@84
PS7, Line 84: <action>
: <ereg regexp="a=sendonly" search_in="body" check_it="true" assign_to="9"/>
: <ereg regexp="[[:punct:]](.*)[[:punct:]]" search_in="hdr" header="Contact:" check_it="true" assign_to="6,1" />
: <ereg regexp=".*" search_in="hdr" header="From:" check_it="true" assign_to="2" />
: <ereg regexp=".*" search_in="hdr" header="To:" check_it="true" assign_to="3" />
: </action>
Fix mixing of tabs and spaces.
https://gerrit.asterisk.org/c/testsuite/+/13803/7/tests/channels/pjsip/moh_passthru_inactive/sipp/uac_cluster_hold_reinvite.xml@141
PS7, Line 141: Content-Length: [len]
red blob/extra space at EOL.
https://gerrit.asterisk.org/c/testsuite/+/13803/7/tests/channels/pjsip/moh_passthru_inactive/sipp/uac_cluster_hold_reinvite.xml@230
PS7, Line 230: <ereg regexp="a=sendonly" search_in="body" check_it="true" assign_to="11"/>
tab vs space here
https://gerrit.asterisk.org/c/testsuite/+/13803/7/tests/channels/pjsip/moh_passthru_inactive/sipp/uac_cluster_hold_reinvite.xml@126
PS7, Line 126: <pause milliseconds="500"/>
:
: <send retrans="500">
: <![CDATA[
:
: INVITE [$1] SIP/2.0
: Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
: [last_Call-ID:]
: From: [$3];tag=[call_number]
: To: [$2]
: CSeq: 2 INVITE
: Contact: <sip:[local_ip]:[local_port]>
: Max-Forwards: 70
: Content-Type: application/sdp
: [routes]
: Content-Length: [len]
:
: v=0
: o=HuaweiSoftX3000 6644052 6644052 IN IP[local_ip_type] [local_ip]
: s=Sip Call
: c=IN IP[media_ip_type] [media_ip]
: t=0 0
: m=audio [media_port] RTP/AVP 8 0 18 101
: a=rtpmap:8 PCMA/8000
: a=rtpmap:0 PCMU/8000
: a=rtpmap:18 G729/8000
: a=rtpmap:101 telephone-event/8000
: a=fmtp:101 0-15
: a=inactive
:
: ]]>
: </send>
:
: <recv response="100" optional="true">
: </recv>
:
: <recv response="100" optional="true">
: </recv>
:
: <recv response="200" rtd="true" crlf="true">
: <action>
: <ereg regexp="a=inactive" search_in="body" check_it="true" assign_to="10"/>
: </action>
: </recv>
: <Reference variables="10"/>
:
:
: <send>
: <![CDATA[
:
: ACK [$1] SIP/2.0
: Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
: [last_Call-ID:]
: From: [$3];tag=[call_number]
: To: [$2]
: CSeq: 2 ACK
: Max-Forwards: 70
: Content-Length: 0
: [routes]
:
: ]]>
: </send>
:
: <pause milliseconds="500"/>
:
: <send retrans="500">
: <![CDATA[
:
: INVITE [$1] SIP/2.0
: Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
: [last_Call-ID:]
: From: [$3];tag=[call_number]
: To: [$2]
: CSeq: 3 INVITE
: Contact: <sip:[local_ip]:[local_port]>
: Max-Forwards: 70
: Content-Type: application/sdp
: [routes]
: Content-Length: [len]
:
: v=0
: o=HuaweiSoftX3000 6644052 6644052 IN IP[local_ip_type] [local_ip]
: s=Sip Call
: c=IN IP[media_ip_type] [media_ip]
: t=0 0
: m=audio [media_port] RTP/AVP 8 0 18 101
: a=rtpmap:8 PCMA/8000
: a=rtpmap:0 PCMU/8000
: a=rtpmap:18 G729/8000
: a=rtpmap:101 telephone-event/8000
: a=fmtp:101 0-15
: a=recvonly
:
: ]]>
: </send>
:
: <recv response="100" optional="true">
: </recv>
:
: <recv response="100" optional="true">
: </recv>
:
: <recv response="200" rtd="true" crlf="true">
: <action>
: <ereg regexp="a=sendonly" search_in="body" check_it="true" assign_to="11"/>
: </action>
: </recv>
: <Reference variables="11"/>
:
:
: <send>
: <![CDATA[
:
: ACK [$1] SIP/2.0
: Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
: [last_Call-ID:]
: From: [$3];tag=[call_number]
: To: [$2]
: CSeq: 3 ACK
: Max-Forwards: 70
: Content-Length: 0
: [routes]
:
: ]]>
: </send>
Indention this section to align with the others before/after it.
https://gerrit.asterisk.org/c/testsuite/+/13803/7/tests/channels/pjsip/moh_passthru_inactive/sipp/uac_cluster_hold_reinvite.xml@279
PS7, Line 279: <!-- definition of the response time repartition table (unit is ms) -->
: <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
:
: <!-- definition of the call length repartition table (unit is ms) -->
: <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
Should need these so can be removed.
https://gerrit.asterisk.org/c/testsuite/+/13803/7/tests/channels/pjsip/moh_passthru_inactive/sipp/uas_hold_reinvite.xml
File tests/channels/pjsip/moh_passthru_inactive/sipp/uas_hold_reinvite.xml:
https://gerrit.asterisk.org/c/testsuite/+/13803/7/tests/channels/pjsip/moh_passthru_inactive/sipp/uas_hold_reinvite.xml@11
PS7, Line 11: <log message="Log to avoid the problem of not using $6 [$6]"/>
tab vs space. Actually here you can remove this log line and just use a Reference element
https://gerrit.asterisk.org/c/testsuite/+/13803/7/tests/channels/pjsip/moh_passthru_inactive/sipp/uas_hold_reinvite.xml@82
PS7, Line 82: Content-Length: [len]
red blob at EOL.
https://gerrit.asterisk.org/c/testsuite/+/13803/7/tests/channels/pjsip/moh_passthru_inactive/sipp/uas_hold_reinvite.xml@108
PS7, Line 108: <ereg regexp="a=recvonly" search_in="body" check_it="true" assign_to="9"/>
tab vs space
https://gerrit.asterisk.org/c/testsuite/+/13803/7/tests/channels/pjsip/moh_passthru_inactive/sipp/uas_hold_reinvite.xml@7
PS7, Line 7: <action>
: <ereg regexp="[[:punct:]](.*)[[:punct:]]" search_in="hdr" header="Contact:" check_it="true" assign_to="6,1" />
: <ereg regexp=".*" search_in="hdr" header="From:" check_it="true" assign_to="2" />
: <ereg regexp=".*" search_in="hdr" header="To:" check_it="true" assign_to="3" />
: <log message="Log to avoid the problem of not using $6 [$6]"/>
:
: </action>
:
: </recv>
:
:
:
: <send>
: <![CDATA[
:
: SIP/2.0 100 Trying
: [last_Via:]
: [last_Call-ID:]
: [last_From:]
: [last_To:]
: [last_CSeq:]
: Content-Length: 0
:
: ]]>
: </send>
:
: <send retrans="500">
: <![CDATA[
:
: SIP/2.0 200 OK
: [last_Via:]
: [last_Call-ID:]
: [last_From:]
: [last_To:];tag=[call_number]
: [last_CSeq:]
: Contact: <sip:736596371553211257@[local_ip]:[local_port];user=phone>
: Content-Type: application/sdp
: [last_Record-Route]
: Content-Length: [len]
:
: v=0
: o=HuaweiSoftX3000 6644052 6644052 IN IP[local_ip_type] [local_ip]
: s=Sip Call
: c=IN IP[media_ip_type] [media_ip]
: t=0 0
: m=audio [media_port] RTP/AVP 8 0 18 101
: a=rtpmap:8 PCMA/8000
: a=rtpmap:0 PCMU/8000
: a=rtpmap:18 G729/8000
: a=rtpmap:101 telephone-event/8000
: a=fmtp:101 0-15
:
: ]]>
: </send>
:
: <recv request="ACK"
: rtd="true"
: crlf="true">
: </recv>
:
: <pause milliseconds="500"/>
:
: <send retrans="500">
: <![CDATA[
:
: INVITE [$1] SIP/2.0
: Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
: [last_Call-ID:]
: From: [$3];tag=[call_number]
: To: [$2]
: CSeq: 1 INVITE
: Contact: <sip:[local_ip]:[local_port]>
: Max-Forwards: 70
: Content-Type: application/sdp
: [routes]
: Content-Length: [len]
:
: v=0
: o=HuaweiSoftX3000 6644052 6644052 IN IP[local_ip_type] [local_ip]
: s=Sip Call
: c=IN IP[media_ip_type] 0.0.0.0
: t=0 0
: m=audio [media_port] RTP/AVP 8 0 18 101
: a=rtpmap:8 PCMA/8000
: a=rtpmap:0 PCMU/8000
: a=rtpmap:18 G729/8000
: a=rtpmap:101 telephone-event/8000
: a=fmtp:101 0-15
: a=sendonly
:
: ]]>
: </send>
:
: <recv response="100" optional="true">
: </recv>
:
: <recv response="100" optional="true">
: </recv>
:
: <recv response="200" rtd="true" crlf="true">
: <action>
: <ereg regexp="a=recvonly" search_in="body" check_it="true" assign_to="9"/>
: </action>
: </recv>
: <Reference variables="9"/>
:
:
: <send>
: <![CDATA[
:
: ACK [$1] SIP/2.0
: Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
: [last_Call-ID:]
: From: [$3];tag=[call_number]
: To: [$2]
: CSeq: 1 ACK
: Max-Forwards: 70
: Content-Length: 0
: [routes]
:
: ]]>
: </send>
indent and align formatting.
https://gerrit.asterisk.org/c/testsuite/+/13803/7/tests/channels/pjsip/moh_passthru_inactive/sipp/uas_hold_reinvite.xml@131
PS7, Line 131: <action>
: <ereg regexp="a=inactive" search_in="body" check_it="true" assign_to="10"/>
: </action>
tabs vs spaces
https://gerrit.asterisk.org/c/testsuite/+/13803/7/tests/channels/pjsip/moh_passthru_inactive/sipp/uas_hold_reinvite.xml@170
PS7, Line 170: <action>
: <ereg regexp="a=recvonly" search_in="body" check_it="true" assign_to="11"/>
: </action>
tabs vs spaces
https://gerrit.asterisk.org/c/testsuite/+/13803/7/tests/channels/pjsip/moh_passthru_inactive/sipp/uas_hold_reinvite.xml@215
PS7, Line 215:
red blob
https://gerrit.asterisk.org/c/testsuite/+/13803/7/tests/channels/pjsip/moh_passthru_inactive/sipp/uas_hold_reinvite.xml@210
PS7, Line 210: <recv request="BYE">
: </recv>
:
: <send>
: <![CDATA[
:
: SIP/2.0 200 OK
: [last_Via:]
: [last_From:]
: [last_To:]
: [last_Call-ID:]
: [last_CSeq:]
: Content-Length: 0
:
: ]]>
: </send>
:
:
: <!-- Keep the call open for a while in case the 200 is lost to be -->
: <!-- able to retransmit it if we receive the BYE again. -->
: <pause milliseconds="4000"/>
indent and align formatting.
https://gerrit.asterisk.org/c/testsuite/+/13803/7/tests/channels/pjsip/moh_passthru_inactive/sipp/uas_hold_reinvite.xml@233
PS7, Line 233: <!-- definition of the response time repartition table (unit is ms) -->
: <ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
:
: <!-- definition of the call length repartition table (unit is ms) -->
: <CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
Remove these.
--
To view, visit https://gerrit.asterisk.org/c/testsuite/+/13803
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: testsuite
Gerrit-Branch: 13
Gerrit-Change-Id: I8b22fe78f5cc02c2b0b888d51df296c4509b1563
Gerrit-Change-Number: 13803
Gerrit-PatchSet: 7
Gerrit-Owner: Torrey Searle <tsearle at gmail.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>
Gerrit-Comment-Date: Tue, 03 Mar 2020 21:10:41 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200303/f214e8c9/attachment-0001.html>
More information about the asterisk-code-review
mailing list