IAX2 Issue. Random calls not going through

I have two offices that call each other over IAX. Randomly Office A can’t call Office B. It is never the other way around. So Office B never has an issue calling A.

After you dial the extension nothing happens, it just sits here. I can see in the console that it is trying to make the call on the outgoing server, but nothing shows up on the incoming server. If you retry dialing the number a few times, it will eventually go through.

What should I look into to fix this? I’ve checked all the logs in /var/log/asterisk to see if any errors come up, but I don’t see anything out of the ordinary.

Any Ideas?

Here is the output from the outgoing server

 -- Accepting AUTHENTICATED call from 38.xxx.xxx.xxx:
       > requested format = gsm,
       > requested prefs = (),
       > actual format = gsm,
       > host prefs = (gsm|ulaw|alaw),
       > priority = mine
    -- Executing [3237@default:1] Dial("IAX2/6969-9", "IAX2/foobar@foobar/3237") in new stack
    -- Called wombat@wombat/3237
    -- Call accepted by 38.xxx.xxx.xxx (format gsm)
    -- Format for call is gsm

Nothing shows up on the receiving asterisk console.

No ideas?

Hi You need to enable iax2 debug . so you can see whats realy happening

Ian

So I caught an instance of it failing to get through.

From extension 6969 calling 3237

[code]ast1*CLI> iax2 set debug
IAX2 Debugging Enabled
Rx-Frame Retry[ No] – OSeqno: 000 ISeqno: 000 Type: IAX Subclass: NEW
Timestamp: 00003ms SCall: 04549 DCall: 00000 [38.102.xxx.xxx:1045]
VERSION : 2
CALLING NUMBER : 6969
CALLING NAME : TEST
CALLING PRESNTN : 1
CALLING TYPEOFN : 16
CALLING TRANSIT : 0
FORMAT : 2
CAPABILITY : 1550
USERNAME : 6969
CALLED NUMBER : 3237
DNID : 3237
ADSICPE : 0

Tx-Frame Retry[000] – OSeqno: 000 ISeqno: 001 Type: IAX Subclass: AUTHREQ
Timestamp: 00014ms SCall: 00002 DCall: 04549 [38.102.xxx.xxx:1045]
AUTHMETHODS : 3
CHALLENGE : 205345809
USERNAME : 6969

Rx-Frame Retry[ No] – OSeqno: 001 ISeqno: 001 Type: IAX Subclass: AUTHREP
Timestamp: 00110ms SCall: 04549 DCall: 00002 [38.102.xxx.xxx:1045]
MD5 RESULT : eaf53cca05daeb7df3742a8afa416c59
ast1CLI>
– Accepting AUTHENTICATED call from 38.102.xxx.xxx:
> requested format = gsm,
> requested prefs = (),
> actual format = gsm,
> host prefs = (gsm|ulaw|alaw),
> priority = mine
– Executing [3237@default:1] Dial(“IAX2/6969-2”, “IAX2/foobar@foobar/3237”) in new stack
– Called foobar@foobar/3237
Tx-Frame Retry[000] – OSeqno: 001 ISeqno: 002 Type: IAX Subclass: ACCEPT
Timestamp: 00122ms SCall: 00002 DCall: 04549 [38.102.xxx.xxx:1045]
FORMAT : 2
ast1
CLI>
Tx-Frame Retry[000] – OSeqno: 000 ISeqno: 000 Type: IAX Subclass: NEW
Timestamp: 00003ms SCall: 16384 DCall: 00000 [38.102.xxx.xxx:4569]
VERSION : 2
CALLED NUMBER : 3237
CODEC_PREFS : (gsm)
CALLING NUMBER : 6969
CALLING PRESNTN : 1
CALLING TYPEOFN : 16
CALLING TRANSIT : 0
CALLING NAME : TEST
LANGUAGE : en
USERNAME : foobar
FORMAT : 2
CAPABILITY : 57346
ADSICPE : 2
DATE TIME : 2008-02-29 20:34:32
ast1CLI>
Rx-Frame Retry[ No] – OSeqno: 000 ISeqno: 001 Type: IAX Subclass: AUTHREQ
Timestamp: 00007ms SCall: 00001 DCall: 16384 [38.102.xxx.xxx:4569]
AUTHMETHODS : 3
CHALLENGE : 126433457
USERNAME : foobar
ast1
CLI>
Rx-Frame Retry[ No] – OSeqno: 002 ISeqno: 002 Type: IAX Subclass: ACK
Tx-Frame Retry[000] – OSeqno: 001 ISeqno: 001 Type: IAX Subclass: AUTHREP
Timestamp: 00122ms SCall: 04549 DCall: 00002 [38.102.xxx.xxx:1045]
Timestamp: 00107ms SCall: 16384 DCall: 00001 [38.102.196.202:4569]
MD5 RESULT : 7aaaa2a206237b45b7885dbe02928398
ast1*CLI>
Rx-Frame Retry[ No] – OSeqno: 001 ISeqno: 002 Type: IAX Subclass: ACCEPT
Timestamp: 00111ms SCall: 00001 DCall: 16384 [38.102.xxx.xxx:4569]
FORMAT : 2

