[asterisk-commits] mvanbaak: branch group/multiparking r104054 - /team/group/multiparking/main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Feb 23 10:25:43 CST 2008


Author: mvanbaak
Date: Sat Feb 23 10:25:43 2008
New Revision: 104054

URL: http://svn.digium.com/view/asterisk?view=rev&rev=104054
Log:
added back some logic that got lost on last commit

Modified:
    team/group/multiparking/main/features.c

Modified: team/group/multiparking/main/features.c
URL: http://svn.digium.com/view/asterisk/team/group/multiparking/main/features.c?view=diff&rev=104054&r1=104053&r2=104054
==============================================================================
--- team/group/multiparking/main/features.c (original)
+++ team/group/multiparking/main/features.c Sat Feb 23 10:25:43 2008
@@ -2305,8 +2305,11 @@
 						ast_log(LOG_ERROR, "Parking dial context '%s' does not exist and unable to create\n", pu->parkinglot->parking_con_dial);
 				}
 
-				if (con)
-					ast_add_extension2(con, 1, peername, 1, NULL, NULL, "Dial", strdup(returnexten), ast_free, registrar);
+				if (con) {
+					char returnexten[AST_MAX_EXTENSION];
+					snprintf(returnexten, sizeof(returnexten), "%s,,t", peername);
+					ast_add_extension2(con, 1, peername_flat, 1, NULL, NULL, "Dial", ast_strdup(returnexten), ast_free_ptr, registrar);
+				}
 
 				if (comebacktoorigin)
 					set_c_e_p(chan, pu->parkinglot->parking_con_dial, peername, 1);
@@ -2325,7 +2328,6 @@
 
 			}
 			post_manager_event("ParkedCallTimeOut", pu);
-
 
 			ast_verb(2, "Timeout for %s parked on %d (%s). Returning to %s,%s,%d\n", pu->chan->name, pu->parkingnum, pu->parkinglot->name, pu->chan->context, pu->chan->exten, pu->chan->priority);
 			/* Start up the PBX, or hang them up */
@@ -2345,7 +2347,7 @@
 				if (ast_context_remove_extension2(con, pt->parkingexten, 1, NULL))
 					ast_log(LOG_WARNING, "Whoa, failed to remove the parking extension!\n");
 				else
-					notify_metermaids(pt->parkingexten, curlot->parking_con);
+					notify_metermaids(pu->parkingexten, curlot->parking_con, AST_DEVICE_NOT_INUSE);
 			} else
 				ast_log(LOG_WARNING, "Whoa, no parking context?\n");
 			free(pt);
@@ -2386,7 +2388,7 @@
 						if (ast_context_remove_extension2(con, pt->parkingexten, 1, NULL))
 							ast_log(LOG_WARNING, "Whoa, failed to remove the extension!\n");
 						else
-							notify_metermaids(pt->parkingexten, curlot->parking_con);
+							notify_metermaids(pu->parkingexten, curlot->parking_con, AST_DEVICE_NOT_INUSE);
 					} else
 						ast_log(LOG_WARNING, "Whoa, no parking context for parking lot %s?\n", curlot->name);
 					free(pt);




More information about the asterisk-commits mailing list