Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Thu Mar 28, 2024 9:41 pm
Auto Dialer Software


All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: sip friend call to sip friend
PostPosted: Sun Sep 28, 2008 5:18 pm 
Offline

Joined: Sun Aug 17, 2008 1:52 pm
Posts: 93
Hi guys,

I've been playing with a2b for days to setup sip-friend call, but I was getting DECLINE message on my sip phone.

so what I did was digging into logs to find the reason,

I changed this line (857) in class.a2billing.php from

Code:
$QUERY = "SELECT name FROM cc_sip_buddies, cc_card WHERE cc_sip_buddies.name=cc_card.username AND useralias='".$this->destination."'";


to

Code:
$QUERY = "SELECT name FROM cc_sip_buddies, cc_card WHERE cc_sip_buddies.name=cc_card.useralias AND useralias='".$this->destination."'";


to make it work,

but I must say using "cc_card.username" as extension number is like using credit card numer as phone number.

so perhaps there is something I'm missing in my sip-friend setup.


Thanks


Top
 Profile  
 
 Post subject: Re: sip friend call to sip friend
PostPosted: Sun Sep 28, 2008 6:55 pm 
Offline
Moderator
User avatar

Joined: Thu Jun 22, 2006 2:19 pm
Posts: 2890
Location: Devon, UK
hellbound wrote:
but I must say using "cc_card.username" as extension number is like using credit card numer as phone number.
Very true. In my experience you must dial 555+cardalias, rather than 555+cardnumber, which doesn't share the same security concerns.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 28, 2008 9:23 pm 
Offline
User avatar

Joined: Mon Apr 30, 2007 6:43 am
Posts: 1060
Location: Canada
It can be changed to the following:

Code:
$QUERY = "SELECT name FROM cc_sip_buddies, cc_card WHERE cc_sip_buddies.name=cc_card.username AND name='{$this->destination}'";


This will make sure that sip_friends are being dial by using their name. That's what the Asterisk documentation says that we should be doing. Calling someone using the alias does not make much sense to me since the alias is card specific while account name is sip friend specific. Besides, it is the sip friend that is being called and not the customer card.

In addition to that, a small part of the code has to be slightly adjusted to make sure that it will never use the username or main account alias as sip_friend username, password or name.

I am testing the code before submitting it. It should allow something that has be so far impossible: having more than one sip_friend account attached to the same card and able to receive sip calls.

Oh, I almost forgot. That will make it possible to easily send a sip_friend or iax_friend calls through the rate engine by default. It will be up to you to keep it free of charge or to sell it at a cost.

Cheers


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 
VoIP Billing solution


All times are UTC


Who is online

Users browsing this forum: No registered users and 5 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