[Home]

Summary:ASTERISK-07784: Unable to reconnect to IAX when remote server was down fo sometime
Reporter:Michael Strelnikov (michaels)Labels:
Date Opened:2006-09-21 07:13:23Date Closed:2011-06-07 14:02:59
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) second_debug.log
Description:I have two * servers. One is behind firewall with forwarded port andsecond is behind firewall without such port.
If my first * server is unavailable for some reason (lost internet connection) the second * cannot reconnect even if I can telnet to the first one.
The only solution is to restart second one. But not only restart, I have to stop it, wait for couple of minutes and then start it again. Otherwise the first server is unavailable.
I suggest it is not cleaning some connections and they are dropped after timeout when server is down.
I have this problem since version 1.0.8
Comments:By: Tilghman Lesher (tilghman) 2006-09-21 10:11:39

How is the first server configured in the second one?  by DNS name, IP, etc.?

Please show us your configuration files.

By: Joshua C. Colp (jcolp) 2006-09-21 13:12:49

We need more information as Corydon pointed out.

By: Michael Strelnikov (michaels) 2006-09-21 22:25:06

The first server has dynamic IP and also has DNS name (via no-ip.com). The second server sees the first one by name.
But the problem is my IP address is not changing that often. I especially checked a lot of times that IP was remain but connection was lost.

By: Michael Strelnikov (michaels) 2006-09-22 01:47:05

the iax debug shows:
Tx-Frame Retry[000] -- OSeqno: 000 ISeqno: 000 Type: IAX     Subclass: REGREQ
  Timestamp: 00003ms  SCall: 00005  DCall: 00000 [xxx.xxx.xxx.xxx:4569]
  USERNAME        : 1112
  REFRESH         : 60

Tx-Frame Retry[000] -- OSeqno: 000 ISeqno: 000 Type: IAX     Subclass: REGREQ
  Timestamp: 00003ms  SCall: 00006  DCall: 00000 [xxx.xxx.xxx.xxx:4569]
  USERNAME        : 1111
  REFRESH         : 60

Tx-Frame Retry[001] -- OSeqno: 000 ISeqno: 000 Type: IAX     Subclass: REGREQ
  Timestamp: 00003ms  SCall: 00005  DCall: 00000 [xxx.xxx.xxx.xxx:4569]
  USERNAME        : 1112
  REFRESH         : 60

Tx-Frame Retry[001] -- OSeqno: 000 ISeqno: 000 Type: IAX     Subclass: REGREQ
  Timestamp: 00003ms  SCall: 00006  DCall: 00000 [xxx.xxx.xxx.xxx1:4569]
  USERNAME        : 1111
  REFRESH         : 60

Tx-Frame Retry[000] -- OSeqno: 001 ISeqno: 000 Type: IAX     Subclass: LAGRQ
  Timestamp: 10001ms  SCall: 00005  DCall: 00000 [xxx.xxx.xxx.xxx:4569]
Tx-Frame Retry[000] -- OSeqno: 001 ISeqno: 000 Type: IAX     Subclass: LAGRQ
  Timestamp: 10001ms  SCall: 00006  DCall: 00000 [xxx.xxx.xxx.xxx:4569]
Tx-Frame Retry[000] -- OSeqno: 000 ISeqno: 000 Type: IAX     Subclass: POKE
  Timestamp: 00002ms  SCall: 00007  DCall: 00000 [xxx.xxx.xxx.xxx:4569]
Tx-Frame Retry[000] -- OSeqno: 000 ISeqno: 000 Type: IAX     Subclass: POKE
  Timestamp: 00002ms  SCall: 00008  DCall: 00000 [xxx.xxx.xxx.xxx:4569]
Tx-Frame Retry[001] -- OSeqno: 000 ISeqno: 000 Type: IAX     Subclass: POKE
  Timestamp: 00002ms  SCall: 00007  DCall: 00000 [xxx.xxx.xxx.xxx:4569]
Tx-Frame Retry[001] -- OSeqno: 000 ISeqno: 000 Type: IAX     Subclass: POKE
  Timestamp: 00002ms  SCall: 00008  DCall: 00000 [xxx.xxx.xxx.xxx:4569]
Tx-Frame Retry[001] -- OSeqno: 001 ISeqno: 000 Type: IAX     Subclass: LAGRQ
  Timestamp: 10001ms  SCall: 00005  DCall: 00000 [xxx.xxx.xxx.xxx:4569]
Tx-Frame Retry[001] -- OSeqno: 001 ISeqno: 000 Type: IAX     Subclass: LAGRQ
  Timestamp: 10001ms  SCall: 00006  DCall: 00000 [xxx.xxx.xxx.xxx:4569]
