asterisk2billing.org
http://forum.asterisk2billing.org/

Issues with NAT
http://forum.asterisk2billing.org/viewtopic.php?f=33&t=10782
Page 1 of 1

Author:  creym [ Mon Apr 14, 2014 9:56 am ]
Post subject:  Issues with NAT

Hi there, I am new to the forum, so maybe I am posting this were I shouldn't, so please let me know if this topic does not belong here.

I have a network like the one in the picture (link here http://i59.tinypic.com/v7e1s3.png as I couldn't upload to the post), with the following configured:
- I have created users in A2billing and use their VoIP credentials in the ATAs, which successfully register with A2billing using Asterisk Realtime
- The asterisk in the A2billing server registers with the provider
- The Rate Engine in A2billing works as the simulator provides rate for given destinations
- The calls from the users get registered in A2Billing.
- The calls from the analogue phones go through as the end phone rings, and get registered in A2Billing for the given user (although as Cancelled)
- The calls appear registered in the provider's log and are billed according to its duration.

However, no sound is heard in any of the phones after picking up, and a2billing does not recognise any duration for the call. As said in the log they appear as CANCEL and 00:00 duration.

I have tried to reduce the complexity of the problem and set up a SIP client on a mobile phone, which registers to the asterisk in the A2Billing server. Although this client does not register to A2Billing (I don't know how to do so, :-S), the calls from it experience the same behaviour as above.

Googling about the problem, I have learnt that it is common problem related to a natted networks. I have tried including externip and localnet within the [general] context of the sip.conf of the asterisk in the A2Billing server, but this produces the asterisk lose registration from the SIP provider.

I know this question is more related to asterisk than to a2billing, but I was hoping that your experience could shed some light in this regard.

Best,

carlos

Author:  jroper [ Mon Apr 14, 2014 10:47 am ]
Post subject:  Re: Issues with NAT

Hi

The best place for an A2Billing server is on a public IP address, not behind NAT.

However, the key to this is in the externip and localnet settingsm they are required, as well as setting NAT=yes for the extension.

Yours

Joe

Author:  creym [ Wed Apr 16, 2014 4:01 am ]
Post subject:  Re: Issues with NAT

Hi Joe,

Thanks for the answer. I managed to get hold of a USB dongle (obtaining a public) and set it up on the a2billing server. Then in the each asterisk in the Mesh Potato cloud I included localnet=10.130.1.0/255.255.255.255.0 and externip=0.0.0.0 and it worked. Now the audio works bidirectionally, and the calls are billed in a2billing.

We have an issue with the billing, as the call has been billed more than it should. I think it is a question of the currency (like some sort of exchange rate between usd and rands). We want everything to be in South African rands (credit and billing), but we may not have changed all the variables require for this. Do you which ones should we take into account?

Additionally, the time of the calls are reported to have happened 2 hours later than in reality. I have configured cdr.conf for not using gmt, and included a symbolic link form the time zone here to /etc/localtime ( ln -sf /usr/share/zoneinfo/Africa/Johannesburg /etc/localtime ). The time for the calls logged in /var/log/asterisk/cdr-csv/Master.csv is the correct one, but the one in a2billing remains two hours more. Do you know what should I change in a2billing for the time to be logged properly?

Thanks in advance,

carlos

Author:  bucasia [ Sat Apr 19, 2014 7:39 pm ]
Post subject:  Re: Issues with NAT

For the currency you really want to set it before you do anything else - http://sysadminman.net/blog/2012/settin ... rency-4532

Changing the currency after creating rate cards can cause confusion.

Author:  creym [ Mon May 26, 2014 3:40 pm ]
Post subject:  Re: Issues with NAT

Cool! Setting the time and the currency before setting up the rate makes everything working fine. Thanks!

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/