question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Called in wrong state: STATE_INPROGRESS

See original GitHub issue
What steps will reproduce the problem?
1. sipML5 in Chrome 41 through kamailio via WSS to sipML5 on Chrome 40 / 
Android 5.02
2. place audio call from chrome 41 to chrome 40 using kamailio as a sip router.


What is the expected output? What do you see instead?
Expected: 200 or 300
Result: 603 - Failed to get local SDP

What version of the product are you using? On what operating system?
SIPML5 API version = 1.5.222
sipML5 in Chrome 41 through kamailio via WSS to sipML5 on Chrome 40 / Android 
5.02

Please provide any additional information below.

State machine: s0000_Started_2_Ringing_X_iINVITE
SIPml-api.js?svn=224:1 ==stack event = m_permission_requested
SIPml-api.js?svn=224:1 onSetRemoteDescriptionSuccess
SIPml-api.js?svn=224:1 onGetUserMediaSuccess
SIPml-api.js?svn=224:1 createAnswer
SIPml-api.js?svn=224:1 State machine: 
tsip_transac_ist_Proceeding_2_Proceeding_X_1xx
SIPml-api.js?svn=224:1 SEND: SIP/2.0 180 Ringing
Via: SIP/2.0/WSS x:4430;branch=z9hG4bK6db3.c3808cbb0eab26a1327641a77781d316.0
From: "x"<sip:1079@xx>;tag=G7WgxAWFDpP7GTZAiddE
To: <sip:1073@x>;tag=HGfPdykWWasi52odFlsI
Contact: <sips:1073@df7jal23ls0d.invalid;transport=wss>
Call-ID: 7a2937db-e56d-b1cb-b949-039c6d5fb13d
CSeq: 61118 INVITE
Content-Length: 0
Via: SIP/2.0/WSS 
df7jal23ls0d.invalid;rport=64830;received=x;branch=z9hG4bKDMgoDkMyO2A4cx6Wd706oz
3wThhefCTz
Record-Route: <sip:x:4430;transport=ws;lr=on;ftag=G7WgxAWFDpP7GTZAiddE>
Allow: ACK, BYE, CANCEL, INVITE, MESSAGE, NOTIFY, OPTIONS, PRACK, REFER, UPDATE


SIPml-api.js?svn=224:1 ==stack event = i_new_call
SIPml-api.js?svn=224:1 ==session event = m_stream_audio_local_added
SIPml-api.js?svn=224:1 onSignalingstateChange:have-remote-offer
SIPml-api.js?svn=224:1 onGetUserMediaSuccess
SIPml-api.js?svn=224:1 createAnswer
SIPml-api.js?svn=224:1 __on_add_stream
SIPml-api.js?svn=224:1 ==stack event = m_permission_accepted
2SIPml-api.js?svn=224:1 ==session event = m_stream_audio_local_added
SIPml-api.js?svn=224:1 ==session event = m_stream_audio_remote_added
SIPml-api.js?svn=224:1 onNegotiationNeeded
2SIPml-api.js?svn=224:1 onCreateSdpSuccess
SIPml-api.js?svn=224:1 onSetLocalDescriptionSuccess
SIPml-api.js?svn=224:1 onSetLocalDescriptionError
SIPml-api.js?svn=224:1 Failed to set local answer sdp: Called in wrong state: 
STATE_INPROGRESS
SIPml-api.js?svn=224:1 State machine: s0000_Ringing_2_Terminated_X_Reject
SIPml-api.js?svn=224:1 === INVITE Dialog terminated ===
SIPml-api.js?svn=224:1 PeerConnection::stop()
SIPml-api.js?svn=224:1 This/PeerConnection is null: unexpected
SIPml-api.js?svn=224:1 State machine: 
tsip_transac_ist_Proceeding_2_Completed_X_300_to_699
SIPml-api.js?svn=224:1 SEND: SIP/2.0 603 Failed to get local SDP
Via: SIP/2.0/WSS x:4430;branch=z9hG4bK6db3.c3808cbb0eab26a1327641a77781d316.0
From: "x"<sip:1079@xxx>;tag=G7WgxAWFDpP7GTZAiddE
To: <sip:1073@xxx>;tag=HGfPdykWWasi52odFlsI
Call-ID: 7a2937db-e56d-b1cb-b949-039c6d5fb13d
CSeq: 61118 INVITE
Content-Length: 0
Via: SIP/2.0/WSS 
df7jal23ls0d.invalid;rport=64830;received=x;branch=z9hG4bKDMgoDkMyO2A4cx6Wd706oz
3wThhefCTz
Record-Route: <sip:x:4430;transport=ws;lr=on;ftag=G7WgxAWFDpP7GTZAiddE>
Reason: SIP; cause=603; text="Failed to get local SDP"


SIPml-api.js?svn=224:1 ==session event = terminated
SIPml-api.js?svn=224:1 State machine: tsip_transac_ist_Any_2_Terminated_X_cancel

Original issue reported on code.google.com by d...@00100100.net on 9 Mar 2015 at 12:35

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:10

github_iconTop GitHub Comments

2reactions
stefanofavarocommented, Mar 8, 2016

Thank you very much @roginvs that solved my problem.

Just a note: there is only a little detail, if you need to use Hold/Resume functions you have to use a new flag, because in this case you can’t by-pass the onGetUserMediaSuccess function.

1reaction
roginvscommented, Mar 8, 2016

@stefanofavaro, have a look at this commit https://github.com/roginvs/sipml5/commit/4cbbb515635be00b089a97342662d6e12723cbef - this is a workaround for your problem

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to set remote answer sdp: Called in wrong state
Here is my code: var peerConnections = {}; var mainStream; var currentId; navigator.getUserMedia( { audio: true, video ...
Read more >
Failed to set local answer sdp: Called in wrong state ...
Cannot set remote answer in state stable. Error: cannot signal after peer is destroyed. My code is as follows (angular 2).
Read more >
Failed to set remote answer sdp: Called in wrong state ...
Coding example for the question WebRTC - Failed to set remote answer sdp: Called in wrong state: STATE_INPROGRESS-webrtc.
Read more >
Z1 issue: Service Unavailable & Alert - THETA 360 Developer
This may be confusing as there is a /osc/state command with the same name. I am referring to the state key in the...
Read more >
Solved: how to change state value while click on state but...
Solved: I need code for changing state value while click on state inprogress button which ... Any thoughts on what I might be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found