Support A2Billing :

provided by Star2Billing S.L.

Support A2Billing :
It is currently Thu Mar 28, 2024 8:10 pm
VoIP Billing solution


All times are UTC




Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: problems setting up trunk for outbound calls
PostPosted: Thu Apr 29, 2010 2:11 am 
Offline

Joined: Thu Apr 29, 2010 1:36 am
Posts: 15
Hello

I am new to A2billing.

I have been fiddeling and searching for about a day now but i cant seem to get outbound calling to work with A2billing.

Now if you know of a comprehensive, up to date and working manual of how to setup trunks for A2billing then feel free to post a link and I aplologise for not finding it myself. (this would have saved me so much time)

My A2billing version : 1.7.0
Asterisk Version : 1.4

The varius articles i found sugest two ways of setting up a trunk ether from the A2 billing admin interface or in freebpx (simply editing the sip.conf file)
now my voip provider requires a password and username so i set it uo thru the sip.conf file, since there is no option of filling out username or password in the A2 gui.
this is the trunk configuration part of the sip.conf file.
Code:
[test trunk 2]
type=friend
username=username
secret=password
fromuser=username
host=vpbx.12connect.com
dtmfmode=rfc2833
fromdomain=test.somedomain.com
context=test ; change for proper context
insecure=very
allow=ulaw
allow=alaw
allow=ilbc
allow=gsm
allow=g723.1
allow=g726
allow=g729
allow=g729a   


this is the standart instalation of A2 as discribed in the instalation documentation. i dont have freepxb running alongside it so not sure how to check if this trunk works in asterisk.

now i setup trunk, call plans, rates, etc like sugested in the articles i found and i think i got those right.
I think so because when i run a simulation of a call it tels me its using the "test trunk 2" i figure that means its trying to send the call out that trunk.

however when i try and dail out using xlite i just get a pause then it tels me the acount balance of the user and hangs up.

I am guessing its something to do with the trunk configuration in the sip.conf file since A2 apears to be attempting to use the trunk.

here hare links to the articles i used for referance

http://www.asterisk2billing.org/cgi-bin/trac.cgi/wiki/User%20Manual#Trunk
http://sysadminman.net/blog/2009/getting-started-with-a2billing-part-1-setting-up-a-trunk-447
http://sysadminman.net/blog/2009/getting-started-with-freepbx-part-3-making-external-calls-372
http://sysadminman.net/blog/2009/getting-started-with-freepbx-part-1-setting-up-a-trunk-335
https://www.voipon.co.uk/helpdesk/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=102&nav=0,10
(as you can see i have not been able to find one comprehensive source for setting up A2)


Top
 Profile  
 
 Post subject: Re: problems setting up trunk for outbound calls
PostPosted: Thu Apr 29, 2010 7:32 am 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
Hi

There are many different ways of setting up A2Billing, and which one you chose depends on your circumstances.

I set up a trunk in sip.conf (or do it in FreePBX) and test it in Asterisk without A2Billing in the way.

I then paste the name of the trunk into A2Billing, as suggested in the instructions for the field IP-Address.

So in your case, I would paste in the word "test trunk 2", although personally, I would avoid the use of spaces.

A2Billing will then use the credentials and settings of the trunk created in Asterisk.

Joe


Top
 Profile  
 
 Post subject: Re: problems setting up trunk for outbound calls
PostPosted: Thu May 06, 2010 2:28 pm 
Offline

Joined: Thu Apr 29, 2010 1:36 am
Posts: 15
thx for your tip i went and setup a trixbox machine so i could first try and get the sip.conf right and then go from there.
now i got it to work with trixbox so i know the sip.conf is good. i can also see on the server that im connecting to that the extention/account that im using for the trunk is active and logged in.

but still when i try to dail out i only get my balance anounced to me and the connection is terminated

is there a way i can get more output from A2 to see what its doing and what i have misconfigured ?
hmm i cant see the contents of log files thru the webgui but when i download them from the server i can see it thats rather inconvenient.

