@@ -56,8 +56,8 @@ module.exports = class Dialog {
5656 this . _remote_uri = message . parseHeader ( 'from' ) . uri ;
5757 this . _remote_target = contact . uri ;
5858 this . _route_set = message . getHeaders ( 'record-route' ) ;
59- this . incoming_ack_seqnum = message . cseq ;
60- this . outgoing_ack_seqnum = null ;
59+ this . _incoming_ack_seqnum = message . cseq ;
60+ this . _outgoing_ack_seqnum = null ;
6161 }
6262 // RFC 3261 12.1.2.
6363 else if ( type === 'UAC' ) {
@@ -75,8 +75,8 @@ module.exports = class Dialog {
7575 this . _remote_uri = message . parseHeader ( 'to' ) . uri ;
7676 this . _remote_target = contact . uri ;
7777 this . _route_set = message . getHeaders ( 'record-route' ) . reverse ( ) ;
78- this . incoming_ack_seqnum = null ;
79- this . outgoing_ack_seqnum = this . _local_seqnum ;
78+ this . _incoming_ack_seqnum = null ;
79+ this . _outgoing_ack_seqnum = this . _local_seqnum ;
8080 }
8181
8282 this . _ua . newDialog ( this ) ;
@@ -175,12 +175,12 @@ module.exports = class Dialog {
175175 }
176176
177177 // ACK received. Cleanup this._ack_seqnum.
178- if ( request . method === JsSIP_C . ACK && this . incoming_ack_seqnum !== null ) {
179- this . incoming_ack_seqnum = null ;
178+ if ( request . method === JsSIP_C . ACK && this . _incoming_ack_seqnum !== null ) {
179+ this . _incoming_ack_seqnum = null ;
180180 }
181181 // INVITE received. Set this._ack_seqnum.
182182 else if ( request . method === JsSIP_C . INVITE ) {
183- this . incoming_ack_seqnum = request . cseq ;
183+ this . _incoming_ack_seqnum = request . cseq ;
184184 }
185185
186186 this . _owner . receiveRequest ( request ) ;
@@ -197,12 +197,12 @@ module.exports = class Dialog {
197197 // CANCEL and ACK must use the same sequence number as the INVITE.
198198 const cseq =
199199 method === JsSIP_C . CANCEL || method === JsSIP_C . ACK
200- ? this . outgoing_ack_seqnum
200+ ? this . _outgoing_ack_seqnum
201201 : ( this . _local_seqnum += 1 ) ;
202202
203203 // In case of re-INVITE store ack_seqnum for future CANCEL or ACK.
204204 if ( method === JsSIP_C . INVITE ) {
205- this . outgoing_ack_seqnum = cseq ;
205+ this . _outgoing_ack_seqnum = cseq ;
206206 }
207207
208208 const request = new SIPMessage . OutgoingRequest (
@@ -234,8 +234,8 @@ module.exports = class Dialog {
234234 // We are not expecting any ACK with lower seqnum than the current one.
235235 // Or this is not the ACK we are waiting for.
236236 if (
237- this . incoming_ack_seqnum === null ||
238- request . cseq !== this . incoming_ack_seqnum
237+ this . _incoming_ack_seqnum === null ||
238+ request . cseq !== this . _incoming_ack_seqnum
239239 ) {
240240 return false ;
241241 }
0 commit comments