[asterisk-dev] pjsip / asterisk 14+: Sometimes outbound calls are forbidden by provider

Joshua C. Colp jcolp at digium.com
Fri May 24 06:14:53 CDT 2019

On Fri, May 24, 2019, at 6:02 AM, Michael Maier wrote:
> Hello!
> some people are facing a problem regarding forbidden outbound calls to 
> the ISP. They start an outbound call, which is rejected by the
> provider. Debugging revealed the reason: The IP used for the outbound 
> INVITE is different from the IP used for the REGISTER. That's why the
> ISP forbids the outbound call.
> Background:
> A SRV lookup gives 3 hosts each with different priority. At the start 
> time, Asterisk takes the IP with the highest priority for the
> REGISTER. REGISTER timeout is 660s.
> Some time later, lets say 300s, an outbound call is started, which is 
> rejected by ISP (forbidden), because of wrong destination (REGISTER IP
> != INVITE IP).
> My question:
> Is it possible, that asterisk performs a DNS lookup before it sends the 
> INVITE to the ISP for the outgoing call? At this moment, the DNS
> reports changed priorities or the REGISTERed IP isn't there at all any 
> more and therefore, Asterisk uses another IP for the outgoing INVITE?

Yes, this is how it works. The outbound registration and calling aren't associated at all. When an INVITE is done then another resolution occurs along with picking an IP address.

Joshua C. Colp
Digium - A Sangoma Company | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org

More information about the asterisk-dev mailing list