Good idea Leif.

On 2010-03-19 10:16 AM, "Leif Madsen" <[email protected]> wrote:

Zeeshan Zakaria wrote:
> You'll have to type them all in manually. Or do what I did several
> times...
Using the script approach, you can generate many extensions with an #exec in
sip.conf which will then trigger a script (such as via PHP or whatever) and
whatever information you output via STDOUT will then be used when chan_sip
is
loaded.

Using a template will make what you need to output much easier.

Something like...

#!/usr/bin/php
<?php
$x=1000;
while ($x < 2000) {
       echo "[$x](my_template)\n";
$x++;
};
?>


Then define in sip.conf [my_template](!)

Then fill in whatever information you need for the extensions.

Then you can use
#exec make_extensions.php

Leif.

--

_____________________________________________________________________
-- Bandwidth and Colocation Pr...
-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to