oh just for those whom might want to use 12connect as well here is a sip.conf that works (at least in trixbox 2.6.2.3 that is asterisk 1.4)
Code:
[testtrunk2]
disallow=all
allow=ulaw
allow=alaw
authuser=[i]your-number[/i]
canreinvite=no
context=from-trunk
dtmf=auto
dtmfmode=inband
fromdomain=vpbx.12connect.com
fromuser=[i]your-number[/i]
host=vpbx.12connect.com
insecure=port,invite
qualify=yes
secret=[i]your-password[/i]
type=peer
Username=[i]your-number   [/i]         


Top
 Profile  
 
 Post subject: Re: problems setting up trunk for outbound calls
PostPosted: Thu May 06, 2010 4:41 pm 
Offline

Joined: Thu Apr 29, 2010 1:36 am
Posts: 15
ah dowloading the logs helpt me a bit it seems some files are missing and im not suposed to use DeadAGI ?

please if any one can help me make more sence of these messages that would be really helpfull

Code:
[May  6 18:37:16] WARNING[2851] res_agi.c: Running DeadAGI on a live channel will cause problems, please use AGI
[May  6 18:37:16] WARNING[2851] file.c: File prepaid-you-have does not exist in any format
[May  6 18:37:17] WARNING[2851] file.c: File euros does not exist in any format
[May  6 18:37:19] WARNING[2851] file.c: File prepaid-cents does not exist in any format
[May  6 18:37:19] WARNING[2851] file.c: File prepaid-enter-dest does not exist in any format
[May  6 18:37:19] WARNING[2851] file.c: Unable to open prepaid-enter-dest (format 0x4 (ulaw)): No such file or directory
[May  6 18:37:19] WARNING[2851] file.c: File prepaid-invalid-digits does not exist in any format
[May  6 18:37:19] WARNING[2851] file.c: File prepaid-enter-dest does not exist in any format
[May  6 18:37:19] WARNING[2851] file.c: Unable to open prepaid-enter-dest (format 0x4 (ulaw)): No such file or directory
[May  6 18:37:19] WARNING[2851] file.c: File prepaid-invalid-digits does not exist in any format
[May  6 18:37:19] WARNING[2851] file.c: File prepaid-enter-dest does not exist in any format
[May  6 18:37:19] WARNING[2851] file.c: Unable to open prepaid-enter-dest (format 0x4 (ulaw)): No such file or directory
[May  6 18:37:19] WARNING[2851] file.c: File prepaid-invalid-digits does not exist in any format


Top
 Profile  
 
 Post subject: Re: problems setting up trunk for outbound calls
PostPosted: Thu May 06, 2010 7:13 pm 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
Don't worry about the Deadagi message, you should use deadAGI, despite what it says in the logs.

I'm sure when you put the sound files in the right sounds directory /var/lib/asterisk/sounds, usually, everything will work fine.

Joe


Top
 Profile  
 
 Post subject: Re: problems setting up trunk for outbound calls
PostPosted: Thu May 06, 2010 9:06 pm 
Offline

Joined: Thu Apr 29, 2010 1:36 am
Posts: 15
i copied the files from
/usr/local/src/a2billing/addons/sounds/en
to
/var/lib/asterisk/sounds/a2billing

Now in the webgui Management=>UploadFile i see the difrent audio files apear,
however the messages in the log remain the same as wel as me being unable to dail out.

i checkt and the files are in the direcotry also rebooted the machine just to be sure.

this means that at least i got the trunk to a point where its connected right?
Code:
[May  6 23:09:14] NOTICE[2716] chan_sip.c: Peer 'testtrunk2' is now Reachable. (82ms / 2000ms)


now what i am trying to do is dail my cell phone so i enter the number with the international prefix in x-lite (00316XXXXXXXX)
x-lite then says call established and i get my balance in euros spoken to me but only the numbers it doesnt actualy say any thing else its just says " . . . 7 and 89 . . " and then hangs up again

now of cause i set the call plan to use the testtrunk2 and i made a rate card and a rate for the prefix 31 and acording to the simulation it wants to sent me out the test trunk but somehow asterisk isnt quite willing yet.
even though this is a fresh install.


Top
 Profile  
 
 Post subject: Re: problems setting up trunk for outbound calls
PostPosted: Fri May 07, 2010 8:43 am 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
Hi

The files should also have the correct permissions to be played by asterisk.

Joe


Top
 Profile  
 
 Post subject: Re: problems setting up trunk for outbound calls