-- Call accepted by 38.102.xxx.xxx (format gsm)
-- Format for call is gsm

Tx-Frame Retry[-01] – OSeqno: 002 ISeqno: 002 Type: IAX Subclass: ACK
Timestamp: 00111ms SCall: 16384 DCall: 00001 [38.102.xxx.xxx:4569]
Rx-Frame Retry[ No] – OSeqno: 002 ISeqno: 002 Type: IAX Subclass: HANGUP
Timestamp: 01563ms SCall: 04549 DCall: 00002 [38.102.xxx.xxx:1045]
CAUSE : User call hangup

Tx-Frame Retry[-01] – OSeqno: 002 ISeqno: 003 Type: IAX Subclass: ACK
Timestamp: 01563ms SCall: 00002 DCall: 04549 [38.102.xxx.xxx:1045]
– Hungup 'IAX2/foobar-16384’
Tx-Frame Retry[000] – OSeqno: 002 ISeqno: 002 Type: IAX Subclass: HANGUP
== Spawn extension (default, 3237, 1) exited non-zero on 'IAX2/6969-2’
Timestamp: 01466ms SCall: 16384 DCall: 00001 [38.102.xxx.xxx:4569]
CAUSE CODE : 0
ast1CLI>
– Hungup 'IAX2/6969-2’
Rx-Frame Retry[ No] – OSeqno: 002 ISeqno: 003 Type: IAX Subclass: ACK
Timestamp: 01466ms SCall: 00001 DCall: 16384 [38.102.xxx.xxx:4569]
Rx-Frame Retry[ No] – OSeqno: 000 ISeqno: 000 Type: IAX Subclass: REGREQ
Timestamp: 00003ms SCall: 04550 DCall: 00000 [38.102.xxx.xxx:1045]
USERNAME : 6969
REFRESH : 60
ast1
CLI>
Tx-Frame Retry[000] – OSeqno: 000 ISeqno: 001 Type: IAX Subclass: REGACK
Timestamp: 00011ms SCall: 00006 DCall: 04550 [38.102.xxx.xxx:1045]
USERNAME : 6969
DATE TIME : 2008-02-29 20:34:36
REFRESH : 60
APPARENT ADDRES : IPV4 38.102.xxx.xxx:1045
ast1*CLI>
Rx-Frame Retry[ No] – OSeqno: 001 ISeqno: 001 Type: IAX Subclass: ACK
Timestamp: 00011ms SCall: 04550 DCall: 00006 [38.102.xxx.xxx:1045]
[/code]

38.102.xxx.xxx is NAT’ed

On the incoming server nothing displayed on the console, even with iax debugging on. So it seems like it’s either nothing reaching server, or asterisk isn’t processing the request.

It’s hard to troubleshoot because it’s random. Sometimes it will work perfectly and other times it will take a few trys to get through.

:cry:

Hi

Another one to try is tcpdump -n -i eth0 -w /tmp/wireshark.pcap -s 2000 udp port 4569 and put the output in ethereal/wireshark.

It may be the natting thats cousing problems.

Ian