[asterisk-commits] oej: branch oej/darjeeling-prack-1.8 r369427 - in /team/oej/darjeeling-prack-...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jun 27 07:41:38 CDT 2012


Author: oej
Date: Wed Jun 27 07:41:33 2012
New Revision: 369427

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=369427
Log:
Resetting and upgrading and stuff.

Added:
    team/oej/darjeeling-prack-1.8/main/adsi.c
      - copied unchanged from r369390, branches/1.8/main/adsi.c
Removed:
    team/oej/darjeeling-prack-1.8/res/res_adsi.exports.in
Modified:
    team/oej/darjeeling-prack-1.8/   (props changed)
    team/oej/darjeeling-prack-1.8/addons/chan_ooh323.c
    team/oej/darjeeling-prack-1.8/addons/ooh323c/src/ooCalls.c
    team/oej/darjeeling-prack-1.8/addons/ooh323c/src/ooq931.c
    team/oej/darjeeling-prack-1.8/apps/app_dial.c
    team/oej/darjeeling-prack-1.8/apps/app_queue.c
    team/oej/darjeeling-prack-1.8/channels/chan_sip.c
    team/oej/darjeeling-prack-1.8/channels/sip/include/sip.h
    team/oej/darjeeling-prack-1.8/include/asterisk/adsi.h
    team/oej/darjeeling-prack-1.8/include/asterisk/netsock2.h
    team/oej/darjeeling-prack-1.8/main/Makefile
    team/oej/darjeeling-prack-1.8/main/abstract_jb.c
    team/oej/darjeeling-prack-1.8/main/alaw.c
    team/oej/darjeeling-prack-1.8/main/aoc.c
    team/oej/darjeeling-prack-1.8/main/asterisk.c
    team/oej/darjeeling-prack-1.8/main/astfd.c
    team/oej/darjeeling-prack-1.8/main/astmm.c
    team/oej/darjeeling-prack-1.8/main/astobj2.c
    team/oej/darjeeling-prack-1.8/main/audiohook.c
    team/oej/darjeeling-prack-1.8/main/autochan.c
    team/oej/darjeeling-prack-1.8/main/autoservice.c
    team/oej/darjeeling-prack-1.8/main/callerid.c
    team/oej/darjeeling-prack-1.8/main/ccss.c
    team/oej/darjeeling-prack-1.8/main/cdr.c
    team/oej/darjeeling-prack-1.8/main/cel.c
    team/oej/darjeeling-prack-1.8/main/cli.c
    team/oej/darjeeling-prack-1.8/main/datastore.c
    team/oej/darjeeling-prack-1.8/main/devicestate.c
    team/oej/darjeeling-prack-1.8/main/dial.c
    team/oej/darjeeling-prack-1.8/main/dnsmgr.c
    team/oej/darjeeling-prack-1.8/main/dsp.c
    team/oej/darjeeling-prack-1.8/main/enum.c
    team/oej/darjeeling-prack-1.8/main/event.c
    team/oej/darjeeling-prack-1.8/main/features.c
    team/oej/darjeeling-prack-1.8/main/file.c
    team/oej/darjeeling-prack-1.8/main/fixedjitterbuf.c
    team/oej/darjeeling-prack-1.8/main/frame.c
    team/oej/darjeeling-prack-1.8/main/framehook.c
    team/oej/darjeeling-prack-1.8/main/fskmodem.c
    team/oej/darjeeling-prack-1.8/main/fskmodem_float.c
    team/oej/darjeeling-prack-1.8/main/global_datastores.c
    team/oej/darjeeling-prack-1.8/main/hashtab.c
    team/oej/darjeeling-prack-1.8/main/heap.c
    team/oej/darjeeling-prack-1.8/main/indications.c
    team/oej/darjeeling-prack-1.8/main/io.c
    team/oej/darjeeling-prack-1.8/main/lock.c
    team/oej/darjeeling-prack-1.8/main/logger.c
    team/oej/darjeeling-prack-1.8/main/netsock.c
    team/oej/darjeeling-prack-1.8/main/netsock2.c
    team/oej/darjeeling-prack-1.8/main/pbx.c
    team/oej/darjeeling-prack-1.8/main/plc.c
    team/oej/darjeeling-prack-1.8/main/privacy.c
    team/oej/darjeeling-prack-1.8/main/rtp_engine.c
    team/oej/darjeeling-prack-1.8/main/say.c
    team/oej/darjeeling-prack-1.8/main/sched.c
    team/oej/darjeeling-prack-1.8/main/security_events.c
    team/oej/darjeeling-prack-1.8/main/srv.c
    team/oej/darjeeling-prack-1.8/main/ssl.c
    team/oej/darjeeling-prack-1.8/main/strcompat.c
    team/oej/darjeeling-prack-1.8/main/strings.c
    team/oej/darjeeling-prack-1.8/main/stun.c
    team/oej/darjeeling-prack-1.8/main/taskprocessor.c
    team/oej/darjeeling-prack-1.8/main/tcptls.c
    team/oej/darjeeling-prack-1.8/main/test.c
    team/oej/darjeeling-prack-1.8/main/threadstorage.c
    team/oej/darjeeling-prack-1.8/main/timing.c
    team/oej/darjeeling-prack-1.8/main/udptl.c
    team/oej/darjeeling-prack-1.8/main/ulaw.c
    team/oej/darjeeling-prack-1.8/main/xmldoc.c
    team/oej/darjeeling-prack-1.8/res/ael/pval.c
    team/oej/darjeeling-prack-1.8/res/ais/clm.c
    team/oej/darjeeling-prack-1.8/res/ais/evt.c
    team/oej/darjeeling-prack-1.8/res/res_adsi.c
    team/oej/darjeeling-prack-1.8/res/res_smdi.c
    team/oej/darjeeling-prack-1.8/res/snmp/agent.c

Propchange: team/oej/darjeeling-prack-1.8/
------------------------------------------------------------------------------
    automerge = Is-there-life-off-net?

Propchange: team/oej/darjeeling-prack-1.8/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Jun 27 07:41:33 2012
@@ -1,1 +1,1 @@
-/branches/1.8:1-368751
+/branches/1.8:1-369426

