Problem with one of the SIP trunks

Hello

I have moved from asterisk 1.4 to 1.2.
I moved all configuration (with small changes). Everythink works fine
except one of the SIP trunks. Other SIP trunks works fine. That specified SIP trunk used to work in old configuration.
Here is my config for that trunk:

[trunk_halonet_test]
secret = *****
type = friend
username = dynamicg001
fromuser = dynamicg001
host = sip.halonet.pl
dialformat = ${EXTEN:1}
context = DID_trunk_1
insecure = very
disallow = all
allow = g729

I looks like:
i send many SIP OPTIONS packages which are not replied. Than i send SIP REGISTER and receive answer OK. The trunk is registered:
Host Username Refresh State
sip.halonet.pl:5060 dynamicg001 105 Registered

but when i try to call i receive error (and it’s not a dialplan problem):
– Accepting AUTHENTICATED call from 192.168.100.165:
> requested format = gsm,
> requested prefs = (),
> actual format = gsm,
> host prefs = (gsm),
> priority = mine
– Executing Macro(“IAX2/006-6”, “dial|0801300800|SIP/trunk_halonet_test|r|10”) in new stack
– Executing Set(“IAX2/006-6”, “CALLTO=0801300800”) in new stack
– Executing Set(“IAX2/006-6”, “PROTO=SIP/trunk_halonet_test”) in new stack
– Executing Set(“IAX2/006-6”, “OPT=r”) in new stack
– Executing Set(“IAX2/006-6”, “TIMEOUT=10”) in new stack
– Executing Dial(“IAX2/006-6”, “SIP/trunk_halonet_test/0801300800|10|r”) in new stack
Mar 28 11:18:52 NOTICE[10729]: app_dial.c:1056 dial_exec_full: Unable to create channel of type ‘SIP’ (cause 3 - No route to destination)
== Everyone is busy/congested at this time (1:0/0/1)
== Auto fallthrough, channel ‘IAX2/006-6’ status is ‘CHANUNAVAIL’
– Hungup ‘IAX2/006-6’

I can’t find what might be wrong. Other SIP trunks works fine. Codecs g729 installed.
Here is some info from sip debug:

Reliably Transmitting (NAT) to 217.11.128.5:5060:
OPTIONS sip:sip.halonet.pl SIP/2.0
Via: SIP/2.0/UDP 83.13.242.82:5060;branch=z9hG4bK4e2ae35e;rport
From: “asterisk” sip:asterisk@83.13.242.82;tag=as22e3da89
To: sip:sip.halonet.pl
Contact: sip:asterisk@83.13.242.82
Call-ID: 7653fc62081acc50065140aa6738fccc@83.13.242.82
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Wed, 28 Mar 2007 09:14:14 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Content-Length: 0


Retransmitting #1 (NAT) to 217.11.128.5:5060:
OPTIONS sip:sip.halonet.pl SIP/2.0
Via: SIP/2.0/UDP 83.13.242.82:5060;branch=z9hG4bK4e2ae35e;rport
From: “asterisk” sip:asterisk@83.13.242.82;tag=as22e3da89
To: sip:sip.halonet.pl
Contact: sip:asterisk@83.13.242.82
Call-ID: 7653fc62081acc50065140aa6738fccc@83.13.242.82
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Wed, 28 Mar 2007 09:14:14 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Content-Length: 0


Retransmitting #2 (NAT) to 217.11.128.5:5060:
OPTIONS sip:sip.halonet.pl SIP/2.0
Via: SIP/2.0/UDP 83.13.242.82:5060;branch=z9hG4bK4e2ae35e;rport
From: “asterisk” sip:asterisk@83.13.242.82;tag=as22e3da89
To: sip:sip.halonet.pl
Contact: sip:asterisk@83.13.242.82
Call-ID: 7653fc62081acc50065140aa6738fccc@83.13.242.82
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Wed, 28 Mar 2007 09:14:14 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Content-Length: 0


Retransmitting #3 (NAT) to 217.11.128.5:5060:
OPTIONS sip:sip.halonet.pl SIP/2.0
Via: SIP/2.0/UDP 83.13.242.82:5060;branch=z9hG4bK4e2ae35e;rport
From: “asterisk” sip:asterisk@83.13.242.82;tag=as22e3da89
To: sip:sip.halonet.pl
Contact: sip:asterisk@83.13.242.82
Call-ID: 7653fc62081acc50065140aa6738fccc@83.13.242.82
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Wed, 28 Mar 2007 09:14:14 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Content-Length: 0


Retransmitting #4 (NAT) to 217.11.128.5:5060:
OPTIONS sip:sip.halonet.pl SIP/2.0
Via: SIP/2.0/UDP 83.13.242.82:5060;branch=z9hG4bK4e2ae35e;rport
From: “asterisk” sip:asterisk@83.13.242.82;tag=as22e3da89
To: sip:sip.halonet.pl
Contact: sip:asterisk@83.13.242.82
Call-ID: 7653fc62081acc50065140aa6738fccc@83.13.242.82
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Wed, 28 Mar 2007 09:14:14 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Content-Length: 0

Could anybody help ?

Thanx

i will add that:
CLI> sip show registry
Host Username Refresh State
sip.voipdiscount.com:5060 dynamicg 105 Registered
sip.halonet.pl:5060 dynamicg001 105 Registered
sip.ipfon.pl:5060 dynamicg001 165 Registered

but:
pbx2*CLI> sip show peers
Name/username Host Dyn Nat ACL Port Status
trunk_voipdiscount/dynami 194.221.62.206 N 5060 OK (1725 ms)
trunk_halonet_test/dynami 217.11.128.5 N 5060 UNREACHABLE
trunk_ipfon/dynamicg001 213.218.117.66 N 5060 OK (1686 ms)
3 sip peers [2 online , 1 offline]

Why that trunk is offline ? It’s registered (udp packets are send/received), . I can ping it.

Thanx for any help

by default, qualify=yes allows a response in 2000ms … any longer than this and the host/peer is considered unreachable.

you can alter this behaviour by setting the qualify timeout instead of just “yes”, e.g. “qualify=3000”

i set qualify=10000, it did not help :frowning:

if the peer is being marked as unreachable, the log should tell you why. what does it say ?

it says:
Mar 28 15:25:47 NOTICE[14202]: chan_sip.c:11716 sip_poke_noanswer: Peer ‘trunk_halonet_test’ is now UNREACHABLE! Last qualify: 0

But registry process was succesfull.
And i can use other SIP servers.

So - what’s wrong ?

Thanx

what happens if you set “qualify=no” for this peer ?

Mar 28 16:20:16 WARNING[15056]: chan_sip.c:9815 handle_response_invite: Forbidden - wrong password on authentication for INVITE to ‘“device” sip:dynamicg001@sip.halonet.pl;tag=as47cfb550’

(dynamic001 is my login and sip.halonet.pl is my provider).
But the problem is that i am pretty sure that i pass the correct password…