Problem with Clients on VPN

Hello,

I have a problem with clients, that access asterisk over VPN.
My configuration:
Asterisk server in my LAN (192.168.11.x)
VPN to a 2nd LAN (192.168.0.x)

Clients in the 192.168.11.x LAN work fine.
Clients in the 192.168.0.x LAN over VPN can make calls, but when they hang up, the connection does not close. The connection only closes, when the called destination hangs up.

What could be the reason for this problem?

Kind regards
Helmut

You have phones on a separate subnet from the phone system that sould be treated as local phones and I’m guessing you didn’t tell the system that so it is considering them as external addresses instead of local. see sip_general_custom.conf settings at http://freepbx.org/configuration_files for more information.

Thanks for the answer, but I don’t think it is the reason for my problem.

Today I did some testing and found out, that it depends on the internet connection I use to connect to the asterisk server.

I changed from VPN to use the publich IP of the asterisk server.
For testing I did the following:
I installed a softphone on my notebook and setup the softphone with the publich IP address of the asterisk server. Then I connected the Notebook to my LAN and setup the gateway I use for my ADSL Internet connection (which is the same as the server uses). Everything works well.

Then I removed the connection to the LAN (turned off WLAN) and connected to the internet using my mobile phone (UMTS).
The softphone connects to the asterisk server and also can make calls, but every call is canceled after 20 seconds. If I tried to hangup the line did not close, but after 20 seconds it was closed automatically.

The logfile shows 2 lines which are not in the logfile of the working dial test.

Here are the parts of the logfiles that are concerned to the test.

This is that one, from the try when connected to my LAN (everything works well):
[Oct 9 16:35:27] WARNING[20737] rtp.c: Unable to set TOS to 184
[Oct 9 16:35:27] VERBOSE[20737] logger.c: – Called 10
[Oct 9 16:35:27] VERBOSE[20737] logger.c: – SIP/10-0823a3c8 is ringing
[Oct 9 16:35:29] VERBOSE[20737] logger.c: – SIP/10-0823a3c8 answered SIP/25-082315e8
[Oct 9 16:35:57] VERBOSE[20737] logger.c: == Spawn extension (macro-dial, s, 7) exited non-zero on ‘SIP/25-082315e8’ in macro ‘dial’
[Oct 9 16:35:57] VERBOSE[20737] logger.c: == Spawn extension (macro-dial, s, 7) exited non-zero on ‘SIP/25-082315e8’ in macro ‘exten-vm’
[Oct 9 16:35:57] VERBOSE[20737] logger.c: == Spawn extension (macro-dial, s, 7) exited non-zero on ‘SIP/25-082315e8’
[Oct 9 16:35:57] VERBOSE[20737] logger.c: – Executing [[email protected]:1] Macro(“SIP/25-082315e8”, “hangupcall”) in new stack
[Oct 9 16:35:57] VERBOSE[20737] logger.c: – Executing [[email protected]:1] ResetCDR(“SIP/25-082315e8”, “w”) in new stack
[Oct 9 16:35:57] DEBUG[20737] app_macro.c: Executed application: ResetCDR

And here is that one when connected from outside:

[Oct 9 16:23:51] WARNING[20601] rtp.c: Unable to set TOS to 184
[Oct 9 16:23:51] VERBOSE[20601] logger.c: – Called 10
[Oct 9 16:23:51] VERBOSE[20601] logger.c: – SIP/10-081e9e50 is ringing
[Oct 9 16:23:52] VERBOSE[20601] logger.c: – SIP/10-081e9e50 answered SIP/25-082379e0
[Oct 9 16:24:12] WARNING[20124] chan_sip.c: Maximum retries exceeded on transmission ZjQ3NzFlNzI3YjdhY2M1ZTQ0ODBmYjcyMWI4NTY2ZWM. for seqno 2 (Critical Response)
[Oct 9 16:24:12] WARNING[20124] chan_sip.c: Hanging up call ZjQ3NzFlNzI3YjdhY2M1ZTQ0ODBmYjcyMWI4NTY2ZWM. - no reply to our critical packet.
[Oct 9 16:24:12] VERBOSE[20601] logger.c: == Spawn extension (macro-dial, s, 7) exited non-zero on ‘SIP/25-082379e0’ in macro ‘dial’
[Oct 9 16:24:12] VERBOSE[20601] logger.c: == Spawn extension (macro-dial, s, 7) exited non-zero on ‘SIP/25-082379e0’ in macro ‘exten-vm’
[Oct 9 16:24:12] VERBOSE[20601] logger.c: == Spawn extension (macro-dial, s, 7) exited non-zero on ‘SIP/25-082379e0’
[Oct 9 16:24:12] VERBOSE[20601] logger.c: – Executing [[email protected]:1] Macro(“SIP/25-082379e0”, “hangupcall”) in new stack
[Oct 9 16:24:12] VERBOSE[20601] logger.c: – Executing [[email protected]:1] ResetCDR(“SIP/25-082379e0”, “w”) in new stack
[Oct 9 16:24:12] DEBUG[20601] app_macro.c: Executed application: ResetCDR

Is there anything in it, from where you can imagine what is the reason for the problems?

if you are on a VPN or even a network with multiple subnets you NEED to create the localnet= lines so it knows what is local versus what is not. dropping calls, one way audio, etc will result otherwise.

If you are connecting through a firewall to external phones you need to also follow the directions for setting up a remote extension http://freepbx.org/support/documentation/howtos/howto-setup-a-remote-sip-extension otherwise the connection between the system and the phone will drop after a bit which is really your initial issue. The line taking time to finish dropping and clean up is a after effect of the initial problem.

The issue has to do with it not getting all the proper messages back at the end because it’s already having communication problems.

I use separate sub-nets (for testing remote systems) with units via VPN connections. They work great. I take no special considerations.

I did all those settings.
The server is reachable from outside with all the needed ports.

externip=x.x.x.x
localnet=192.168.11.0/255.255.255.0

is in my sip_general_custom.conf.

And all the extension setting is done like described on the site you linked into your post.

I am really despaired now, because I tried everything and nothing works.

I am going toi install a new asterisk from scratch on a test machine and try to config it manually (without freepbx) at a minimum level, to check out if there is any missconfiguration in one of the autogeneratetd config files.
Hopefully I get it working, because I have to put it online within 2 weeks.

Any further suggestions would be appreciated.

Thanks.