Modified: team/oej/darjeeling-prack-1.8/addons/chan_ooh323.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/darjeeling-prack-1.8/addons/chan_ooh323.c?view=diff&rev=369427&r1=369426&r2=369427
==============================================================================
--- team/oej/darjeeling-prack-1.8/addons/chan_ooh323.c (original)
+++ team/oej/darjeeling-prack-1.8/addons/chan_ooh323.c Wed Jun 27 07:41:33 2012
@@ -1154,6 +1154,8 @@
 
 	if (p) {
 		ast_mutex_lock(&p->lock);
+
+		p->lastrtptx = time(NULL);
 
 		if (f->frametype == AST_FRAME_MODEM) {
 			ast_debug(1, "Send UDPTL %d/%d len %d for %s\n",
@@ -3451,6 +3453,24 @@
 			h323_next = h323->next;
 
 			/* TODO: Need to add rtptimeout keepalive support */
+
+			if (h323->rtp && h323->rtptimeout && h323->lastrtptx &&
+				h323->lastrtptx + h323->rtptimeout < t) {
+				ast_rtp_instance_sendcng(h323->rtp, 0);
+				h323->lastrtptx = time(NULL);
+			}
+
+			if (h323->rtp && h323->owner && h323->rtptimeout &&
+				h323->lastrtprx &&
+				h323->lastrtprx + h323->rtptimeout < t) {
+				if (!ast_channel_trylock(h323->owner)) {
+					ast_softhangup_nolock(h323->owner, AST_SOFTHANGUP_DEV);
+					ast_log(LOG_NOTICE, "Disconnecting call '%s' for lack of RTP activity in %ld seconds\n", h323->owner->name, (long) (t - h323->lastrtprx));
+					ast_channel_unlock(h323->owner);
+				}
+				
+			}
+
 			if (ast_test_flag(h323, H323_NEEDDESTROY)) {
 				ooh323_destroy (h323);
          } /* else if (ast_test_flag(h323, H323_NEEDSTART) && h323->owner) {
@@ -4277,12 +4297,14 @@
 	switch (ast->fdno) {
 	case 0:
 		f = ast_rtp_instance_read(p->rtp, 0);	/* RTP Audio */
+		p->lastrtprx = time(NULL);
 		break;
 	case 1:
 		f = ast_rtp_instance_read(p->rtp, 1);	/* RTCP Control Channel */
 		break;
 	case 2:
 		f = ast_rtp_instance_read(p->vrtp, 0);	/* RTP Video */
+		p->lastrtprx = time(NULL);
 		break;
 	case 3:
 		f = ast_rtp_instance_read(p->vrtp, 1);	/* RTCP Control Channel for video */
@@ -4291,6 +4313,7 @@
 		f = ast_udptl_read(p->udptl);		/* UDPTL t.38 data */
 		if (gH323Debug) ast_debug(1, "Got UDPTL %d/%d len %d for %s\n",
 				f->frametype, f->subclass.integer, f->datalen, ast->name);
+		p->lastrtprx = time(NULL);
 		break;
 
 	default:

Modified: team/oej/darjeeling-prack-1.8/addons/ooh323c/src/ooCalls.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/darjeeling-prack-1.8/addons/ooh323c/src/ooCalls.c?view=diff&rev=369427&r1=369426&r2=369427
==============================================================================
--- team/oej/darjeeling-prack-1.8/addons/ooh323c/src/ooCalls.c (original)
+++ team/oej/darjeeling-prack-1.8/addons/ooh323c/src/ooCalls.c Wed Jun 27 07:41:33 2012
@@ -265,14 +265,13 @@
 
 int ooRemoveCallFromList (OOH323CallData *call)
 {
-   if(!call)
+   if(!call || !gH323ep.callList)
       return OO_OK;
 
    ast_mutex_lock(&callListLock);
 
    OOTRACEINFO3("Removing call %lx: %s\n", call, call->callToken);
 
-   if (!gH323ep.callList) return OO_OK;
    if(call == gH323ep.callList)
    {
       if(!call->next)

Modified: team/oej/darjeeling-prack-1.8/addons/ooh323c/src/ooq931.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/darjeeling-prack-1.8/addons/ooh323c/src/ooq931.c?view=diff&rev=369427&r1=369426&r2=369427
==============================================================================
--- team/oej/darjeeling-prack-1.8/addons/ooh323c/src/ooq931.c (original)
+++ team/oej/darjeeling-prack-1.8/addons/ooh323c/src/ooq931.c Wed Jun 27 07:41:33 2012
@@ -2316,7 +2316,7 @@
       else
          OO_CLRFLAG(call->flags, OO_M_TUNNELING);
 
-      if(opts->disableGk)
+      if(opts->disableGk || gH323ep.gkClient == NULL)
          OO_SETFLAG(call->flags, OO_M_DISABLEGK);
       else
          OO_CLRFLAG(call->flags, OO_M_DISABLEGK);

Modified: team/oej/darjeeling-prack-1.8/apps/app_dial.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/darjeeling-prack-1.8/apps/app_dial.c?view=diff&rev=369427&r1=369426&r2=369427
==============================================================================
--- team/oej/darjeeling-prack-1.8/apps/app_dial.c (original)
+++ team/oej/darjeeling-prack-1.8/apps/app_dial.c Wed Jun 27 07:41:33 2012
@@ -2688,7 +2688,9 @@
 			ast_copy_string(peer->context, chan->context, sizeof(peer->context));
 			ast_copy_string(peer->exten, chan->exten, sizeof(peer->exten));
 			peer->priority = chan->priority + 2;
-			ast_pbx_start(peer);
+			if (ast_pbx_start(peer)) {
+				ast_hangup(peer);
+			}
 			hanguptree(outgoing, NULL, ast_test_flag64(&opts, OPT_CANCEL_ELSEWHERE) ? 1 : 0);
 			if (continue_exec)
 				*continue_exec = 1;
@@ -2979,24 +2981,26 @@
 			}
 			ast_set2_flag(peer, autoloopflag, AST_FLAG_IN_AUTOLOOP);  /* set it back the way it was */
 		}
-		if (!ast_check_hangup(peer) && ast_test_flag64(&opts, OPT_CALLEE_GO_ON)) {
-			if(!ast_strlen_zero(opt_args[OPT_ARG_CALLEE_GO_ON])) {
-				replace_macro_delimiter(opt_args[OPT_ARG_CALLEE_GO_ON]);
-				ast_parseable_goto(peer, opt_args[OPT_ARG_CALLEE_GO_ON]);
-			} else { /* F() */
-				int res;
-				res = ast_goto_if_exists(peer, chan->context, chan->exten, (chan->priority) + 1); 
-				if (res == AST_PBX_GOTO_FAILED) {
-					ast_hangup(peer);
+		if (!ast_check_hangup(peer)) {
+			if (ast_test_flag64(&opts, OPT_CALLEE_GO_ON)) {
+				int goto_res;
+
+				if (!ast_strlen_zero(opt_args[OPT_ARG_CALLEE_GO_ON])) {
+					replace_macro_delimiter(opt_args[OPT_ARG_CALLEE_GO_ON]);
+					goto_res = ast_parseable_goto(peer, opt_args[OPT_ARG_CALLEE_GO_ON]);
+				} else { /* F() */
+					goto_res = ast_goto_if_exists(peer, chan->context,
+						chan->exten, chan->priority + 1);
+				}
+				if (!goto_res && !ast_pbx_start(peer)) {
+					/* The peer is now running its own PBX. */
 					goto out;
 				}
-			}
-			ast_pbx_start(peer);
-		} else {
-			if (!ast_check_hangup(chan))
+			} else {
 				chan->hangupcause = peer->hangupcause;
-			ast_hangup(peer);
-		}
+			}
+		}
+		ast_hangup(peer);
 	}
 out:
 	if (moh) {

Modified: team/oej/darjeeling-prack-1.8/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/darjeeling-prack-1.8/apps/app_queue.c?view=diff&rev=369427&r1=369426&r2=369427
==============================================================================
--- team/oej/darjeeling-prack-1.8/apps/app_queue.c (original)
+++ team/oej/darjeeling-prack-1.8/apps/app_queue.c Wed Jun 27 07:41:33 2012
@@ -4698,7 +4698,7 @@
 			if (!res2) {
 				if (qe->parent->memberdelay) {
 					ast_log(LOG_NOTICE, "Delaying member connect for %d seconds\n", qe->parent->memberdelay);
-					res2 |= ast_safe_sleep(peer, qe->parent->memberdelay * 1000);
+					res2 = ast_safe_sleep(peer, qe->parent->memberdelay * 1000);
 				}
 				if (!res2 && announce) {
 					if (play_file(peer, announce) < 0) {
@@ -4726,8 +4726,8 @@
 						}
 					}
 				}
-			}
-			res2 |= ast_autoservice_stop(qe->chan);
+				ast_autoservice_stop(qe->chan);
+			}
 			if (ast_check_hangup(peer)) {
 				/* Agent must have hung up */
 				ast_log(LOG_WARNING, "Agent on %s hungup on the customer.\n", peer->name);
@@ -4745,8 +4745,8 @@
 				ast_hangup(peer);
 				ao2_ref(member, -1);
 				goto out;
-			} else if (res2) {
-				/* Caller must have hung up just before being connected*/
+			} else if (ast_check_hangup(qe->chan)) {
+				/* Caller must have hung up just before being connected */
 				ast_log(LOG_NOTICE, "Caller was about to talk to agent on %s but the caller hungup.\n", peer->name);
 				ast_queue_log(queuename, qe->chan->uniqueid, member->membername, "ABANDON", "%d|%d|%ld", qe->pos, qe->opos, (long) time(NULL) - qe->start);
 				record_abandoned(qe);

Modified: team/oej/darjeeling-prack-1.8/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/darjeeling-prack-1.8/channels/chan_sip.c?view=diff&rev=369427&r1=369426&r2=369427
==============================================================================
--- team/oej/darjeeling-prack-1.8/channels/chan_sip.c (original)
+++ team/oej/darjeeling-prack-1.8/channels/chan_sip.c Wed Jun 27 07:41:33 2012
@@ -1516,7 +1516,7 @@
 static void build_callid_pvt(struct sip_pvt *pvt);
 static void change_callid_pvt(struct sip_pvt *pvt, const char *callid);
 static void build_callid_registry(struct sip_registry *reg, const struct ast_sockaddr *ourip, const char *fromdomain);
-static void make_our_tag(char *tagbuf, size_t len);
+static void make_our_tag(struct sip_pvt *pvt);
 static int add_header(struct sip_request *req, const char *var, const char *value);
 static int add_header_max_forwards(struct sip_pvt *dialog, struct sip_request *req);
 static int add_content(struct sip_request *req, const char *line);
@@ -6267,13 +6267,7 @@
 		return 0;
 	}
 
-	if (ast_test_flag(ast, AST_FLAG_ZOMBIE)) {
-		if (p->refer)
-			ast_debug(1, "SIP Transfer: Hanging up Zombie channel %s after transfer ... Call-ID: %s\n", ast->name, p->callid);
-		else
-			ast_debug(1, "Hanging up zombie call. Be scared.\n");
-	} else
-		ast_debug(1, "Hangup call %s, SIP callid %s\n", ast->name, p->callid);
+	ast_debug(1, "Hangup call %s, SIP callid %s\n", ast->name, p->callid);
 
 	sip_pvt_lock(p);
 	if (ast_test_flag(&p->flags[0], SIP_INC_COUNT) || ast_test_flag(&p->flags[1], SIP_PAGE2_CALL_ONHOLD)) {
@@ -7611,9 +7605,9 @@
 }
 
 /*! \brief Make our SIP dialog tag */
-static void make_our_tag(char *tagbuf, size_t len)
-{
-	snprintf(tagbuf, len, "as%08lx", ast_random());
+static void make_our_tag(struct sip_pvt *pvt)
+{
+	ast_string_field_build(pvt, tag, "as%08lx", ast_random());
 }
 
 /*! \brief Allocate Session-Timers struct w/in dialog */
@@ -7724,7 +7718,7 @@
 	p->do_history = recordhistory;
 
 	p->branch = ast_random();	
-	make_our_tag(p->tag, sizeof(p->tag));
+	make_our_tag(p);
 	p->ocseq = INITIAL_CSEQ;
 	p->allowed_methods = UINT_MAX;
 
@@ -8808,7 +8802,6 @@
 
 	/* Others */
 	int sendonly = -1;
-	int vsendonly = -1;
 	int numberofports;
 	int numberofmediastreams = 0;
 	int last_rtpmap_codec = 0;
@@ -8871,7 +8864,6 @@
 		case 'a':
 			if (process_sdp_a_sendonly(value, &sendonly)) {
 				processed = TRUE;
-				vsendonly = sendonly;
 			}
 			else if (process_sdp_a_audio(value, p, &newaudiortp, &last_rtpmap_codec))
 				processed = TRUE;
@@ -9128,9 +9120,7 @@
 				}
 				/* Video specific scanning */
 				else if (video) {
-					if (process_sdp_a_sendonly(value, &vsendonly)) {
-						processed = TRUE;
-					} else if (!processed_crypto && process_crypto(p, p->vrtp, &p->vsrtp, value)) {
+					if (!processed_crypto && process_crypto(p, p->vrtp, &p->vsrtp, value)) {
 						processed_crypto = TRUE;
 						processed = TRUE;
 					} else if (process_sdp_a_video(value, p, &newvideortp, &last_rtpmap_codec)) {
@@ -10409,10 +10399,9 @@
 	 * final response. For a CANCEL or ACK, we have to send to the same destination
 	 * as the original INVITE.
 	 */
-	if (sipmethod == SIP_CANCEL ||
-			(sipmethod == SIP_ACK && (p->invitestate == INV_COMPLETED || p->invitestate == INV_CANCELLED))) {
-		set_destination(p, ast_strdupa(p->uri));
-	} else if (p->route) {
+	if (p->route &&
+			!(sipmethod == SIP_CANCEL ||
+				(sipmethod == SIP_ACK && (p->invitestate == INV_COMPLETED || p->invitestate == INV_CANCELLED)))) {
 		set_destination(p, p->route->hop);
 		add_route(req, is_strict ? p->route->next : p->route);
 	}
@@ -10595,7 +10584,7 @@
 	}
 
 	p->branch = ast_random();
-	make_our_tag(p->tag, sizeof(p->tag));
+	make_our_tag(p);
 	p->ocseq = INITIAL_CSEQ;
 
 	if (useglobal_nat && addr) {
@@ -13278,7 +13267,7 @@
 			return 0;
 		} else {
 			p = dialog_ref(r->call, "getting a copy of the r->call dialog in transmit_register");
-			make_our_tag(p->tag, sizeof(p->tag));	/* create a new local tag for every register attempt */
+			make_our_tag(p);	/* create a new local tag for every register attempt */
 			ast_string_field_set(p, theirtag, NULL);	/* forget their old tag, so we don't match tags when getting response */
 		}
 	} else {
@@ -22835,8 +22824,6 @@
 				 */
 				/* Fall through */
 			case SIP_GET_DEST_EXTEN_NOT_FOUND:
-			case SIP_GET_DEST_REFUSED:
-			default:
 				{
 					char *decoded_exten = ast_strdupa(p->exten);
 					transmit_response_reliable(p, "404 Not Found", req);
@@ -22845,6 +22832,10 @@
 						" '%s' rejected because extension not found in context '%s'.\n",
 						S_OR(p->username, p->peername), ast_sockaddr_stringify(&p->recv), decoded_exten, p->context);
 				}
+				break;
+			case SIP_GET_DEST_REFUSED:
+			default:
+				transmit_response_reliable(p, "403 Forbidden", req);
 			} /* end switch */
 
 			p->invitestate = INV_COMPLETED;
@@ -22860,7 +22851,7 @@
 				ast_string_field_set(p, exten, "s");
 			/* Initialize our tag */
 
-			make_our_tag(p->tag, sizeof(p->tag));
+			make_our_tag(p);
 			/* First invitation - create the channel.  Allocation
 			 * failures are handled below. */
 			c = sip_new(p, AST_STATE_DOWN, S_OR(p->peername, NULL), NULL);
@@ -24832,7 +24823,7 @@
 
 	/* Initialize tag for new subscriptions */	
 	if (ast_strlen_zero(p->tag))
-		make_our_tag(p->tag, sizeof(p->tag));
+		make_our_tag(p);
 
 	if (!strncmp(eventheader, "presence", MAX(event_len, 8)) || !strncmp(eventheader, "dialog", MAX(event_len, 6))) { /* Presence, RFC 3842 */
 		unsigned int pidf_xml;
@@ -25324,14 +25315,15 @@
 		if (!p->initreq.headers && req->has_to_tag) {
 			/* If this is a first request and it got a to-tag, it is not for us */
 			if (!req->ignore && req->method == SIP_INVITE) {
-				/* We will be subversive here. By blanking out the to-tag of the request,
-				 * it will cause us to attach our own generated to-tag instead. This way,
-				 * when we receive an ACK, the ACK will contain the to-tag we generated,
-				 * resulting in a proper to-tag match.
+				/* Just because we think this is a dialog-starting INVITE with a to-tag
+				 * doesn't mean it actually is. It could be a reinvite for an established, but
+				 * unknown dialog. In such a case, we need to change our tag to the
+				 * incoming INVITE's to-tag so that they will recognize the 481 we send and
+				 * so that we will properly match their incoming ACK.
 				 */
-				char *to_header = (char *) get_header(req, "To");
-				char *tag = strstr(to_header, ";tag=");
-				*tag = '\0';
+				char totag[128];
+				gettag(req, "To", totag, sizeof(totag));
+				ast_string_field_set(p, tag, totag);
 				p->pendinginvite = p->icseq;
 				transmit_response_reliable(p, "481 Call/Transaction Does Not Exist", req);
 				/* Will cease to exist after ACK */
@@ -29218,6 +29210,12 @@
 	ast_rtp_instance_get_remote_address(p1->rtp, &them);
 	ast_rtp_instance_get_local_address(p1->rtp, &us);
 
+	/* If p2 is a guest call, there will be no peer. If there is no peer, there
+	 * is no directmediaha, so go ahead and allow it */
+	if (!p2->relatedpeer) {
+		return res;
+	}
+
 	if ((res = ast_apply_ha(p2->relatedpeer->directmediaha, &them)) == AST_SENSE_DENY) {
 		const char *us_addr = ast_strdupa(ast_sockaddr_stringify(&us));
 		const char *them_addr = ast_strdupa(ast_sockaddr_stringify(&them));

Modified: team/oej/darjeeling-prack-1.8/channels/sip/include/sip.h
URL: http://svnview.digium.com/svn/asterisk/team/oej/darjeeling-prack-1.8/channels/sip/include/sip.h?view=diff&rev=369427&r1=369426&r2=369427
==============================================================================
--- team/oej/darjeeling-prack-1.8/channels/sip/include/sip.h (original)
+++ team/oej/darjeeling-prack-1.8/channels/sip/include/sip.h Wed Jun 27 07:41:33 2012
@@ -963,6 +963,7 @@
 		AST_STRING_FIELD(rdnis);        /*!< Referring DNIS */
 		AST_STRING_FIELD(redircause);   /*!< Referring cause */
 		AST_STRING_FIELD(theirtag);     /*!< Their tag */
+		AST_STRING_FIELD(tag);          /*!< Our tag for this session */
 		AST_STRING_FIELD(username);     /*!< [user] name */
 		AST_STRING_FIELD(peername);     /*!< [peer] name, not set if [user] */
 		AST_STRING_FIELD(authname);     /*!< Who we use for authentication */
@@ -1012,7 +1013,6 @@
 	                                       *   for incoming calls
 	                                       */
 	unsigned short req_secure_signaling:1;/*!< Whether we are required to have secure signaling or not */
-	char tag[11];                     /*!< Our tag for this session */
 	int timer_t1;                     /*!< SIP timer T1, ms rtt */
 	int timer_b;                      /*!< SIP timer B, ms */
 	unsigned int sipoptions;          /*!< Supported SIP options on the other end */

Modified: team/oej/darjeeling-prack-1.8/include/asterisk/adsi.h
URL: http://svnview.digium.com/svn/asterisk/team/oej/darjeeling-prack-1.8/include/asterisk/adsi.h?view=diff&rev=369427&r1=369426&r2=369427
==============================================================================
--- team/oej/darjeeling-prack-1.8/include/asterisk/adsi.h (original)
+++ team/oej/darjeeling-prack-1.8/include/asterisk/adsi.h Wed Jun 27 07:41:33 2012
@@ -24,7 +24,6 @@
 #define _ASTERISK_ADSI_H
 
 #include "asterisk/callerid.h"
-#include "asterisk/optional_api.h"
 
 /*! \name ADSI parameters */
 /*@{ */
@@ -121,11 +120,13 @@
 #define ADSI_DIR_FROM_LEFT (0)
 #define ADSI_DIR_FROM_RIGHT (1)
 
+#define AST_ADSI_VERSION 1
+
 /*@} */
 
-AST_OPTIONAL_API(int, ast_adsi_begin_download, (struct ast_channel *chan, char *service, unsigned char *fdn, unsigned char *sec, int version), { return 0; });
-
-AST_OPTIONAL_API(int, ast_adsi_end_download, (struct ast_channel *chan), { return 0; });
+int ast_adsi_begin_download(struct ast_channel *chan, char *service, unsigned char *fdn, unsigned char *sec, int version);
+
+int ast_adsi_end_download(struct ast_channel *chan);
 
 /*! Restore ADSI initialization (for applications that play with ADSI
  *   and want to restore it to normal.  If you touch "INFO" then you
@@ -135,7 +136,7 @@
  * \retval 0 on success (or adsi unavailable)
  * \retval -1 on hangup
  */
-AST_OPTIONAL_API(int, ast_adsi_channel_restore, (struct ast_channel *chan), { return 0; });
+int ast_adsi_channel_restore(struct ast_channel *chan);
 
 /*!
  * \brief Display some stuff on the screen
@@ -147,7 +148,7 @@
  * \retval 0 on success (or adsi unavailable)
  * \retval -1 on hangup
  */
-AST_OPTIONAL_API(int, ast_adsi_print, (struct ast_channel *chan, char **lines, int *align, int voice), { return 0; });
+int ast_adsi_print(struct ast_channel *chan, char **lines, int *align, int voice);
 
 /*!
  * \brief Check if scripts for a given app are already loaded.
@@ -161,16 +162,16 @@
  * \retval -1 on hangup
  * \retval 1 if script already loaded.
  */
-AST_OPTIONAL_API(int, ast_adsi_load_session, (struct ast_channel *chan, unsigned char *app, int ver, int data), { return 0; });
-AST_OPTIONAL_API(int, ast_adsi_unload_session, (struct ast_channel *chan), { return 0; });
+int ast_adsi_load_session(struct ast_channel *chan, unsigned char *app, int ver, int data);
+int ast_adsi_unload_session(struct ast_channel *chan);
 
 /* ADSI Layer 2 transmission functions */
-AST_OPTIONAL_API(int, ast_adsi_transmit_message, (struct ast_channel *chan, unsigned char *msg, int msglen, int msgtype), { return 0; });
-AST_OPTIONAL_API(int, ast_adsi_transmit_message_full, (struct ast_channel *chan, unsigned char *msg, int msglen, int msgtype, int dowait), { return 0; });
+int ast_adsi_transmit_message(struct ast_channel *chan, unsigned char *msg, int msglen, int msgtype);
+int ast_adsi_transmit_message_full(struct ast_channel *chan, unsigned char *msg, int msglen, int msgtype, int dowait);
 /*! Read some encoded DTMF data.
  * Returns number of bytes received
  */
-AST_OPTIONAL_API(int, ast_adsi_read_encoded_dtmf, (struct ast_channel *chan, unsigned char *buf, int maxlen), { return 0; });
+int ast_adsi_read_encoded_dtmf(struct ast_channel *chan, unsigned char *buf, int maxlen);
 
 /* ADSI Layer 3 creation functions */
 
@@ -184,22 +185,22 @@
  * \retval -1 on error.
  */
 
-AST_OPTIONAL_API(int, ast_adsi_connect_session, (unsigned char *buf, unsigned char *fdn, int ver), { return 0; });
+int ast_adsi_connect_session(unsigned char *buf, unsigned char *fdn, int ver);
 
 /*! Build Query CPE ID of equipment.
  *  Returns number of bytes added to message
  */
-AST_OPTIONAL_API(int, ast_adsi_query_cpeid, (unsigned char *buf), { return 0; });
-AST_OPTIONAL_API(int, ast_adsi_query_cpeinfo, (unsigned char *buf), { return 0; });
+int ast_adsi_query_cpeid(unsigned char *buf);
+int ast_adsi_query_cpeinfo(unsigned char *buf);
 
 /*! Get CPE ID from an attached ADSI compatible CPE.
  * Returns 1 on success, storing 4 bytes of CPE ID at buf
  * or -1 on hangup, or 0 if there was no hangup but it failed to find the
  * device ID.  Returns to voice mode if "voice" is non-zero.
  */
-AST_OPTIONAL_API(int, ast_adsi_get_cpeid, (struct ast_channel *chan, unsigned char *cpeid, int voice), { return 0; });
-
-AST_OPTIONAL_API(int, ast_adsi_get_cpeinfo, (struct ast_channel *chan, int *width, int *height, int *buttons, int voice), { return 0; });
+int ast_adsi_get_cpeid(struct ast_channel *chan, unsigned char *cpeid, int voice);
+
+int ast_adsi_get_cpeinfo(struct ast_channel *chan, int *width, int *height, int *buttons, int voice);
 
 /*!
  * \brief Begin an ADSI script download
@@ -213,7 +214,7 @@
  * \retval -1 on error.
  */
 
-AST_OPTIONAL_API(int, ast_adsi_download_connect, (unsigned char *buf, char *service, unsigned char *fdn, unsigned char *sec, int ver), { return 0; });
+int ast_adsi_download_connect(unsigned char *buf, char *service, unsigned char *fdn, unsigned char *sec, int ver);
 
 /*!
  * \brief Disconnects a running session.
@@ -222,7 +223,7 @@
  * \retval number of bytes added to buffer
  * \retval -1 on error.
  */
-AST_OPTIONAL_API(int, ast_adsi_disconnect_session, (unsigned char *buf), { return 0; });
+int ast_adsi_disconnect_session(unsigned char *buf);
 
 /*!
  * \brief Disconnects (and hopefully saves) a downloaded script
@@ -231,7 +232,7 @@
  * \retval number of bytes added to buffer
  * \retval -1 on error.
  */
-AST_OPTIONAL_API(int, ast_adsi_download_disconnect, (unsigned char *buf), { return 0; });
+int ast_adsi_download_disconnect(unsigned char *buf);
 
 /*!
  * \brief Puts CPE in data mode.
@@ -240,9 +241,9 @@
  * \retval number of bytes added to buffer
  * \retval -1 on error.
  */
-AST_OPTIONAL_API(int, ast_adsi_data_mode, (unsigned char *buf), { return 0; });
-AST_OPTIONAL_API(int, ast_adsi_clear_soft_keys, (unsigned char *buf), { return 0; });
-AST_OPTIONAL_API(int, ast_adsi_clear_screen, (unsigned char *buf), { return 0; });
+int ast_adsi_data_mode(unsigned char *buf);
+int ast_adsi_clear_soft_keys(unsigned char *buf);
+int ast_adsi_clear_screen(unsigned char *buf);
 
 /*!
  * \brief Puts CPE in voice mode.
@@ -252,13 +253,13 @@
  * \retval number of bytes added to buffer
  * \retval -1 on error.
  */
-AST_OPTIONAL_API(int, ast_adsi_voice_mode, (unsigned char *buf, int when), { return 0; });
+int ast_adsi_voice_mode(unsigned char *buf, int when);
 
 /*!
  * \brief Returns non-zero if Channel does or might support ADSI
  * \param chan Channel to check
  */
-AST_OPTIONAL_API(int, ast_adsi_available, (struct ast_channel *chan), { return 0; });
+int ast_adsi_available(struct ast_channel *chan);
 
 /*!
  * \brief Loads a line of info into the display.
@@ -274,7 +275,7 @@
  * \retval -1 on error.
  */
 
-AST_OPTIONAL_API(int, ast_adsi_display, (unsigned char *buf, int page, int line, int just, int wrap, char *col1, char *col2), { return 0; });
+int ast_adsi_display(unsigned char *buf, int page, int line, int just, int wrap, char *col1, char *col2);
 
 /*!
  * \brief Sets the current line and page.
@@ -286,7 +287,7 @@
  * \retval -1 on error.
  */
 
-AST_OPTIONAL_API(int, ast_adsi_set_line, (unsigned char *buf, int page, int line), { return 0; });
+int ast_adsi_set_line(unsigned char *buf, int page, int line);
 
 /*!
  * \brief Creates "load soft key" parameters
@@ -300,7 +301,7 @@
  * \retval number of bytes added to buffer
  * \retval -1 on error.
  */
-AST_OPTIONAL_API(int, ast_adsi_load_soft_key, (unsigned char *buf, int key, const char *llabel, const char *slabel, char *ret, int data), { return 0; });
+int ast_adsi_load_soft_key(unsigned char *buf, int key, const char *llabel, const char *slabel, char *ret, int data);
 
 /*!
  * \brief Set which soft keys should be displayed
@@ -311,7 +312,7 @@
  * \retval number of bytes added to buffer
  * \retval -1 on error.
  */
-AST_OPTIONAL_API(int, ast_adsi_set_keys, (unsigned char *buf, unsigned char *keys), { return 0; });
+int ast_adsi_set_keys(unsigned char *buf, unsigned char *keys);
 
 /*!
  * \brief Set input information
@@ -325,7 +326,7 @@
  * \retval number of bytes added to buffer
  * \retval -1 on error.
  */
-AST_OPTIONAL_API(int, ast_adsi_input_control, (unsigned char *buf, int page, int line, int display, int format, int just), { return 0; });
+int ast_adsi_input_control(unsigned char *buf, int page, int line, int display, int format, int just);
 
 /*!
  * \brief Set input format
@@ -339,7 +340,41 @@
  * \retval number of bytes added to buffer
  * \retval -1 on error.
  */
-AST_OPTIONAL_API(int, ast_adsi_input_format, (unsigned char *buf, int num, int dir, int wrap, char *format1, char *format2), { return 0; });
+int ast_adsi_input_format(unsigned char *buf, int num, int dir, int wrap, char *format1, char *format2);
+
+struct adsi_funcs {
+	unsigned int version;
+	int (*begin_download)(struct ast_channel *chan, char *service, unsigned char *fdn, unsigned char *sec, int version);
+	int (*end_download)(struct ast_channel *chan);
+	int (*channel_restore) (struct ast_channel *chan);
+	int (*print) (struct ast_channel *chan, char **lines, int *align, int voice);
+	int (*load_session) (struct ast_channel *chan, unsigned char *app, int ver, int data);
+	int (*unload_session) (struct ast_channel *chan);
+	int (*transmit_message) (struct ast_channel *chan, unsigned char *msg, int msglen, int msgtype);
+	int (*transmit_message_full) (struct ast_channel *chan, unsigned char *msg, int msglen, int msgtype, int dowait);
+	int (*read_encoded_dtmf) (struct ast_channel *chan, unsigned char *buf, int maxlen);
+	int (*connect_session) (unsigned char *buf, unsigned char *fdn, int ver);
+	int (*query_cpeid) (unsigned char *buf);
+	int (*query_cpeinfo) (unsigned char *buf);
+	int (*get_cpeid) (struct ast_channel *chan, unsigned char *cpeid, int voice);
+	int (*get_cpeinfo) (struct ast_channel *chan, int *width, int *height, int *buttons, int voice);
+	int (*download_connect) (unsigned char *buf, char *service, unsigned char *fdn, unsigned char *sec, int ver);
+	int (*disconnect_session) (unsigned char *buf);
+	int (*download_disconnect) (unsigned char *buf);
+	int (*data_mode) (unsigned char *buf);
+	int (*clear_soft_keys) (unsigned char *buf);
+	int (*clear_screen) (unsigned char *buf);
+	int (*voice_mode) (unsigned char *buf, int when);
+	int (*available) (struct ast_channel *chan);
+	int (*display) (unsigned char *buf, int page, int line, int just, int wrap, char *col1, char *col2);
+	int (*set_line) (unsigned char *buf, int page, int line);
+	int (*load_soft_key) (unsigned char *buf, int key, const char *llabel, const char *slabel, char *ret, int data);
+	int (*set_keys) (unsigned char *buf, unsigned char *keys);
+	int (*input_control) (unsigned char *buf, int page, int line, int display, int format, int just);
+	int (*input_format) (unsigned char *buf, int num, int dir, int wrap, char *format1, char *format2);
+};
+
+void ast_adsi_install_funcs(const struct adsi_funcs *funcs);
 
 #endif /* _ASTERISK_ADSI_H */
 

Modified: team/oej/darjeeling-prack-1.8/include/asterisk/netsock2.h
URL: http://svnview.digium.com/svn/asterisk/team/oej/darjeeling-prack-1.8/include/asterisk/netsock2.h?view=diff&rev=369427&r1=369426&r2=369427
==============================================================================
--- team/oej/darjeeling-prack-1.8/include/asterisk/netsock2.h (original)
+++ team/oej/darjeeling-prack-1.8/include/asterisk/netsock2.h Wed Jun 27 07:41:33 2012
@@ -343,7 +343,8 @@
  *
  * Host names are NOT allowed.
  *
- * \param[out] addr The resulting ast_sockaddr
+ * \param[out] addr The resulting ast_sockaddr. This MAY be NULL from 
+ * functions that are performing validity checks only, e.g. ast_parse_arg().
  * \param str The string to parse
  * \param flags If set to zero, a port MAY be present. If set to
  * PARSE_PORT_IGNORE, a port MAY be present but will be ignored. If set to

Modified: team/oej/darjeeling-prack-1.8/main/Makefile
URL: http://svnview.digium.com/svn/asterisk/team/oej/darjeeling-prack-1.8/main/Makefile?view=diff&rev=369427&r1=369426&r2=369427
==============================================================================
--- team/oej/darjeeling-prack-1.8/main/Makefile (original)
+++ team/oej/darjeeling-prack-1.8/main/Makefile Wed Jun 27 07:41:33 2012
@@ -26,9 +26,6 @@
 # otherwise modules will not have them available if none of the static
 # objects use it.
 OBJS+=stdtime/localtime.o
-ifneq ($(firstword $(subst :, ,$(WEAKREF))),1)
-OBJS+=../res/res_adsi.o
-endif
 
 AST_LIBS += $(OPENSSL_LIB)
 AST_LIBS += $(BKTR_LIB)

Modified: team/oej/darjeeling-prack-1.8/main/abstract_jb.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/darjeeling-prack-1.8/main/abstract_jb.c?view=diff&rev=369427&r1=369426&r2=369427
==============================================================================
--- team/oej/darjeeling-prack-1.8/main/abstract_jb.c (original)
+++ team/oej/darjeeling-prack-1.8/main/abstract_jb.c Wed Jun 27 07:41:33 2012
@@ -28,6 +28,10 @@
  *
  *
  */
+
+/*** MODULEINFO
+	<support_level>core</support_level>
+ ***/
 
 #include "asterisk.h"
 

Modified: team/oej/darjeeling-prack-1.8/main/alaw.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/darjeeling-prack-1.8/main/alaw.c?view=diff&rev=369427&r1=369426&r2=369427
==============================================================================
--- team/oej/darjeeling-prack-1.8/main/alaw.c (original)
+++ team/oej/darjeeling-prack-1.8/main/alaw.c Wed Jun 27 07:41:33 2012
@@ -22,6 +22,10 @@
  *
  * \author Mark Spencer <markster at digium.com>
  */
+
+/*** MODULEINFO
+	<support_level>core</support_level>
+ ***/
 
 #include "asterisk.h"
 

Modified: team/oej/darjeeling-prack-1.8/main/aoc.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/darjeeling-prack-1.8/main/aoc.c?view=diff&rev=369427&r1=369426&r2=369427
==============================================================================
--- team/oej/darjeeling-prack-1.8/main/aoc.c (original)
+++ team/oej/darjeeling-prack-1.8/main/aoc.c Wed Jun 27 07:41:33 2012
@@ -22,6 +22,10 @@
  *
  * \author David Vossel <dvossel at digium.com>
  */
+
+/*** MODULEINFO
+	<support_level>core</support_level>
+ ***/
 
 #include "asterisk.h"
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$");

Modified: team/oej/darjeeling-prack-1.8/main/asterisk.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/darjeeling-prack-1.8/main/asterisk.c?view=diff&rev=369427&r1=369426&r2=369427
==============================================================================
--- team/oej/darjeeling-prack-1.8/main/asterisk.c (original)
+++ team/oej/darjeeling-prack-1.8/main/asterisk.c Wed Jun 27 07:41:33 2012
@@ -58,6 +58,10 @@
   of PBX core functions and CLI interface.
   
  */
+
+/*** MODULEINFO
+	<support_level>core</support_level>
+ ***/
 
 #include "asterisk.h"
 

Modified: team/oej/darjeeling-prack-1.8/main/astfd.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/darjeeling-prack-1.8/main/astfd.c?view=diff&rev=369427&r1=369426&r2=369427
==============================================================================
--- team/oej/darjeeling-prack-1.8/main/astfd.c (original)
+++ team/oej/darjeeling-prack-1.8/main/astfd.c Wed Jun 27 07:41:33 2012
@@ -22,6 +22,10 @@
  *
  * \author Tilghman Lesher <tlesher at digium.com>
  */
+
+/*** MODULEINFO
+	<support_level>core</support_level>
+ ***/
 
 #include "asterisk.h"
 

Modified: team/oej/darjeeling-prack-1.8/main/astmm.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/darjeeling-prack-1.8/main/astmm.c?view=diff&rev=369427&r1=369426&r2=369427
==============================================================================
--- team/oej/darjeeling-prack-1.8/main/astmm.c (original)
+++ team/oej/darjeeling-prack-1.8/main/astmm.c Wed Jun 27 07:41:33 2012
@@ -22,6 +22,10 @@
  *
  * \author Mark Spencer <markster at digium.com>
  */
+
+/*** MODULEINFO
+	<support_level>core</support_level>
+ ***/
 
 #include "asterisk.h"
 

Modified: team/oej/darjeeling-prack-1.8/main/astobj2.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/darjeeling-prack-1.8/main/astobj2.c?view=diff&rev=369427&r1=369426&r2=369427
==============================================================================
--- team/oej/darjeeling-prack-1.8/main/astobj2.c (original)
+++ team/oej/darjeeling-prack-1.8/main/astobj2.c Wed Jun 27 07:41:33 2012
@@ -17,6 +17,11 @@
 /*
  * Function implementing astobj2 objects.
  */
+
+/*** MODULEINFO
+	<support_level>core</support_level>
+ ***/
+
 #include "asterisk.h"
 
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")

Modified: team/oej/darjeeling-prack-1.8/main/audiohook.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/darjeeling-prack-1.8/main/audiohook.c?view=diff&rev=369427&r1=369426&r2=369427
==============================================================================
--- team/oej/darjeeling-prack-1.8/main/audiohook.c (original)
+++ team/oej/darjeeling-prack-1.8/main/audiohook.c Wed Jun 27 07:41:33 2012
@@ -22,6 +22,10 @@
  *
  * \author Joshua Colp <jcolp at digium.com>
  */
+
+/*** MODULEINFO
+	<support_level>core</support_level>
+ ***/
 
 #include "asterisk.h"
 

Modified: team/oej/darjeeling-prack-1.8/main/autochan.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/darjeeling-prack-1.8/main/autochan.c?view=diff&rev=369427&r1=369426&r2=369427
==============================================================================
--- team/oej/darjeeling-prack-1.8/main/autochan.c (original)
+++ team/oej/darjeeling-prack-1.8/main/autochan.c Wed Jun 27 07:41:33 2012
@@ -22,6 +22,10 @@
  *
  * \author Mark Michelson <mmichelson at digium.com>
  */
+
+/*** MODULEINFO
+	<support_level>core</support_level>
+ ***/
 
 #include "asterisk.h"
 

Modified: team/oej/darjeeling-prack-1.8/main/autoservice.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/darjeeling-prack-1.8/main/autoservice.c?view=diff&rev=369427&r1=369426&r2=369427
==============================================================================
--- team/oej/darjeeling-prack-1.8/main/autoservice.c (original)
+++ team/oej/darjeeling-prack-1.8/main/autoservice.c Wed Jun 27 07:41:33 2012
@@ -24,6 +24,10 @@
  * \author Mark Spencer <markster at digium.com> 
  * \author Russell Bryant <russell at digium.com>
  */
+
+/*** MODULEINFO
+	<support_level>core</support_level>
+ ***/
 
 #include "asterisk.h"
 

Modified: team/oej/darjeeling-prack-1.8/main/callerid.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/darjeeling-prack-1.8/main/callerid.c?view=diff&rev=369427&r1=369426&r2=369427
==============================================================================
--- team/oej/darjeeling-prack-1.8/main/callerid.c (original)
+++ team/oej/darjeeling-prack-1.8/main/callerid.c Wed Jun 27 07:41:33 2012
@@ -22,6 +22,10 @@
  *
  * \author Mark Spencer <markster at digium.com> 
  */
+
+/*** MODULEINFO
+	<support_level>core</support_level>
+ ***/
 
 #include "asterisk.h"
 

Modified: team/oej/darjeeling-prack-1.8/main/ccss.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/darjeeling-prack-1.8/main/ccss.c?view=diff&rev=369427&r1=369426&r2=369427

[... 2084 lines stripped ...]



More information about the asterisk-commits mailing list