Understanding chan_sip.c case 491

I am currently experiencing “LOG_WARNING, “just did sched_add waitid(%d) for sip_reinvite_retry for dialog %s in handle_response_invite\n”, p->waitid, p->callid” being written to the log and then dropping the call 15minutes later. I have been experiencing this for a while now and have ended up at a dead end where ever I go. I was hoping that maybe there was someone out there that could help explain and help me understand this portion of the SIP call a little better. I would have posted this int he developers forum…but yeah you can’t post anything there. (issues.asterisk.org/view.php?id=17645)

case 491: /* Pending */ xmitres = transmit_request(p, SIP_ACK, seqno, XMIT_UNRELIABLE, FALSE); if (p->owner && !req->ignore) { if (p->owner->_state != AST_STATE_UP) { ast_queue_control(p->owner, AST_CONTROL_CONGESTION); pvt_set_needdestroy(p, "received 491 response"); } else { /* This is a re-invite that failed. */ /* Reset the flag after a while */ int wait; /* RFC 3261, if owner of call, wait between 2.1 to 4 seconds, * if not owner of call, wait 0 to 2 seconds */ if (p->outgoing_call) { wait = 2100 + ast_random() % 2000; } else { wait = ast_random() % 2000; } p->waitid = ast_sched_add(sched, wait, sip_reinvite_retry, dialog_ref(p, "passing dialog ptr into sched structure based on waitid for sip_reinvite_retry.")); ast_log(LOG_WARNING, "just did sched_add waitid(%d) for sip_reinvite_retry for dialog %s in handle_response_invite\n", p->waitid, p->callid); ast_debug(2, "Reinvite race. Waiting %d secs before retry\n", wait); } } break;


Sent a blast out to "asterisk-dev@lists.digium.com"