mkgws.pl 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/usr/bin/perl
  2. #
  3. # Make bulk gateway xml from csv file.
  4. #
  5. open(CSV, "gateways.csv");
  6. my @data = <CSV>;
  7. close(CSV);
  8. foreach my $line (@data) {
  9. chomp($line);
  10. my ($gwname, $username, $password) = split(/,/, $line);
  11. print <<XML;
  12. <gateway name="$gwname">
  13. <param name="username" value="$username"/>
  14. <!--<param name="realm" value="asterlink.com"/>-->
  15. <!--<param name="from-user" value="cluecon"/>-->
  16. <!--<param name="from-domain" value="asterlink.com"/>-->
  17. <param name="password" value="$password"/>
  18. <!--<param name="extension" value="cluecon"/>-->
  19. <!--<param name="proxy" value="asterlink.com"/>-->
  20. <!--<param name="register-proxy" value="mysbc.com"/>-->
  21. <!--<param name="expire-seconds" value="60"/>-->
  22. <!--<param name="register" value="false"/>-->
  23. <!--<param name="register-transport" value="udp"/>-->
  24. <!--<param name="retry-seconds" value="30"/>-->
  25. <!--<param name="caller-id-in-from" value="false"/>-->
  26. <!--<param name="contact-params" value=""/>-->
  27. <!--<param name="extension-in-contact" value="true"/>-->
  28. <!--<param name="ping" value="25"/>-->
  29. <!--<param name="cid-type" value="rpid"/>-->
  30. <!--<param name="rfc-5626" value="true"/>-->
  31. <!--<param name="reg-id" value="1"/>-->
  32. </gateway>
  33. XML
  34. }