Incoming call endlessly respawns extension

The problem is after the incoming call doesn’t get picked up (after 20 s), the extension “incoming” gets spawned once again, and 702 continues to ring. This loop goes on effectively forever.
Please let me know if you need additional information.
log:
== Using SIP RTP CoS mark 5
– Executing [s@incoming:1] NoOp(“SIP/provider-00000000”, “”) in new stack

– Executing [s@incoming:2] Dial(“SIP/provider-00000000”, “SIP/702,20”) in new stack
[Apr 5 22:04:40] WARNING[32606][C-00000000]: app_dial.c:2437 dial_exec_full: Unable to create channel of type ‘SIP’ (cause 20 - Subscriber absent)
== Everyone is busy/congested at this time (1:0/0/1)
– Auto fallthrough, channel ‘SIP/provider-00000000’ status is ‘CHANUNAVAIL’
== Using SIP RTP CoS mark 5
– Executing [s@incoming:1] NoOp(“SIP/provider-00000001”, “”) in new stack

– Executing [s@incoming:2] Dial(“SIP/provider-00000001”, “SIP/702,20”) in new stack
and so on…
extensions.conf:
[general]
autofallthrough=yes
clearglobalvars=yes
static=yes
[incoming]
exten => s,1,NoOp()
same=> n,Dial(SIP/702,20)
sip.conf:
register => user:pass@server
[provider]
type=friend
dtmfmode=rfc2833
context=incoming
insecure=very
host=server
nat=no
canreinvite=no

[quote][Apr 5 22:04:40] WARNING[32606][C-00000000]: app_dial.c:2437 dial_exec_full: Unable to create channel of type ‘SIP’ (cause 20 - Subscriber absent)

Auto fallthrough, channel ‘SIP/provider-00000000’ status is ‘CHANUNAVAIL’[/quote]

CHANUNAVAIL on SIP normally means that the destination device has not registered. That’s why (Subscriber absent)

you can add this line to your dial plan same=>n,Hangup and this will stop the loop

even if i I just have the hangup command, and no dial command at all, I get the loop. Any thoughts:

== Using SIP RTP CoS mark 5

-- Executing [s@incoming:1] Hangup("SIP/provider-00000000", "") in new stack

== Spawn extension (incoming, s, 1) exited non-zero on ‘SIP/provider-00000000’

== Using SIP RTP CoS mark 5

-- Executing [s@incoming:1] Hangup("SIP/provider-00000001", "") in new stack

== Spawn extension (incoming, s, 1) exited non-zero on ‘SIP/provider-00000001’

== Using SIP RTP CoS mark 5

-- Executing [s@incoming:1] Hangup("SIP/provider-00000002", "") in new stack

Explicitly calling Hangup will only make a difference for very old versions of Asterisk, or with rather unusual setting in the general section of extensions.conf. Modern versions generate a hangup automatically when you run off the end of the dialplan.

Right.

So, the issue seems to have been with my NAT settings, and went away after specifying nat=yes. Any idea why an NAT error would cause the loop? Anyway to stop it in its tracks even if the NAT error can’t be fixed?

In more detail, I have two incoming call setups:
one is a DID from a provider. I register at the provider sip.conf (register => user:pass@provider)
and then route the calls to the extensions as above.

the second is ipkall calling my asterisk server directly and then routing to extensions.

both were looping initially, with error ‘603’ on sip debug

specifying nat=yes in sip.conf for the ipkall setup fixed the problem. But still no luck for the provider. The provider is a weird setup through my university, where they use an outbound proxy which confuses me. I will play around for a bit to see if I can get this to work too.