PostPosted: Fri May 07, 2010 1:45 pm 
Offline

Joined: Thu Apr 29, 2010 1:36 am
Posts: 15
Ah yes i thought of that just didnt ocur to me to post it. i set the folder permissions to 777 i know thats not really the safest option but just to see if that would get it to work. Or do i need to set permissions on each idividual file as well ?


Top
 Profile  
 
 Post subject: Re: problems setting up trunk for outbound calls
PostPosted: Fri May 14, 2010 1:13 am 
Offline

Joined: Thu Apr 29, 2010 1:36 am
Posts: 15
Iwas working on the the documentation of the instalation i did when i came acrot the sound instalation section.
then it hit me the A2 webui gave me the directory /var/lib/asterisk/sounds/a2billing for sounds but on debian systems there is another directory used for the sounds namely /usr/local/src/a2billing/addons/sounds. turns out i overlookt that during instalation i ran the script again and i copied the files tryed a call and it "workt somewhat better".

i still cant dail out but now its saying stuff and the messages from the log are gone i am getting other messages though.

Code:
[May 14 00:44:39] NOTICE[2773] chan_sip.c: Peer 'testtrunk2' is now Reachable. (80ms / 2000ms)
[May 14 02:52:01] WARNING[2992] res_agi.c: Running DeadAGI on a live channel will cause problems, please use AGI
[May 14 02:52:55] WARNING[2992] channel.c: Unexpected control subclass '16'
[May 14 02:53:05] NOTICE[2992] rtp.c: Unknown RTP codec 126 received from '192.168.X.X'
[May 14 02:53:13] WARNING[2994] res_agi.c: Running DeadAGI on a live channel will cause problems, please use AGI
[May 14 02:53:15] NOTICE[2992] rtp.c: Unknown RTP codec 126 received from '192.168.X.X'
[May 14 02:53:41] WARNING[2997] res_agi.c: Running DeadAGI on a live channel will cause problems, please use AGI
[May 14 02:54:29] WARNING[2997] file.c: Failed to write frame
[May 14 02:54:29] WARNING[2997] file.c: Failed to write frame
[May 14 02:54:29] WARNING[2997] file.c: Failed to write frame
[May 14 03:20:55] WARNING[3018] res_agi.c: Running DeadAGI on a live channel will cause problems, please use AGI
[May 14 03:21:12] WARNING[3018] channel.c: Unexpected control subclass '16'
[May 14 03:21:15] WARNING[3018] channel.c: Unexpected control subclass '17'
[May 14 03:21:55] WARNING[3021] res_agi.c: Running DeadAGI on a live channel will cause problems, please use AGI
[May 14 03:22:26] WARNING[3021] channel.c: Unexpected control subclass '16'
[May 14 03:22:31] WARNING[3021] channel.c: Unexpected control subclass '17'
[May 14 03:24:11] WARNING[3024] res_agi.c: Running DeadAGI on a live channel will cause problems, please use AGI
[May 14 03:25:10] WARNING[3027] res_agi.c: Running DeadAGI on a live channel will cause problems, please use AG


undoutable i made an error yet again but ill just discribe what it does because i dont think it should act this way or atleast it seems user unfriendly to me.

I setup xlite to connect to the asterisk server (this works fine).
I dail a number with the international prefix added 00316[mycellphone]
xlite says call established and i get the voice telling me my acount balance and asking me to prest the number i whish do dail and then press the pund key (wait didnt i already dail the complete number?)
i reenter the number i whish to dail with international prefix and prest the pound key. then the vocie tryes to anounce something but its cut of by the tone of the other line ringing. however my cell does not recive a call.
after a couple of seconds the voice again asks me to entehr the number i whish to dail.

My test account is charged for the call since its balance is decresed every time i try.
is there a way to not have it ask the number you whish to dail of cause this works well when your calling in with your regular phone but for some one connecting using sip having the IVR ask the number they whish to dail seems obselete to me.
and of cause why isnt my cell ringing?


Top
 Profile  
 
 Post subject: Re: problems setting up trunk for outbound calls
PostPosted: Wed May 19, 2010 7:22 pm 
Offline

