[asterisk-commits] oej: branch oej/callpickup r38869 - in /team/oej/callpickup: ./ channels/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Aug 4 15:00:00 MST 2006


Author: oej
Date: Fri Aug  4 16:59:59 2006
New Revision: 38869

URL: http://svn.digium.com/view/asterisk?rev=38869&view=rev
Log:
Update

Modified:
    team/oej/callpickup/   (props changed)
    team/oej/callpickup/channels/chan_sip.c

Propchange: team/oej/callpickup/
------------------------------------------------------------------------------
    automerge = http://edvina.net/training/

Modified: team/oej/callpickup/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/callpickup/channels/chan_sip.c?rev=38869&r1=38868&r2=38869&view=diff
==============================================================================
--- team/oej/callpickup/channels/chan_sip.c (original)
+++ team/oej/callpickup/channels/chan_sip.c Fri Aug  4 16:59:59 2006
@@ -6625,6 +6625,8 @@
 
 		ast_build_string(&t, &maxbytes, "<?xml version=\"1.0\"?>\n");
 		ast_build_string(&t, &maxbytes, "<dialog-info xmlns=\"urn:ietf:params:xml:ns:dialog-info\" version=\"%d\" state=\"%s\" entity=\"%s\">\n", p->dialogver++, full ? "full":"partial", mto);
+
+		/* Add fake call ID if we're in ringing state */
 		if ((state & AST_EXTENSION_RINGING) && global_notifyringing)
 			ast_build_string(&t, &maxbytes, "<dialog id=\"%s\" direction=\"recipient\" %s>\n", p->exten, pickupcallid);
 		else
@@ -12626,7 +12628,7 @@
 		}
 
 		if (sipdebug && option_debug > 2)
-			ast_log(LOG_DEBUG, "INVITE part of call transfer. Replaces [%s]\n", p_replaces);
+			ast_log(LOG_DEBUG, "INVITE part of call transfer or pickup. Replaces [%s]\n", p_replaces);
 		/* Create a buffer we can manipulate */
 		replace_id = ast_strdupa(p_replaces);
 		ast_uri_decode(replace_id);
@@ -12653,9 +12655,9 @@
 		while ( (ptr = strsep(&start, ";")) ) {
 			ptr = ast_skip_blanks(ptr); /* XXX maybe unnecessary ? */
 			if ( (to = strcasestr(ptr, "to-tag=") ) )
-				totag = to + 7;	/* skip the keyword */
+				totag = to + 7;			/* skip the keyword */
 			else if ( (to = strcasestr(ptr, "from-tag=") ) ) {
-				fromtag = to + 9;	/* skip the keyword */
+				fromtag = to + 9;		/* skip the keyword */
 				fromtag = strsep(&fromtag, "&"); /* trim what ? */
 			}
 		}
@@ -12668,7 +12670,7 @@
 			If we have a Replaces  header, we need to cancel that call if we succeed with this call 
 		*/
 		if ((p->refer->refer_call = get_sip_pvt_byid_locked(replace_id, totag, fromtag)) == NULL) {
-			ast_log(LOG_NOTICE, "Supervised transfer attempted to replace non-existent call id (%s)!\n", replace_id);
+			ast_log(LOG_NOTICE, "Supervised transfer (or call pickup) attempted to replace non-existent call id (%s)!\n", replace_id);
 			transmit_response(p, "481 Call Leg Does Not Exist (Replaces)", req);
 			error = 1;
 		}
@@ -12695,7 +12697,7 @@
 		}
 
 		if (!error && p->refer->refer_call->owner->_state != AST_STATE_RING && p->refer->refer_call->owner->_state != AST_STATE_UP ) {
-			ast_log(LOG_NOTICE, "Supervised transfer attempted to replace non-ringing or active call id (%s)!\n", replace_id);
+			ast_log(LOG_NOTICE, "Supervised transfer attempted to replace non-ringing or not active call id (%s)!\n", replace_id);
 			transmit_response(p, "603 Declined (Replaces)", req);
 			error = 1;
 		}



More information about the asterisk-commits mailing list