Status: New
Owner: ----
Labels: Component-JAIN-SIP-Javascript Type-Defect Priority-Medium JAIN-SIP-Javascript-1.0.0.Final

New issue 65 by [email protected]: Exception on createACK when 200 OK contains record route headers
http://code.google.com/p/jain-sip/issues/detail?id=65

Console log:

SIP message received: SIP/2.0 200 OK
Record-Route: <sip:172.21.100.14:8080;transport=ws;lr=on>
Call-ID: 1361183524819
CSeq: 1 INVITE
From: <sip:[email protected]>;tag=1361183524819
To: <sip:[email protected]>;tag=1361183517460
Via: SIP/2.0/WS 4VPwmR8Sank0.invalid;received=172.19.1.138;branch=z9hG4bK1361183490933;rport;rport
Max-Forwards: 16
Allow: INVITE,ACK,CANCEL,BYE
Contact: <sip:[email protected];alias=172.21.96.84~65140~5;transport=ws>
User-Agent: MobicentsWebRTCPhone
Content-Type: application/sdp
Content-Length: 1710

v=0
o=- 1620723502 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE audio video
m=audio 57179 RTP/SAVPF 103 104 0 8 106 105 13 126
c=IN IP4 172.21.98.107
a=rtcp:1 IN IP4 0.0.0.0
a=candidate:3963772070 1 udp 2113937151 172.21.98.107 57179 typ host generation 0 a=candidate:3331641391 1 udp 2113937151 172.21.96.84 57180 typ host generation 0
a=ice-ufrag:2212jDjK9/fr2IRh
a=ice-pwd:NEK74Abub1c+qBC7NPee8j6B
a=sendrecv
a=mid:audio
a=rtcp-mux
a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:d2MBosL/ENaeNvPABpOv+o70bVQaL0PDJ8vd2jvl
a=rtpmap:103 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:106 CN/32000
a=rtpmap:105 CN/16000
a=rtpmap:13 CN/8000
a=rtpmap:126 telephone-event/8000
a=ssrc:2620633982 cname:2R3pWm9IVv7GuxU3
a=ssrc:2620633982 msid:8FH8YwMJw5MaaTqSfBUDaCJXyvsCIl1VHYEF a0
a=ssrc:2620633982 mslabel:8FH8YwMJw5MaaTqSfBUDaCJXyvsCIl1VHYEF
a=ssrc:2620633982 label:8FH8YwMJw5MaaTqSfBUDaCJXyvsCIl1VHYEFa0
m=video 57179 RTP/SAVPF 100 116 117
c=IN IP4 172.21.98.107
a=rtcp:1 IN IP4 0.0.0.0
a=candidate:3963772070 1 udp 2113937151 172.21.98.107 57179 typ host generation 0 a=candidate:3331641391 1 udp 2113937151 172.21.96.84 57180 typ host generation 0
a=ice-ufrag:2212jDjK9/fr2IRh
a=ice-pwd:NEK74Abub1c+qBC7NPee8j6B
a=sendrecv
a=mid:video
a=rtcp-mux
a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:d2MBosL/ENaeNvPABpOv+o70bVQaL0PDJ8vd2jvl
a=rtpmap:100 VP8/90000
a=rtpmap:116 red/90000
a=rtpmap:117 ulpfec/90000
a=ssrc:2272644519 cname:2R3pWm9IVv7GuxU3
a=ssrc:2272644519 msid:8FH8YwMJw5MaaTqSfBUDaCJXyvsCIl1VHYEF v0
a=ssrc:2272644519 mslabel:8FH8YwMJw5MaaTqSfBUDaCJXyvsCIl1VHYEF
a=ssrc:2272644519 label:8FH8YwMJw5MaaTqSfBUDaCJXyvsCIl1VHYEFv0
 jain-sip.js:20873

MobicentsWebRTCPhone:processTransactionTerminated() MobicentsWebRTCPhone.js:233

MobicentsWebRTCPhone:processResponse() MobicentsWebRTCPhone.js:258

MobicentsWebRTCPhone:handleStateMachineInvitingResponseEvent(): this.invitingState=INVITING_STATE MobicentsWebRTCPhone.js:917

SIPClientTransaction:processResponseargu3(): catched exception:TypeError: Cannot call method 'getAddress' of null jain-sip.js:28838
SIPClientTransaction.processResponseargu3 jain-sip.js:28838
SIPClientTransaction.processResponse jain-sip.js:28758
SIPClientTransaction.processResponseargu2 jain-sip.js:28814
SIPClientTransaction.processResponse jain-sip.js:28751
WSMsgParser.processMessage jain-sip.js:20908
WSMsgParser.parsermessage jain-sip.js:20874
websocket.onmessage jain-sip.js:26098
MobicentsWebRTCPhone:keepAliveRegister()


Please provide any additional information below.

The problem is in createACK

recordRouteList.length is been used (which returns NaN) instead of recordRouteList.size() so no route are created and routeList.getFirst().getAddress()fails due to null pointer access.

for(var i=recordRouteList.length-1;i>=0;i--)
    {
        var rr =  recordRouteList[i];
        var route = new Route();
        route.setAddressrr.getAddress();
        route.setParameters(rr.getParameters());
        routeList.add(route);
    }
    contact = null;
    if (this.lastResponse.getContactHeaders() != null) {
        contact = this.lastResponse.getContactHeaders().getFirst();
    }
    if (!routeList.getFirst().getAddress().getURI().hasLrParam()) {
        route = null;
        if (contact != null) {
            route = new Route();
            route.setAddress(contact.getAddress());
        }
        var firstRoute = routeList.getFirst();
        routeList.removeFirst();
        uri = firstRoute.getAddress().getURI();
        ackRequest.setRequestURI(uri);
        if (route != null)
            routeList.add(route);
        ackRequest.addHeader(routeList);
    }


--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--

--- You received this message because you are subscribed to the Google Groups "mobicents-all-issues-changes" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to