[asterisk-commits] mmichelson: branch mmichelson/srv_sip_outbound r190 - /asterisk/team/mmichels...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Apr 2 15:46:28 CDT 2010
Author: mmichelson
Date: Fri Apr 2 15:46:24 2010
New Revision: 190
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=190
Log:
Add sample SRV records to test.lua and test loop to print values.
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=190&r1=189&r2=190
==============================================================================
--- asterisk/team/mmichelson/srv_sip_outbound/tests/func_srv/test.lua (original)
+++ asterisk/team/mmichelson/srv_sip_outbound/tests/func_srv/test.lua Fri Apr 2 15:46:24 2010
@@ -1,0 +1,26 @@
+srv_record = {}
+function srv_record:new(host, port, priority, weight)
+ local s = {
+ host = host,
+ port = port,
+ priority = priority,
+ weight = weight
+ }
+ setmetatable(s, self)
+ self.__index = self
+ return s
+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)
+}
+
+for i,v in ipairs(srv_records) do
+ print ("Host: " .. v.host)
+ print ("Port: " .. v.port)
+ print ("Priority: " .. v.priority)
+ print ("Weight: " .. v.weight)
+end
More information about the asterisk-commits
mailing list