For gnu: Origination Problem

Originally posted on Asterisk General by someone who should know better.

[quote=“gnu”]Hi, I have a DID

my provider has many Origination IP’s that means the “traffic from my DID” can come from different public IP’s.

I have configured my sip.conf with all those IP, each [context] has qualify = yes, I did that to I monitor the status (if Reachable or Not).

Well, the case is that, when the call comes from an IP that has the status REACHABLE the call pass well. Everything work fine BUT sometimes I see calls coming from the IP that is reported as UNREACHABLE in my asterisk sip show peers, when that happen the calls doesn’t pass because it says

The timeout isn’t happening because it is reported as unreachable, but because it is unreachable, i.e. both symptoms have a common cause rather than one being the cause of the other.

The chances are that routing it to the other address used by the ITSP will not work because the SIP user agent at that address will not know what to do with the response. It is unlikely that the different worker machines at the ITSP are prepared to act as proxies, and particularly so for responses.

You need to find out what is wrong with your network, or firewall, and fix that.

Some possibilities are that the firewall needs regular traffic to keep a rule active or that the firewall has been configured to reject outgoing packets to certain port number ranges.

Hi and thank you for your fast response.

I was reading your answer but I don’t know is related to my network, let me tell you why:

My DID provider sends me traffic from 4 different IP addresses, 3 are OK (40ms) and 1 is UNREACHABLE when sip show peers in Asterisk CLI. Example:

iP1: (1.2.x.x) OK 40ms
IP2: (3.4.x.x) OK 40ms
IP3: (5.6.x.x) OK 40ms
IP4: (7.8.x.x) UNREACHABLE

When you call to my DID 1-305-XXX-XXXX my DID provider will send me traffic from one of these 4 public IP addresses, I don’t control that, the provider sometimes send me the traffic from IP1, 2, 3 or 4 I think is like he is making load balance.

If the call comes from IP1, IP2 or IP3 all work perfect.

The problem is that most of the times my incoming calls comes from 7.8.x.x and for this I’m getting problems with SIP Retransmition. I read the and that is fine.

I’m only having problem with calls coming from that IP.

Exist a way to when an incoming call from IP4 modify the INVITE and change the IP4 to IP3??
In that way all traffic from IP4 will look like is coming from IP3

Some suggestion?

You have a routing problem and the fix is to solve that. Asterisk is rejecting the call because it isn’t getting an ACK back from IP4, not because the qualify has failed for IP4, although the qualify has failed because it isn’t getting any responses.

Changing the source address would cause the call to match IP3, but the response would also be sent to IP3, which would not know anything about the all and probably ignore the response, or issue a CANCEL.

However, even when the call is matching IP4, it is still being accepted as a valid call and is proceeding to the generate a response. If you look more carefully, I think you will find there is a message saying “no reply to our critical response”, which means that Asterisk sent a final response, which may well have been an OK, to accept the call, but, because it never got an ACK, it could not be sure that IP4 received it and had to abandon the call.

You mean IP4 is not responding to my Asterisk right?
That’s the problem, I’m not the owner of IP4, that is is from my provider.
I think the have that server turned off

How are you getting incoming calls from it, if it is turned off?

Good point.

What can I do? I’m going to ilustrate my real scenario:

  1. Here at home I have a ZyXEL P-660HN-51 router.
    It is a Router with Wireless.
    LAN IP: Netmask Gateway
    WAN IP: It’s dynamic (Not static)

  2. The phone I’m using is Cisco SPA504G.
    LAN IP:
    Using STUN server:

  3. The SPA504G is connected to a linux VPS located in a remote location (Canada to be specific)

  4. My DID is 1-305-702-XXXX and all calls from this DID comes from 4 different IP addresses
    IP1: 1.2.X.X
    IP2: 3.4.X.X
    IP3: 5.6.X.X
    IP4: 7.8.X.X

When a call comes from IP1: Work Fine with 2-way audio
When a call comes from IP2: Work Fine with 2-way audio
When a call comes from IP3: Work Fine with 2-way audio
When a call comes from IP4: [quote]Hanging up call 5440368-0-3135177050@IP4 - no reply to our critical packet (see … nsmissions).[/quote]

  1. At home I have 2Mbps Download / 512kbps Upload.
    I’m using 1 single concurrent call.

What should I do?

Capture the IP traffic and see if you are getting an ICMP destination unreachable back for requests to 7.8.x.x, and, if so, from where you are getting.

Try a traceroute to 7.8.x.x using default options, and if that gets through, using port 5060. Do a traceroute to 1.2.x.x to make sure that no router is blocking ICMP.