Joined: Thu Apr 29, 2010 1:36 am
Posts: 15
im still having major problems trying to get A2 to actualy work

I setup another asterisk box so in the hopes of eliminating problems that may be caused by my sip provider.
however when I now try to dail a number I get a message that the number isnt available.

the log says the folowing
Code:
[May 19 21:12:50] WARNING[2647] frame.c: Cannot allow unknown format 'g711a'
[May 19 21:12:50] WARNING[2647] frame.c: Cannot allow unknown format 'g711u'
[May 19 21:12:50] NOTICE[2767] chan_sip.c: Peer 'testtrunk2' is now Reachable. (4ms / 2000ms)
[May 19 21:19:50] WARNING[2925] res_agi.c: Running DeadAGI on a live channel will cause problems, please use AGI
[May 19 21:20:15] WARNING[2925] chan_sip.c: No audio format found to offer. Cancelling call to 00316XXXXXXXX
[May 19 21:20:24] WARNING[2925] file.c: Failed to write frame
[May 19 21:20:24] WARNING[2925] file.c: Failed to write frame
[May 19 21:20:24] WARNING[2925] file.c: Failed to write frame


Top
 Profile  
 
 Post subject: Re: problems setting up trunk for outbound calls
PostPosted: Thu May 20, 2010 8:11 am 
Offline

Joined: Fri Jun 23, 2006 3:56 pm
Posts: 4065
Hi

First test using Asterisk only, then introduce A2Billing into the process.

It looks here like the codecs used are incompatible, as to why this may be the case may be problems with your install, configuration, carrier or endpoint.

Sorry I cannot be more specific.

Joe


Top
 Profile  
 
 Post subject: Re: problems setting up trunk for outbound calls
PostPosted: Fri May 21, 2010 4:59 pm 
Offline

Joined: Thu Apr 29, 2010 1:36 am
Posts: 15
I been trying to install freepbx alongside asterisk in order to test the functionalitys of asterisk itself before using A2 like you sugested.

However the freepbx install script asks me for the location of my Apache cgi-bin and i just cannot find it im used to using lampp which keeps all its files in one neat and organized place. This is debian with apache installed and its one heck of a mess of symbolic links and none standard directory's, i cant find the apache configuration files or the cgi-bin location or something that would resemble a apache instalation remotely. So im stuck yet again.


Top
 Profile  
 
 Post subject: Re: problems setting up trunk for outbound calls
PostPosted: Fri May 21, 2010 8:03 pm 
Offline

Joined: Mon Jan 08, 2007 6:56 pm
Posts: 345
Why not try a red-hat flavor distro like Centos or Fedora. You'll get the best results by compiling asterisk yourself and installing the dependencies. It it not a small thing for someone with limited experience; However, if you need some instructions I might be able to give some.

Personally I like Fedora because their default set of packages and configuration satisfy a lot of dependencies right off the bat.

Before you venture on something like this that can be time consuming (you'll learn a lot though) you might want to try to make sure you configured your agi-conf properly.

It would help if you post your settings in addition to sip.conf and extensions.conf.


Top
 Profile  
 
 Post subject: Re: problems setting up trunk for outbound calls
PostPosted: Sat May 22, 2010 9:32 am 
Offline

Joined: Thu Apr 29, 2010 1:36 am
Posts: 15
I would personaly much rather have used centos but the guys im helping wanted me to use debian.
What other settings are there besides sip.conf exstentions.conf ?
manager.conf and a2billing.conf hardly hold any settings that need ediditng beyond the initial instalation as far as i read.


Top
 Profile  
 
 Post subject: Re: problems setting up trunk for outbound calls
PostPosted: Sat May 22, 2010 1:18 pm 
Offline

Joined: Mon Jan 08, 2007 6:56 pm
Posts: 345
I meant the settings that are in the A2B database that you access through the admin.
http://your.ip./billing or something like that.

Post these and the entire sip and extensions conf.

Based on the messages you posted here you need to resolve a codec issue. This is done in your ATA or soft client etc then in Asterisk and should be compatible with your outbound provider.

Set up two extensions and try to call each other. If this works then you are half-way there. Then try to call an outside number through your trunk. All this need to work to ensure you have a working asterisk.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2  Next
Predictive Dialer


All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 13 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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group