Tx-Frame Retry[002] -- OSeqno: 000 ISeqno: 000 Type: IAX     Subclass: REGREQ
  Timestamp: 00003ms  SCall: 00005  DCall: 00000 [xxx.xxx.xxx.xxx:4569]

etc

By: jmls (jmls) 2006-11-01 12:33:55.000-0600

michaels, can we see the config files as requested by Corydon76 ? Thanks

By: Michael Strelnikov (michaels) 2006-11-01 16:17:17.000-0600

iax.conf on Master:
[general]
bandwidth=low
disallow=lpc10
tos=lowdelay
autokill=yes
bandwidth=medium
jitterbuffer=yes
dropcount=3
maxjitterbuffer=250
maxexccessbuffer=100
trunkfreq=20
trunktimestamps=yes
trunk=no
allow=ilbc
allow=ulaw
tos=0x18
mailboxdetail=yes
autokill=yes
minregexpire = 60
maxregexpire = 1200

[1111]
username=1111
secret=XXXXX
type=friend
qualify=2000
mailbox=1111@default
host=dynamic
context=local
callerid=1111 <1111>
disallow=all
allow=gsm

iax.conf on Slave:
[general]
bandwidth=medium
disallow=lpc10
tos=0x18
autokill=yes
jitterbuffer=yes ; Jitter buffer enabled...
dropcount=1 ; ...to drop at most 0.5% of VoIP packets
trunk=no
allow=ilbc
allow=ulaw
register=1111:XXXX@slave.domain.com

[1111]
type=friend
disallow=all
allow=gsm
callerid=1111 <1111>
context=local
qualify=3000
host=slave.domain.com
canreinvite=yes
nat=yes

By: Anthony LaMantia (alamantia) 2006-11-13 14:00:18.000-0600

also please show us the debug logs from the asterisk server that you are attempting to register to, rather then (what it seems) just the server trying to register and not being able to... you also may want to find out why the server is ending up in this un-reachable state.



By: Tilghman Lesher (tilghman) 2006-12-11 00:01:13.000-0600

Ping.  We need the "iax2 debug" logs UPLOADED AS FILES to this bug so that we can see what is going on.

If I receive no response within 3 days, I will assume a configuration error was found on your end and this bug will be closed.

By: Michael Strelnikov (michaels) 2006-12-11 00:03:59.000-0600

This problem happen once per day or two. How could I save a log for that event?

By: Tilghman Lesher (tilghman) 2006-12-11 00:31:31.000-0600

Type "iax2 debug" on both ends, then select the output and paste it into a text file.

By: Michael Strelnikov (michaels) 2006-12-12 19:27:36.000-0600

I've uploaded iax debug log. The main server shows nothing related to the secondary server.

By: Joshua C. Colp (jcolp) 2006-12-18 20:42:28.000-0600

Okay - so it is trying to send out a registration request but it never gets a response according to the iax2 debug. This really does smell like some weird firewall issue.

By: Michael Strelnikov (michaels) 2006-12-18 22:53:14.000-0600

But if I shut it down and start after 1 minute all become perfect. Someting just "iax2 reload" works.

By: Anthony LaMantia (alamantia) 2006-12-18 23:03:58.000-0600

This may sound like a rather dumb question, but when you mention restart are you talking about asterisk/chan_iax2 or the server itself?

By: Michael Strelnikov (michaels) 2006-12-18 23:27:32.000-0600

I mean asterisk itself.

By: Anthony LaMantia (alamantia) 2006-12-19 11:52:54.000-0600

durring the problem, can you see IAX2 registration packets arriving from host1 to host2 that are now showing up in the logs of host2?

this really may be a problem with port how your firewall forwards udp packets.

By: panasonic (panasonic) 2006-12-19 14:19:06.000-0600

I'm running 1.2.13 and face the same problem as reported.  We have IAX2 trunks provision to customer asterisk. From time to time, it will loose registeration and only way to resolved the issue it to stop asterisk and wait for a few mins to restart it again.  When this problem occurs, I have turn on debug on the main asterisk and see the client asterisk trying to register but was unable to authenticate. IAX2 is awesome but this bug makes IAX2 very unusable for service provider environment.  Will appreciate if someone can look into this and hopefully have it resolved.

In our client asterisk setup, asterisk is being placed in the DMZ zone, as such there is no port forwarding involved.

Thanks.



By: Serge Vecher (serge-v) 2006-12-19 14:33:15.000-0600

panasonic: can you please post the debug log you've mentioned. Also, please try with 1.2.14

By: Joshua C. Colp (jcolp) 2007-01-25 21:18:15.000-0600

Can either of you provide the needed information? Thanks.

By: Joshua C. Colp (jcolp) 2007-02-06 10:19:35.000-0600

Since there has been no response I'm closing this out for now. If this is still an issue and you can provide the info, please reopen. Thanks!