Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Thu Mar 28, 2024 9:47 am
VoIP Billing solution


All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Add/Remove CID through IVR
PostPosted: Sat Sep 13, 2008 7:36 pm 
Offline

Joined: Sat Apr 05, 2008 6:38 pm
Posts: 18
This feature would make the Pinless Dialing option more userfriendly,easier to use and more secure.

It can be dangerous to automatically save the CID for CID authentication since many people use their calling cards from public phones.

It's also too much hassle for many users to go online to register their callerid.

So it would be a great feature if the CID Authentication is enabled, the calling card users could add the number they are currently calling from by pressing for example "*7" , and on the other hand - if the number is already in the cc_callerid table, the CID would be removed.

Has anyone scripted something similar?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 15, 2008 8:59 am 
Offline

Joined: Sat Apr 05, 2008 6:38 pm
Posts: 18
Nevermind, It only took few hours to add this feature myself :)

It's based on the redial function found in A2billing main Class.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 15, 2008 11:21 am 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
Will you be sharing your code with the rest of the community?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 17, 2008 4:35 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
You continue to expect others to spend time helping you in other threads, yet you don't seem willing to reciprocate. That's very disheartening.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 18, 2008 1:01 pm 
Offline

Joined: Sat Apr 05, 2008 6:38 pm
Posts: 18
Of course I'm willing to share it with the community - Thats what this is all about.

I'm just testing and trying the feature before I release something in this forum.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 18, 2008 1:22 pm 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
To plagiarise and misquote a line I saw recently in an email, (you know who you are)

this well-observed recent blog post is tangential to the topic of this
post: http://www.codinghorror.com/blog/archives/001134.html

Joe


Top
 Profile  
 
 Post subject: Add/Remove CID through IVR
PostPosted: Sun Oct 26, 2008 10:37 pm 
Offline

Joined: Sun Oct 26, 2008 10:32 pm
Posts: 1
Here is a code a friend coded for me:
----------------

//REDIAL FIND THE LAST DIALED NUMBER (STORED IN THE DATABASE)
if ($this->destination=='*1'){
$this->destination = $this->redial;
$this -> debug( VERBOSE | WRITELOG, $agi, __FILE__, __LINE__, "[REDIAL : DTMF DESTINATION ::> ".$this->destination."]");
}

if ($this->destination=='*7'){
$this -> debug( WRITELOG, $agi, __FILE__, __LINE__, "[REMEMBER CALLERID ::> ".$this->CallerID."]");
$QUERY = "SELECT count(*) FROM cc_callerid WHERE id_cc_card='$this->id_card' AND cid='$this->CallerID'";
$result = $this->instance_table -> SQLExec ($this->DBHandle, $QUERY, 1);
if ($result[0][0]==0 && $this->agiconfig['cid_enable']==1 && is_numeric($this->CallerID) && $this->CallerID>0){
$QUERY_FIELS = 'cid, id_cc_card';
$QUERY_VALUES = "'$this->CallerID','$this->id_card'";
$this -> debug( VERBOSE | WRITELOG, $agi, __FILE__, __LINE__, "[CREATE AN INSTANCE IN CC_CALLERID - QUERY_VALUES:$QUERY_VALUES, QUERY_FIELS:$QUERY_FIELS]");
$result = $this->instance_table -> Add_table ($this->DBHandle, $QUERY_VALUES, $QUERY_FIELS, 'cc_callerid');
$agi-> stream_file('voxdom_pinless_dial_on', '#');
$agi-> say_digits($this->CallerID);
$agi-> stream_file('voxdom_disable_pinless', '#');
}
return -1;
}
if ($this->destination=='*8'){
$this -> debug( WRITELOG, $agi, __FILE__, __LINE__, "[FORGET CALLERID ::> ".$this->CallerID."]");
if ($this->agiconfig['cid_enable']==1 && is_numeric($this->CallerID) && $this->CallerID>0){
$QUERY = "DELETE FROM cc_callerid WHERE id_cc_card='$this->id_card' AND cid='$this->CallerID'";
$result = $this->instance_table -> SQLExec ($this->DBHandle, $QUERY, 1);
$agi-> stream_file('voxdom_pinless_dial_off', '#');
$agi-> say_digits($this->CallerID);
$agi-> stream_file('voxdom_enable_pinless', '#');
}
return -1;
}
if ($this->destination=='*9'){
$digit = $agi->stream_file('voxdom_star0forbalance', '0123456789*#');
if ($digit['result'] > 0)
{
$agi->set_variable('A2B_USER_DIGIT', chr($digit['result']));
return -1;
}
$digit = $agi->stream_file('voxdom_star1forredial', '01234567890*#');
if ($digit['result'] > 0)
{
$agi->set_variable('A2B_USER_DIGIT', chr($digit['result']));
return -1;
}
$digit = $agi->stream_file('voxdom_enable_pinless', '0123456789*#');
if ($digit['result'] > 0)
{
$agi->set_variable('A2B_USER_DIGIT', chr($digit['result']));
return -1;
}
$digit = $agi->stream_file('voxdom_disable_pinless', '0123456789*#');
if ($digit['result'] > 0)
{
$agi->set_variable('A2B_USER_DIGIT', chr($digit['result']));
return -1;
}
$digit = $agi->stream_file('voxdom_star9forhelp', '0123456789*#');
if ($digit['result'] > 0)
{
$agi->set_variable('A2B_USER_DIGIT', chr($digit['result']));
return -1;
}
return -1;
}


Top
 Profile  
 
 Post subject: Re: Add/Remove CID through IVR
PostPosted: Wed May 27, 2009 10:16 am 
Offline

Joined: Thu Nov 06, 2008 7:09 pm
Posts: 37
hi, were would you add this code?

could you provide the specific directory and filename or even a copy of your file to upload and see if works with out any code changes.


Also would anyone know of a way to make a2b ask for the caller ID number right after it asks for the number to call?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 
Voice Broadcast System


All times are UTC


Who is online

Users browsing this forum: No registered users and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group