Hidding caller ID
If you like to hide your caller id or like to assign caller ID from a group of pool
follow bellow :
I did two solutions for that:
Solution one : By using small php script [I used PHPAGI ]
Download : http://downloads.sourceforge.net/project/phpagi/phpagi/2.14/phpagi-2.14.tgz?use_mirror=transact
cd /var/lib/asterisk/agi-bin
step 2:
#!/usr/bin/php -q
$agi = new AGI();
$start = Start caller id you like to use ;
$end = End caller id you like to use ;
$cidnum = rand ($start,$end);
$agi->set_variable("CALLERID(num)", $cidnum);
?>
Create a file and save that as rad-id.php
chmod +x rad-id.php
step 3: In your extension.conf
exten => _X.,1,AGI(rand-cid.php)
exten => _X.,n,Dial(DAHDI/g1/${EXTEN})
exten => _X.,n,Hangup
Solution two : [Thanks Nahid]
extension.conf
exten => _X.,1,Set(CALLERID(num)=callerid${RAND(start,end)})
exten => _X.,n,Dial(DAHDI/g1/${EXTEN})
exten => _X.,n,Hangup
follow bellow :
I did two solutions for that:
Solution one : By using small php script [I used PHPAGI ]
Download : http://downloads.sourceforge.net/project/phpagi/phpagi/2.14/phpagi-2.14.tgz?use_mirror=transact
cd /var/lib/asterisk/agi-bin
step 2:
#!/usr/bin/php -q
$agi = new AGI();
$start = Start caller id you like to use ;
$end = End caller id you like to use ;
$cidnum = rand ($start,$end);
$agi->set_variable("CALLERID(num)", $cidnum);
?>
Create a file and save that as rad-id.php
chmod +x rad-id.php
step 3: In your extension.conf
exten => _X.,1,AGI(rand-cid.php)
exten => _X.,n,Dial(DAHDI/g1/${EXTEN})
exten => _X.,n,Hangup
Solution two : [Thanks Nahid]
extension.conf
exten => _X.,1,Set(CALLERID(num)=callerid${RAND(start,end)})
exten => _X.,n,Dial(DAHDI/g1/${EXTEN})
exten => _X.,n,Hangup
Comments
Post a Comment