[asterisk-commits] mmichelson: branch mmichelson/srv_sip_outbound r199 - /asterisk/team/mmichels...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Apr 5 09:27:29 CDT 2010


Author: mmichelson
Date: Mon Apr  5 09:27:27 2010
New Revision: 199

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=199
Log:
* Allow default values for srv record parameters
* Change port to be numeric instead of a string
* Add some commented out code that will be used eventually for spawning Asterisk for the test


Modified:
    asterisk/team/mmichelson/srv_sip_outbound/tests/func_srv/test.lua

Modified: asterisk/team/mmichelson/srv_sip_outbound/tests/func_srv/test.lua
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/mmichelson/srv_sip_outbound/tests/func_srv/test.lua?view=diff&rev=199&r1=198&r2=199
==============================================================================
--- asterisk/team/mmichelson/srv_sip_outbound/tests/func_srv/test.lua (original)
+++ asterisk/team/mmichelson/srv_sip_outbound/tests/func_srv/test.lua Mon Apr  5 09:27:27 2010
@@ -1,10 +1,10 @@
 srv_record = {}
 function srv_record:new(host, port, priority, weight)
 	local s = {
-		host = host,
-		port = port,
-		priority = priority,
-		weight = weight
+		host = host or '',
+		port = port or 0,
+		priority = priority or 0,
+		weight = weight or 0
 	}
 	setmetatable(s, self)
 	self.__index = self
@@ -12,11 +12,16 @@
 end
 
 srv_records = {
-	srv_record:new("udpserver1.asteriskphone.net","5060",0,3),
-	srv_record:new("udpserver2.asteriskphone.net","5061",1,0),
-	srv_record:new("udpserver3.asteriskphone.net","5060",1,0),
-	srv_record:new("udpserver4.asteriskphone.net","5060",65535,65535)
+	srv_record:new("udpserver1.asteriskphone.net",5060,0,3),
+	srv_record:new("udpserver2.asteriskphone.net",5061,1,0),
+	srv_record:new("udpserver3.asteriskphone.net",5060,1,0),
+	srv_record:new("udpserver4.asteriskphone.net",5060,65535,65535)
 }
+
+--instance = ast.new()
+--ast:load_config("configs/extensions.conf")
+--ast:generate_manager_conf()
+--ast:spawn()
 
 for i,v in ipairs(srv_records) do
 	print ("Host: " .. v.host)




More information about the asterisk-commits mailing list