[asterisk-commits] oej: branch oej/videocaps r61687 - /team/oej/videocaps/channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Apr 19 06:21:02 MST 2007


Author: oej
Date: Thu Apr 19 08:21:00 2007
New Revision: 61687

URL: http://svn.digium.com/view/asterisk?view=rev&rev=61687
Log:
Removing some blank lines, also fixing a unhold issue for Cisco Call Manager

Modified:
    team/oej/videocaps/channels/chan_sip.c

Modified: team/oej/videocaps/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/videocaps/channels/chan_sip.c?view=diff&rev=61687&r1=61686&r2=61687
==============================================================================
--- team/oej/videocaps/channels/chan_sip.c (original)
+++ team/oej/videocaps/channels/chan_sip.c Thu Apr 19 08:21:00 2007
@@ -5907,14 +5907,14 @@
 			ast_log(LOG_DEBUG, "T38 state changed to %d on channel %s\n", p->t38.state, p->owner ? p->owner->name : "<none>");
 	}
 
-  if(sipdebug_caps) {	
+  	if(sipdebug_caps) {	
 		ast_verbose("SIP PROCESS SDP: Peercaps: \n");	
 		ast_dump_caps(&p->peercaps);
 		ast_verbose("SIP PROCESS SDP: Caps: \n");	
 		ast_dump_caps(&p->caps);
 	}
 
-  /* The peercaps are now in. There will be videocap.valid=1 if there was an RTPMAP entry and there
+  	/* The peercaps are now in. There will be videocap.valid=1 if there was an RTPMAP entry and there
 	   will be codec information in the videocap if there was an fmtp. We now need to reconcile all these
 		 caps... it is possible that a peer does not set CT for instance and we need to generate it */
 	/* It may be better to do this on the joint cap... rather than pollute the peercap with elements that
@@ -7357,11 +7357,11 @@
  	if (p->jointcaps.maxvideobitrate > 0)
  		ast_build_string(&m_video_next, &m_video_left, "\r\nb=AS:%d", p->jointcaps.maxvideobitrate/1000);
  
-  	ast_build_string(&m_audio_next, &m_audio_left, "\r\n");
-  	if (needvideo)
-  		ast_build_string(&m_video_next, &m_video_left, "\r\n");
- 	if (needtext)
- 		ast_build_string(&m_text_next, &m_text_left, "\r\n");
+  	//ast_build_string(&m_audio_next, &m_audio_left, "\r\n");
+  	//if (needvideo)
+  		//ast_build_string(&m_video_next, &m_video_left, "\r\n");
+ 	//if (needtext)
+ 		//ast_build_string(&m_text_next, &m_text_left, "\r\n");
   
   	len = strlen(version) + strlen(subject) + strlen(owner) + strlen(connection) + strlen(stime) + strlen(m_audio) + strlen(a_audio) + strlen(hold);
   	if (needvideo) /* only if video response is appropriate */
@@ -14595,6 +14595,25 @@
 				p->jointcapability = p->capability;
 				if (option_debug)
 					ast_log(LOG_DEBUG, "Hm....  No sdp for the moment\n");
+				/* Check hold state, CISCO is issuing an INVITE with empty SDP to re-instate hold 
+					this code copied from process_sdp, needs to be put in a function
+				*/
+				if (ast_test_flag(&p->flags[1], SIP_PAGE2_CALL_ONHOLD)) {
+					ast_queue_control(p->owner, AST_CONTROL_UNHOLD);
+					/* Activate a re-invite */
+					ast_queue_frame(p->owner, &ast_null_frame);
+					/* Queue Manager Unhold event */
+					append_history(p, "Unhold", "%s", req->data);
+					if (global_callevents)
+						manager_event(EVENT_FLAG_CALL, "Unhold",
+				      			"Channel: %s\r\n"
+				      			"Uniqueid: %s\r\n",
+				      			p->owner->name,
+				      			p->owner->uniqueid);
+					if (global_notifyhold)
+						sip_peer_hold(p, FALSE);
+					ast_clear_flag(&p->flags[1], SIP_PAGE2_CALL_ONHOLD); /* Clear both flags */
+				}
 			}
 			if (!ast_test_flag(&p->flags[0], SIP_NO_HISTORY)) /* This is a response, note what it was for */
 				append_history(p, "ReInv", "Re-invite received");



More information about the asterisk-commits mailing list