[asterisk-commits] branch oej/multiparking r14108 - in /team/oej/multiparking: ./ channels/ code...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Wed Mar 22 00:26:49 MST 2006


Author: oej
Date: Wed Mar 22 01:26:42 2006
New Revision: 14108

URL: http://svn.digium.com/view/asterisk?rev=14108&view=rev
Log:
Reset automerge

Modified:
    team/oej/multiparking/   (props changed)
    team/oej/multiparking/channels/chan_zap.c
    team/oej/multiparking/codecs/Makefile
    team/oej/multiparking/configs/features.conf.sample
    team/oej/multiparking/configs/zapata.conf.sample
    team/oej/multiparking/doc/enum.txt
    team/oej/multiparking/include/asterisk/module.h
    team/oej/multiparking/res/res_features.c

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

Propchange: team/oej/multiparking/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Propchange: team/oej/multiparking/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Mar 22 01:26:42 2006
@@ -1,1 +1,1 @@
-/trunk:1-13945
+/trunk:1-14107

Modified: team/oej/multiparking/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/team/oej/multiparking/channels/chan_zap.c?rev=14108&r1=14107&r2=14108&view=diff
==============================================================================
--- team/oej/multiparking/channels/chan_zap.c (original)
+++ team/oej/multiparking/channels/chan_zap.c Wed Mar 22 01:26:42 2006
@@ -226,6 +226,7 @@
 static int cid_start = CID_START_RING;
 static int zaptrcallerid = 0;
 static int cur_signalling = -1;
+static int cur_outsignalling = -1;
 
 static ast_group_t cur_group = 0;
 static ast_group_t cur_callergroup = 0;
@@ -550,6 +551,7 @@
 	
 	int sig;					/*!< Signalling style */
 	int radio;					/*!< radio type */
+	int outsigmod;					/*!< Outbound Signalling style (modifier) */
 	float rxgain;
 	float txgain;
 	int tonezone;					/*!< tone zone for this chan, or -1 for default */
