]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Skinny: test: put config on top
authorMathieu Parent <math.parent@gmail.com>
Mon, 1 Mar 2010 11:06:47 +0000 (11:06 +0000)
committerMathieu Parent <math.parent@gmail.com>
Mon, 1 Mar 2010 11:06:47 +0000 (11:06 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16850 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_skinny/test-skinny.pl

index ac8e2bc29b58ee60ac0f7c2cbdf92ef0c8f43987..deb60f410c0da0c5d050f4d8ae97a92bb6d5e9a6 100644 (file)
@@ -4,6 +4,11 @@ use strict;
 use warnings;
 use IO::Socket;
 
+#Config
+my $skinny_server = '127.0.0.1';
+my $device_name = "SEP001120AABBCC";
+my $device_ip = 10+256*(11+256*(12+256*13)); # 10.11.12.13
+#======
 $| = 1;
 
 my $socket;
@@ -11,7 +16,7 @@ my $socket;
 sub skinny_connect
 {
        $socket = IO::Socket::INET->new(
-               PeerAddr => '127.0.0.1',
+               PeerAddr => $skinny_server,
                PeerPort => 2000,
                );
 }
@@ -70,10 +75,10 @@ skinny_connect();
 # =============================================================================
 skinny_send(0x0001, # Register
        pack("a16VVVVV",
-               "SEP001120AABBCC",
+               $device_name,
                0, # userId;
                1, # instance;
-               12,# ip;
+               $device_ip,# ip;
                7, # deviceType;
                0, # maxStreams;
        ));