[asterisk-commits] oej: branch oej/invitestate r47650 - in /team/oej/invitestate: ./ apps/ chann...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Nov 15 06:40:49 MST 2006


Author: oej
Date: Wed Nov 15 07:40:48 2006
New Revision: 47650

URL: http://svn.digium.com/view/asterisk?view=rev&rev=47650
Log:
Trying to fix an issue with failures on sip allocation (RTP not having a file handle)

Modified:
    team/oej/invitestate/   (props changed)
    team/oej/invitestate/apps/app_voicemail.c
    team/oej/invitestate/channels/chan_sip.c

Propchange: team/oej/invitestate/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Nov 15 07:40:48 2006
@@ -1,1 +1,1 @@
-/branches/1.2:1-47590
+/branches/1.2:1-47649

Modified: team/oej/invitestate/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/oej/invitestate/apps/app_voicemail.c?view=diff&rev=47650&r1=47649&r2=47650
==============================================================================
--- team/oej/invitestate/apps/app_voicemail.c (original)
+++ team/oej/invitestate/apps/app_voicemail.c Wed Nov 15 07:40:48 2006
@@ -2749,7 +2749,7 @@
 {
 	int bytes = 0;
 	bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 1, ADSI_JUST_CENT, 0, "Comedian Mail", "");
-	bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 2, ADSI_JUST_CENT, 0, "(C)2002 LSS, Inc.", "");
+	bytes += adsi_display(buf + bytes, ADSI_COMM_PAGE, 2, ADSI_JUST_CENT, 0, "(C)2002-2006 Digium, Inc.", "");
 	return bytes;
 }
 

Modified: team/oej/invitestate/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/invitestate/channels/chan_sip.c?view=diff&rev=47650&r1=47649&r2=47650
==============================================================================
--- team/oej/invitestate/channels/chan_sip.c (original)
+++ team/oej/invitestate/channels/chan_sip.c Wed Nov 15 07:40:48 2006
@@ -1262,7 +1262,9 @@
 			ast_mutex_unlock(&pkt->owner->owner->lock);
 		} else {
 			/* If no channel owner, destroy now */
-			ast_set_flag(pkt->owner, SIP_NEEDDESTROY);	
+			/* Let the peerpoke system expire packets when the timer expires for poke_noanswer */
+			if (pkt->method != SIP_OPTIONS)
+				ast_set_flag(pkt->owner, SIP_NEEDDESTROY);	
 		}
 	}
 	/* In any case, go ahead and remove the packet */
@@ -3280,6 +3282,17 @@
 		p = sip_alloc(callid, sin, 1, intended_method);
 		if (p)
 			ast_mutex_lock(&p->lock);
+		else {
+			/* We have a memory or file/socket error (can't allocate RTP sockets or something) so we're not
+				getting a dialog from sip_alloc. 
+
+				Without a dialog we can't retransmit and handle ACKs and all that, but at least
+				send an error message.
+
+				Sorry, we apologize for the inconvienience
+			*/
+			transmit_response_using_temp(callid, sin, 1, intended_method, req, "500 Server internal error");
+		}
 	}
 
 	return p;
@@ -9996,7 +10009,7 @@
 			ast_sched_del(sched, peer->pokeexpire);
 		if (sipmethod == SIP_INVITE)	/* Does this really happen? */
 			transmit_request(p, SIP_ACK, seqno, 0, 0);
-		ast_set_flag(p, SIP_NEEDDESTROY);	
+		ast_set_flag(p, SIP_NEEDDESTROY);
 
 		/* Try again eventually */
 		if ((peer->lastms < 0)  || (peer->lastms > peer->maxms))
@@ -11731,7 +11744,7 @@
 		peer->call = NULL;
 		return 0;
 	}
-	if (peer->call > 0) {
+	if (peer->call) {
 		if (sipdebug)
 			ast_log(LOG_NOTICE, "Still have a QUALIFY dialog active, deleting\n");
 		sip_destroy(peer->call);



More information about the asterisk-commits mailing list