@@ -1759,7 +1761,7 @@
 static int zt_call(struct ast_channel *ast, char *rdest, int timeout)
 {
 	struct zt_pvt *p = ast->tech_pvt;
-	int x, res, index;
+	int x, res, index,mysig;
 	char *c, *n, *l;
 #ifdef ZAPATA_PRI
 	char *s=NULL;
@@ -1794,7 +1796,10 @@
 
 	set_actual_gain(p->subs[SUB_REAL].zfd, 0, p->rxgain, p->txgain, p->law);
 
-	switch(p->sig) {
+	mysig = p->sig;
+	if (p->outsigmod) mysig = p->outsigmod;
+
+	switch(mysig) {
 	case SIG_FXOLS:
 	case SIG_FXOGS:
 	case SIG_FXOKS:
@@ -1936,7 +1941,7 @@
 
 		c += p->stripmsd;
 
-		switch (p->sig) {
+		switch (mysig) {
 		case SIG_FEATD:
 			l = ast->cid.cid_num;
 			if (l) 
@@ -2055,7 +2060,7 @@
 			ast_mutex_unlock(&p->lock);
 			return -1;
 		}
-		if (p->sig != SIG_FXSKS) {
+		if (mysig != SIG_FXSKS) {
 			p->dop.op = ZT_DIAL_OP_REPLACE;
 			s = strchr(c + p->stripmsd, 'w');
 			if (s) {
@@ -2084,7 +2089,7 @@
 			pri_rel(p->pri);
 			ast_mutex_unlock(&p->lock);
 		}
-		if (p->bearer || (p->sig == SIG_FXSKS)) {
+		if (p->bearer || (mysig == SIG_FXSKS)) {
 			if (p->bearer) {
 				ast_log(LOG_DEBUG, "Oooh, I have a bearer on %d (%d:%d)\n", PVT_TO_CHANNEL(p->bearer), p->bearer->logicalspan, p->bearer->channel);
 				p->bearer->call = p->call;
@@ -3590,7 +3595,7 @@
 static struct ast_frame *zt_handle_event(struct ast_channel *ast)
 {
 	int res,x;
-	int index;
+	int index,mysig;
 	char *c;
 	struct zt_pvt *p = ast->tech_pvt;
 	pthread_t threadid;
@@ -3602,6 +3607,8 @@
 	pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
 
 	index = zt_get_index(ast, p, 0);
+	mysig = p->sig;
+	if (p->outsigmod) mysig = p->outsigmod;
 	p->subs[index].f.frametype = AST_FRAME_NULL;
 	p->subs[index].f.subclass = 0;
 	p->subs[index].f.datalen = 0;
@@ -3696,7 +3703,7 @@
 					p->echobreak = 0;
 				} else {
 					p->dialing = 0;
-					if ((p->sig == SIG_E911) || (p->sig == SIG_FGC_CAMA) || (p->sig == SIG_FGC_CAMAMF)) {
+					if ((mysig == SIG_E911) || (mysig == SIG_FGC_CAMA) || (mysig == SIG_FGC_CAMAMF)) {
 						/* if thru with dialing after offhook */
 						if (ast->_state == AST_STATE_DIALING_OFFHOOK) {
 							ast_setstate(ast, AST_STATE_UP);
@@ -3711,7 +3718,7 @@
 					if (ast->_state == AST_STATE_DIALING) {
 						if ((p->callprogress & 1) && CANPROGRESSDETECT(p) && p->dsp && p->outgoing) {
 							ast_log(LOG_DEBUG, "Done dialing, but waiting for progress detection before doing more...\n");
-						} else if (p->confirmanswer || (!p->dialednone && ((p->sig == SIG_EM) || (p->sig == SIG_EM_E1) ||  (p->sig == SIG_EMWINK) || (p->sig == SIG_FEATD) || (p->sig == SIG_FEATDMF_TA) || (p->sig == SIG_FEATDMF) || (p->sig == SIG_E911) || (p->sig == SIG_FGC_CAMA) || (p->sig == SIG_FGC_CAMAMF) || (p->sig == SIG_FEATB) || (p->sig == SIG_SF) || (p->sig == SIG_SFWINK) || (p->sig == SIG_SF_FEATD) || (p->sig == SIG_SF_FEATDMF) || (p->sig == SIG_SF_FEATB)))) {
+						} else if (p->confirmanswer || (!p->dialednone && ((mysig == SIG_EM) || (mysig == SIG_EM_E1) ||  (mysig == SIG_EMWINK) || (mysig == SIG_FEATD) || (mysig == SIG_FEATDMF_TA) || (mysig == SIG_FEATDMF) || (mysig == SIG_E911) || (mysig == SIG_FGC_CAMA) || (mysig == SIG_FGC_CAMAMF) || (mysig == SIG_FEATB) || (mysig == SIG_SF) || (mysig == SIG_SFWINK) || (mysig == SIG_SF_FEATD) || (mysig == SIG_SF_FEATDMF) || (mysig == SIG_SF_FEATB)))) {
 							ast_setstate(ast, AST_STATE_RINGING);
 						} else if (!p->answeronpolarityswitch) {
 							ast_setstate(ast, AST_STATE_UP);
@@ -3872,7 +3879,7 @@
 			}
 			/* for E911, its supposed to wait for offhook then dial
 			   the second half of the dial string */
-			if (((p->sig == SIG_E911) || (p->sig == SIG_FGC_CAMA) || (p->sig == SIG_FGC_CAMAMF)) && (ast->_state == AST_STATE_DIALING_OFFHOOK)) {
+			if (((mysig == SIG_E911) || (mysig == SIG_FGC_CAMA) || (mysig == SIG_FGC_CAMAMF)) && (ast->_state == AST_STATE_DIALING_OFFHOOK)) {
 				c = strchr(p->dialdest, '/');
 				if (c)
 					c++;
@@ -4063,7 +4070,7 @@
 			if (p->radio) break;
 			/* Remember last time we got a flash-hook */
 			gettimeofday(&p->flashtime, NULL);
-			switch(p->sig) {
+			switch(mysig) {
 			case SIG_FXOLS:
 			case SIG_FXOGS:
 			case SIG_FXOKS:
@@ -4264,7 +4271,7 @@
 		case ZT_EVENT_HOOKCOMPLETE:
 			if (p->inalarm) break;
 			if (p->radio) break;
-			switch(p->sig) {
+			switch(mysig) {
 			case SIG_FXSLS:  /* only interesting for FXS */
 			case SIG_FXSGS:
 			case SIG_FXSKS:
@@ -5440,6 +5447,17 @@
 			case SIG_FGC_CAMAMF:
 			case SIG_SF_FEATDMF:
 				res = my_getsigstr(chan, dtmfbuf + 1, "#", 3000);
+				/* if international caca, do it again to get real ANO */
+				if ((p->sig == SIG_FEATDMF) && (dtmfbuf[1] != '0') && (strlen(dtmfbuf) != 14))
+				{
+					if (zt_wink(p, index)) return NULL;
+					dtmfbuf[0] = 0;
+					/* Wait for the first digit (up to 5 seconds). */
+					res = ast_waitfordigit(chan, 5000);
+					if (res <= 0) break;
+					dtmfbuf[0] = res;
+					res = my_getsigstr(chan, dtmfbuf + 1, "#", 3000);
+				}
 				if (res > 0) {
 					/* if E911, take off hook */
 					if (p->sig == SIG_E911)
@@ -7001,7 +7019,7 @@
 
 #endif
 
-static struct zt_pvt *mkintf(int channel, int signalling, int radio, struct zt_pri *pri, int reloading)
+static struct zt_pvt *mkintf(int channel, int signalling, int outsignalling, int radio, struct zt_pri *pri, int reloading)
 {
 	/* Make a zt_pvt structure for this interface (or CRV if "pri" is specified) */
 	struct zt_pvt *tmp = NULL, *tmp2,  *prev = NULL;
@@ -7309,6 +7327,7 @@
 		tmp->immediate = immediate;
 		tmp->transfertobusy = transfertobusy;
 		tmp->sig = signalling;
+		tmp->outsigmod = outsignalling;
 		tmp->radio = radio;
 		tmp->ringt_base = ringt_base;
 		tmp->firstradio = 0;
@@ -10520,11 +10539,12 @@
 					finish = start;
 					start = x;
 				}
+				if (cur_outsignalling < 0) cur_outsignalling = cur_signalling;
 				for (x=start;x<=finish;x++) {
 #ifdef ZAPATA_PRI
-					tmp = mkintf(x, cur_signalling, cur_radio, pri, reload);
+					tmp = mkintf(x, cur_signalling, cur_outsignalling, cur_radio, pri, reload);
 #else					
-					tmp = mkintf(x, cur_signalling, cur_radio, NULL, reload);
+					tmp = mkintf(x, cur_signalling, cur_outsignalling, cur_radio, NULL, reload);
 #endif					
 
 					if (tmp) {
@@ -10731,6 +10751,7 @@
 				amaflags = y;
 		} else if(!reload){ 
 			 if (!strcasecmp(v->name, "signalling")) {
+				cur_outsignalling = -1;
 				if (!strcasecmp(v->value, "em")) {
 					cur_signalling = SIG_EM;
 				} else if (!strcasecmp(v->value, "em_e1")) {
@@ -10857,6 +10878,42 @@
 				} else {
 					ast_log(LOG_ERROR, "Unknown signalling method '%s'\n", v->value);
 				}
+			 } else if (!strcasecmp(v->name, "outsignalling")) {
+				if (!strcasecmp(v->value, "em")) {
+					cur_outsignalling = SIG_EM;
+				} else if (!strcasecmp(v->value, "em_e1")) {
+					cur_outsignalling = SIG_EM_E1;
+				} else if (!strcasecmp(v->value, "em_w")) {
+					cur_outsignalling = SIG_EMWINK;
+				} else if (!strcasecmp(v->value, "sf")) {
+					cur_outsignalling = SIG_SF;
+				} else if (!strcasecmp(v->value, "sf_w")) {
+					cur_outsignalling = SIG_SFWINK;
+				} else if (!strcasecmp(v->value, "sf_featd")) {
+					cur_outsignalling = SIG_FEATD;
+				} else if (!strcasecmp(v->value, "sf_featdmf")) {
+					cur_outsignalling = SIG_FEATDMF;
+				} else if (!strcasecmp(v->value, "sf_featb")) {
+					cur_outsignalling = SIG_SF_FEATB;
+				} else if (!strcasecmp(v->value, "sf")) {
+					cur_outsignalling = SIG_SF;
+				} else if (!strcasecmp(v->value, "featd")) {
+					cur_outsignalling = SIG_FEATD;
+				} else if (!strcasecmp(v->value, "featdmf")) {
+					cur_outsignalling = SIG_FEATDMF;
+				} else if (!strcasecmp(v->value, "featdmf_ta")) {
+					cur_outsignalling = SIG_FEATDMF_TA;
+				} else if (!strcasecmp(v->value, "e911")) {
+					cur_outsignalling = SIG_E911;
+				} else if (!strcasecmp(v->value, "fgccama")) {
+					cur_outsignalling = SIG_FGC_CAMA;
+				} else if (!strcasecmp(v->value, "fgccamamf")) {
+					cur_outsignalling = SIG_FGC_CAMAMF;
+				} else if (!strcasecmp(v->value, "featb")) {
+					cur_outsignalling = SIG_FEATB;
+				} else {
+					ast_log(LOG_ERROR, "Unknown signalling method '%s'\n", v->value);
+				}
 #ifdef ZAPATA_R2
 			} else if (!strcasecmp(v->name, "r2country")) {
 				r2prot = str2r2prot(v->value);
@@ -11136,7 +11193,7 @@
 		cur_callergroup = 0;
 		cur_pickupgroup = 0;
 	
-		tmp = mkintf(CHAN_PSEUDO, cur_signalling, cur_radio, NULL, reload);
+		tmp = mkintf(CHAN_PSEUDO, cur_signalling, cur_signalling, cur_radio, NULL, reload);
 
 		if (tmp) {
 			if (option_verbose > 2)

Modified: team/oej/multiparking/codecs/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/multiparking/codecs/Makefile?rev=14108&r1=14107&r2=14108&view=diff
==============================================================================
--- team/oej/multiparking/codecs/Makefile (original)
+++ team/oej/multiparking/codecs/Makefile Wed Mar 22 01:26:42 2006
@@ -26,9 +26,8 @@
   LIBG723=g723.1/libg723.a
 endif
 
-ifeq ($(wildcard g723.1b/coder2.c),)
-  MODS:=$(filter-out codec_g723_1b.so,$(MODS))
-else
+ifneq ($(wildcard g723.1b/coder2.c),)
+  MODS+=codec_g723_1b.so
   LIBG723B=g723.1b/libg723b.a
 endif
 

Modified: team/oej/multiparking/configs/features.conf.sample
URL: http://svn.digium.com/view/asterisk/team/oej/multiparking/configs/features.conf.sample?rev=14108&r1=14107&r2=14108&view=diff
==============================================================================
--- team/oej/multiparking/configs/features.conf.sample (original)
+++ team/oej/multiparking/configs/features.conf.sample Wed Mar 22 01:26:42 2006
@@ -1,36 +1,42 @@
 ;
-; Sample Parking configuration
+; Sample Call Features (parking, transfer, etc) configuration
 ;
 
 [general]
-parkext => 700			; What ext. to dial to park	(all parking lots)
+parkext => 700			; What extension to dial to park	(all parking lots)
 parkpos => 701-720		; What extensions to park calls on (default parking lot)
 context => parkedcalls		; Which context parked calls are in (default parking lot)
 ;findslot => next		; Continue to the 'next' parking space. Defaults to 'first' available (default parking lot)
 ;parkingtime => 45		; Number of seconds a call can be parked for 
 				; (default is 45 seconds)
-;transferdigittimeout => 3	; Number of seconds to wait between digits when transfering a call
 ;courtesytone = beep		; Sound file to play to the parked caller 
 				; when someone dials a parked call
 				; or the Touch Monitor is activated/deactivated.
 ;parkedplay = caller		; Who to play the courtesy tone to when picking up a parked call
 				; one of: parked, caller, both  (default is caller)
+;adsipark = yes			; if you want ADSI parking announcements
+;findslot => next		; Continue to the 'next' parking space. Defaults to 'first' available
+;transferdigittimeout => 3	; Number of seconds to wait between digits when transfering a call
+				; (default is 3 seconds)
 ;xfersound = beep		; to indicate an attended transfer is complete
 ;xferfailsound = beeperr	; to indicate a failed transfer
-;adsipark = yes			; if you want ADSI parking announcements
-;pickupexten = *8		; Configure the pickup extension.  Default is *8
+;pickupexten = *8		; Configure the pickup extension  (default is *8)
 ;featuredigittimeout = 500	; Max time (ms) between digits for 
-				; feature activation.  Default is 500
-
+				; feature activation  (default is 500 ms)
 
 
 [featuremap]
-;blindxfer => #1		; Blind transfer
-;disconnect => *0		; Disconnect
-;automon => *1			; One Touch Record (a.k.a. Touch Monitor)
+;blindxfer => #1		; Blind transfer  (default is #)
+;disconnect => *0		; Disconnect  (default is *)
+;automon => *1			; One Touch Record a.k.a. Touch Monitor
 ;atxfer => *2			; Attended transfer
 
 [applicationmap]
+; Note that the DYNAMIC_FEATURES channel variable must be set to use the features
+; defined here.  The value of DYNAMIC_FEATURES should be the names of the features
+; to allow the channel to use separated by '#'.  For example:
+;    Set(DYNAMIC_FEATURES=myfeature1#myfeature2#myfeature3)
+;
 ;testfeature => #9,callee,Playback,tt-monkeys	;Play tt-monkeys to 
 						;callee if #9 was pressed
 ;pauseMonitor   => #1,caller,Pausemonitor	;Pause monitoring on channel

Modified: team/oej/multiparking/configs/zapata.conf.sample
URL: http://svn.digium.com/view/asterisk/team/oej/multiparking/configs/zapata.conf.sample?rev=14108&r1=14107&r2=14108&view=diff
==============================================================================
--- team/oej/multiparking/configs/zapata.conf.sample (original)
+++ team/oej/multiparking/configs/zapata.conf.sample Wed Mar 22 01:26:42 2006
@@ -189,6 +189,15 @@
 ;
 signalling=fxo_ls
 ;
+; If you have an outbound signalling format that is different from format
+; specified above (but compatible), you can specify outbound signalling format,
+; (see below). The 'signalling' format specified will be the inbound signalling
+; format. If you only specify 'signalling', then it will be the format for
+; both inbound and outbound.
+; 
+; signaling=featdmf
+; outsignalling=featb
+;
 ; For Feature Group D Tandem access, to set the default CIC and OZZ use these
 ; parameters:
 ;defaultozz=0000

Modified: team/oej/multiparking/doc/enum.txt
URL: http://svn.digium.com/view/asterisk/team/oej/multiparking/doc/enum.txt?rev=14108&r1=14107&r2=14108&view=diff
==============================================================================
--- team/oej/multiparking/doc/enum.txt (original)
+++ team/oej/multiparking/doc/enum.txt Wed Mar 22 01:26:42 2006
@@ -26,10 +26,10 @@
 function is then up to the administrator to implement in a way that
 best suits their environment.
 
-Function: ENUMLOOKUP(<number>[,pointer_type[,options[,zone_suffix]]])
-
-  Performs an ENUM tree lookup on the specified number, method type,
-  and (optionally) ordinal offset, and returns one of four different values:
+Function: ENUMLOOKUP(number[|Method-type[|options[|record#[|zone-suffix]]]])
+
+  Performs an ENUM tree lookup on the specified number, method type, and
+  ordinal record offset, and returns one of four different values:
 
    1) post-parsed NAPTR of one method (URI) type
    2) count of elements of one method (URI) type
@@ -58,6 +58,8 @@
     (regardless of order or priority.)  If "ALL" is the specified
     service_type, then a count of all methods will be returned for the
     DNS record.
+
+record# = which record to present if multiple answers are returned
     <integer> = The record in priority/order sequence based on the
     total count of records passed back by the query. If a service_type
     is specified, all entries of that type will be sorted into an
@@ -91,30 +93,30 @@
 
 Example 1: Simplest case, using first SIP return (use all defaults
 except for domain name)
-exten => 100,1,Set(foo=${ENUMLOOKUP(+13015611020,,,loligo.com)})
+exten => 100,1,Set(foo=${ENUMLOOKUP(+13015611020,,,,loligo.com)})
   returns: ${foo}="2203 at sip.fox-den.com"
 
 Example 2: What is the first "tel" pointer type for this number?
 (after sorting by order/preference; default of "1" is assumed in
 options field)
-exten => 100,1,Set(foo=${ENUMLOOKUP(+13015611020,tel,,loligo.com)})
+exten => 100,1,Set(foo=${ENUMLOOKUP(+13015611020,tel,,,loligo.com)})
   returns: ${foo}="+12125551212"
 
 Example 3: How many "sip" pointer type entries are there for this number?
-exten => 100,1,Set(foo=${ENUMLOOKUP(+13015611020,sip,c,loligo.com)})
+exten => 100,1,Set(foo=${ENUMLOOKUP(+13015611020,sip,c,,loligo.com)})
   returns: ${foo}=3
 
 Example 4: For all the "tel" pointer type entries, what is the second
 one in the list? (after sorting by preference)
-exten => 100,1,Set(foo=${ENUMLOOKUP(+13015611020,tel,2,loligo.com)})
+exten => 100,1,Set(foo=${ENUMLOOKUP(+13015611020,tel,,2,loligo.com)})
   returns: ${foo}="+14155551212"
 
 Example 5: How many NAPTRs (tel, sip, mailto, etc.) are in the list for this number?
-exten => 100,1,Set(foo=${ENUMLOOKUP(+13015611020,ALL,c,loligo.com)})
+exten => 100,1,Set(foo=${ENUMLOOKUP(+13015611020,ALL,c,,loligo.com)})
   returns: ${foo}=6
 
 Example 6: Give back the second full URI in the sorted list of all NAPTR URIs:
-exten => 100,1,Set(foo=${ENUMLOOKUP(+13015611020,ALL,2,loligo.com)})
+exten => 100,1,Set(foo=${ENUMLOOKUP(+13015611020,ALL,,2,loligo.com)})
   returns: ${foo}="tel:+14155551212"  [note the "tel:" prefix in the string]
 
 Example 7: Look up first SIP entry for the number in the e164.arpa zone (all defaults)
@@ -124,13 +126,13 @@
 
 
 Example 8: Look up the ISN mapping in freenum.org alpha test zone
-exten => 100,1,Set(foo=${ENUMLOOKUP(1234*256,,,freenum.org)})
+exten => 100,1,Set(foo=${ENUMLOOKUP(1234*256,,,,freenum.org)})
   returns: ${foo}="1234 at 204.91.156.10"  [note: this result is subject
   to change as it is "live" DNS]
 
 Example 9: Give back the first SIP pointer for a number in the
 enum.yoydynelabs.com zone (invalid lookup)
-exten => 100,1,Set(foo=${ENUMLOOKUP(1234567890,sip,1,enum.yoyodynelabs.com)})
+exten => 100,1,Set(foo=${ENUMLOOKUP(1234567890,sip,,1,enum.yoyodynelabs.com)})
   returns: ${foo}=""
 
 
@@ -254,7 +256,7 @@
 exten => _011.,1,Set(sipcount=${ENUMLOOKUP(${EXTEN:3},sip,c)}|counter=0)
 exten => _011.,n,While($["${counter}"<"${sipcount}"])
 exten => _011.,n,Set(counter=$[${counter}+1])
-exten => _011.,n,Dial(SIP/${ENUMLOOKUP(+${EXTEN:3},sip,${counter})})
+exten => _011.,n,Dial(SIP/${ENUMLOOKUP(+${EXTEN:3},sip,,${counter})})
 exten => _011.,n,EndWhile
 exten => _011.,n,Dial(Zap/g1/${EXTEN})
 ;
@@ -273,29 +275,29 @@
 exten => _X.,1,Set(sipcount=${ENUMLOOKUP(+${EXTEN},sip,c)}|counter=0)
 exten => _X.,2,GotoIf($["${counter}"<"${sipcount}"]?3:6)
 exten => _X.,3,Set(counter=$[${counter}+1])
-exten => _X.,4,Dial(SIP/${ENUMLOOKUP(+${EXTEN},sip,${counter})})
+exten => _X.,4,Dial(SIP/${ENUMLOOKUP(+${EXTEN},sip,,${counter})})
 exten => _X.,5,GotoIf($["${counter}"<"${sipcount}"]?3:6)
 ;
 exten => _X.,6,Set(iaxcount=${ENUMLOOKUP(+${EXTEN},iax2,c)}|counter=0)
 exten => _X.,7,GotoIf($["${counter}"<"${iaxcount}"]?8:11)
 exten => _X.,8,Set(counter=$[${counter}+1])
-exten => _X.,9,Dial(IAX2/${ENUMLOOKUP(+${EXTEN},iax2,${counter})})
+exten => _X.,9,Dial(IAX2/${ENUMLOOKUP(+${EXTEN},iax2,,${counter})})
 exten => _X.,10,GotoIf($["${counter}"<"${iaxcount}"]?8:11)
 ;
 exten => _X.,11,NoOp("No valid entries in e164.arpa for ${EXTEN} - checking in e164.org")
 ;
 ; ...then also try e164.org, and look for SIP and IAX NAPTRs...
 ;
-exten => _X.,12,Set(sipcount=${ENUMLOOKUP(+${EXTEN},sip,c,e164.org)}|counter=0)
+exten => _X.,12,Set(sipcount=${ENUMLOOKUP(+${EXTEN},sip,c,,e164.org)}|counter=0)
 exten => _X.,13,GotoIf($["${counter}"<"${sipcount}"]?14:17)
 exten => _X.,14,Set(counter=$[${counter}+1])
-exten => _X.,15,Dial(SIP/${ENUMLOOKUP(+${EXTEN},sip,${counter},e164.org)})
+exten => _X.,15,Dial(SIP/${ENUMLOOKUP(+${EXTEN},sip,,${counter},e164.org)})
 exten => _X.,16,GotoIf($["${counter}"<"${sipcount}"]?14:17)
 ;
-exten => _X.,17,Set(iaxcount=${ENUMLOOKUP(+${EXTEN},iax2,c,e164.org)}|counter=0)
+exten => _X.,17,Set(iaxcount=${ENUMLOOKUP(+${EXTEN},iax2,c,,e164.org)}|counter=0)
 exten => _X.,18,GotoIf($["${counter}"<"${iaxcount}"]?19:22)
 exten => _X.,19,Set(counter=$[${counter}+1])
-exten => _X.,20,Dial(IAX2/${ENUMLOOKUP(+${EXTEN},iax2,${counter},e164.org)})
+exten => _X.,20,Dial(IAX2/${ENUMLOOKUP(+${EXTEN},iax2,,${counter},e164.org)})
 exten => _X.,21,GotoIf($["${counter}"<"${iaxcount}"]?19:22)
 ;
 ; ...then send out PRI.

Modified: team/oej/multiparking/include/asterisk/module.h
URL: http://svn.digium.com/view/asterisk/team/oej/multiparking/include/asterisk/module.h?rev=14108&r1=14107&r2=14108&view=diff
==============================================================================
--- team/oej/multiparking/include/asterisk/module.h (original)
+++ team/oej/multiparking/include/asterisk/module.h Wed Mar 22 01:26:42 2006
@@ -25,6 +25,8 @@
 
 #ifndef _ASTERISK_MODULE_H
 #define _ASTERISK_MODULE_H
+
+#include "asterisk/utils.h"
 
 #if defined(__cplusplus) || defined(c_plusplus)
 extern "C" {
@@ -318,10 +320,8 @@
  */
 #define LOCAL_USER_ADD(u) { \
  \
-	if (!(u=calloc(1,sizeof(*u)))) { \
-		ast_log(LOG_WARNING, "Out of memory\n"); \
+	if (!(u = ast_calloc(1, sizeof(*u)))) \
 		return -1; \
-	} \
 	ast_mutex_lock(&localuser_lock); \
 	u->chan = chan; \
 	u->next = localusers; \

Modified: team/oej/multiparking/res/res_features.c
URL: http://svn.digium.com/view/asterisk/team/oej/multiparking/res/res_features.c?rev=14108&r1=14107&r2=14108&view=diff
==============================================================================
--- team/oej/multiparking/res/res_features.c (original)
+++ team/oej/multiparking/res/res_features.c Wed Mar 22 01:26:42 2006
@@ -419,7 +419,7 @@
 		"Timeout: %ld\r\n"
 		"CallerID: %s\r\n"
 		"CallerIDName: %s\r\n"
-		,pu->parkingnum, pu->chan->name, pu->parkinglot->name, peer->name
+		,pu->parkingnum, pu->chan->name, pu->parkinglot->name, peer ? peer->name : ""
 		,(long)pu->start.tv_sec + (long)(pu->parkingtime/1000) - (long)time(NULL)
 		,(pu->chan->cid.cid_num ? pu->chan->cid.cid_num : "<unknown>")
 		,(pu->chan->cid.cid_name ? pu->chan->cid.cid_name : "<unknown>")



More information about the asterisk-commits mailing list