Inbound calls are not answered and enter a loop

Hi.

I’m trying to configure asterisk CLI and outgoing calls are working fine. Inbound calls however are not ringing. There Just appears to be a loop between the SIP Trunk provider and the Asterisk PBX.

This Is the output I get.

cuting [h@DirectCall:1] Dial(“SIP/mtnsat-outbound-00001ce7”, “SIP/h@mtnsat-outbound”) in new stack
== Using SIP RTP CoS mark 5
– Called h@mtnsat-outbound
== Spawn extension (DirectCall, h, 1) exited non-zero on ‘SIP/mtnsat-outbound-00001ce7’
== Using SIP RTP CoS mark 5
– Executing [19546727881@DirectCall:1] Dial(“SIP/mtnsat-outbound-00001d2d”, “SIP/19546727881@mtnsat-outbound”) in new stack
== Using SIP RTP CoS mark 5
– Called 19546727881@mtnsat-outbound
== Spawn extension (DirectCall, 19546727881, 1) exited non-zero on ‘SIP/mtnsat-outbound-00001ceb’
– Executing [h@DirectCall:1] Dial(“SIP/mtnsat-outbound-00001ceb”, “SIP/h@mtnsat-outbound”) in new stack
== Using SIP RTP CoS mark 5
– Called h@mtnsat-outbound
== Spawn extension (DirectCall, h, 1) exited non-zero on ‘SIP/mtnsat-outbound-00001ceb’
== Using SIP RTP CoS mark 5
– Executing [19546727881@DirectCall:1] Dial(“SIP/mtnsat-outbound-00001d30”, “SIP/19546727881@mtnsat-outbound”) in new stack
== Using SIP RTP CoS mark 5
– Called 19546727881@mtnsat-outbound
== Spawn extension (DirectCall, 19546727881, 1) exited non-zero on ‘SIP/mtnsat-outbound-00001cef’
– Executing [h@DirectCall:1] Dial(“SIP/mtnsat-outbound-00001cef”, “SIP/h@mtnsat-outbound”) in new stack
== Using SIP RTP CoS mark 5
– Called h@mtnsat-outbound
== Spawn extension (DirectCall, h, 1) exited non-zero on ‘SIP/mtnsat-outbound-00001cef’
== Spawn extension (DirectCall, 19546727881, 1) exited non-zero on ‘SIP/mtnsat-outbound-00001cf2’
– Executing [h@DirectCall:1] Dial(“SIP/mtnsat-outbound-00001cf2”, “SIP/h@mtnsat-outbound”) in new stack
== Using SIP RTP CoS mark 5
– Called h@mtnsat-outbound
== Spawn extension (DirectCall, h, 1) exited non-zero on ‘SIP/mtnsat-outbound-00001cf2’
– Got SIP response 500 “Disconnected” back from 216.7.159.214
– Got SIP response 500 “Disconnected” back from 216.7.159.214
== Spawn extension (DirectCall, 19546727881, 1) exited non-zero on ‘SIP/mtnsat-outbound-00001cfb’
– Executing [h@DirectCall:1] Dial(“SIP/mtnsat-outbound-00001cfb”, “SIP/h@mtnsat-outbound”) in new stack
== Using SIP RTP CoS mark 5
– Called h@mtnsat-outbound
== Spawn extension (DirectCall, h, 1) exited non-zero on ‘SIP/mtnsat-outbound-00001cfb’
– Got SIP response 500 “Disconnected” back from 216.7.159.214
== Spawn extension (DirectCall, 19546727881, 1) exited non-zero on ‘SIP/mtnsat-outbound-00001d02’
– Executing [h@DirectCall:1] Dial(“SIP/mtnsat-outbound-00001d02”, “SIP/h@mtnsat-outbound”) in new stack
== Using SIP RTP CoS mark 5
– Called h@mtnsat-outbound
== Spawn extension (DirectCall, h, 1) exited non-zero on ‘SIP/mtnsat-outbound-00001d02’
– Got SIP response 500 “Disconnected” back from 216.7.159.214
== Spawn extension (DirectCall, 19546727881, 1) exited non-zero on ‘SIP/mtnsat-outbound-00001d0a’
– Executing [h@DirectCall:1] Dial(“SIP/mtnsat-outbound-00001d0a”, “SIP/h@mtnsat-outbound”) in new stack
== Using SIP RTP CoS mark 5
– Called h@mtnsat-outbound
== Spawn extension (DirectCall, h, 1) exited non-zero on ‘SIP/mtnsat-outbound-00001d0a’
– Got SIP response 500 “Disconnected” back from 216.7.159.214
== Spawn extension (DirectCall, 19546727881, 1) exited non-zero on ‘SIP/mtnsat-outbound-00001d11’
– Executing [h@DirectCall:1] Dial(“SIP/mtnsat-outbound-00001d11”, “SIP/h@mtnsat-outbound”) in new stack
== Using SIP RTP CoS mark 5
– Called h@mtnsat-outbound
== Spawn extension (DirectCall, h, 1) exited non-zero on ‘SIP/mtnsat-outbound-00001d11’
– Got SIP response 500 “Disconnected” back from 216.7.159.214
== Spawn extension (DirectCall, 19546727881, 1) exited non-zero on ‘SIP/mtnsat-outbound-00001d15’
– Executing [h@DirectCall:1] Dial(“SIP/mtnsat-outbound-00001d15”, “SIP/h@mtnsat-outbound”) in new stack
== Using SIP RTP CoS mark 5
– Called h@mtnsat-outbound
== Spawn extension (DirectCall, h, 1) exited non-zero on ‘SIP/mtnsat-outbound-00001d15’
– Got SIP response 500 “Disconnected” back from 216.7.159.214
== Spawn extension (DirectCall, 19546727881, 1) exited non-zero on ‘SIP/mtnsat-outbound-00001d19’
– Executing [h@DirectCall:1] Dial(“SIP/mtnsat-outbound-00001d19”, “SIP/h@mtnsat-outbound”) in new stack
== Using SIP RTP CoS mark 5
– Called h@mtnsat-outbound
== Spawn extension (DirectCall, h, 1) exited non-zero on ‘SIP/mtnsat-outbound-00001d19’
– Got SIP response 500 “Disconnected” back from 216.7.159.214
== Spawn extension (DirectCall, 19546727881, 1) exited non-zero on ‘SIP/mtnsat-outbound-00001d1d’
– Executing [h@DirectCall:1] Dial(“SIP/mtnsat-outbound-00001d1d”, “SIP/h@mtnsat-outbound”) in new stack
== Using SIP RTP CoS mark 5
– Called h@mtnsat-outbound
== Spawn extension (DirectCall, h, 1) exited non-zero on ‘SIP/mtnsat-outbound-00001d1d’
– Got SIP response 500 “Disconnected” back from 216.7.159.214
== Spawn extension (DirectCall, 19546727881, 1) exited non-zero on ‘SIP/mtnsat-outbound-00001d21’
– Executing [h@DirectCall:1] Dial(“SIP/mtnsat-outbound-00001d21”, “SIP/h@mtnsat-outbound”) in new stack
== Using SIP RTP CoS mark 5
– Called h@mtnsat-outbound
== Spawn extension (DirectCall, h, 1) exited non-zero on ‘SIP/mtnsat-outbound-00001d21’
– Got SIP response 500 “Disconnected” back from 216.7.159.214
== Spawn extension (DirectCall, 19546727881, 1) exited non-zero on ‘SIP/mtnsat-outbound-00001d25’
– Executing [h@DirectCall:1] Dial(“SIP/mtnsat-outbound-00001d25”, “SIP/h@mtnsat-outbound”) in new stack
== Using SIP RTP CoS mark 5
– Called h@mtnsat-outbound
== Spawn extension (DirectCall, h, 1) exited non-zero on ‘SIP/mtnsat-outbound-00001d25’
– Got SIP response 500 “Disconnected” back from 216.7.159.214
== Spawn extension (DirectCall, 19546727881, 1) exited non-zero on ‘SIP/mtnsat-outbound-00001d29’
– Executing [h@DirectCall:1] Dial(“SIP/mtnsat-outbound-00001d29”, “SIP/h@mtnsat-outbound”) in new stack
== Using SIP RTP CoS mark 5
– Called h@mtnsat-outbound
== Spawn extension (DirectCall, h, 1) exited non-zero on ‘SIP/mtnsat-outbound-00001d29’
– Got SIP response 500 “Disconnected” back from 216.7.159.214
== Spawn extension (DirectCall, 19546727881, 1) exited non-zero on ‘SIP/mtnsat-outbound-00001d30’
– Executing [h@DirectCall:1] Dial(“SIP/mtnsat-outbound-00001d30”, “SIP/h@mtnsat-outbound”) in new stack
== Using SIP RTP CoS mark 5
– Called h@mtnsat-outbound
== Spawn extension (DirectCall, h, 1) exited non-zero on

I can send configurations of sip and extensions.conf but I would like to ask what I should remove from these configs so as not to compromise security.

Would appreciate any assistance.

What is the dialplan? It appears as though you are matching EVERYTHING and sending it out a SIP trunk, which includes the ‘h’ extension that is executed on hangup.

HI. Thanks for taking a look.

It was a previous setup and I am not familiar with asterisk. Upon fiddling around, I saw a “direct call” context was matching after previous matches to an extension failed.

I was not matching to the correct alias external number.

It’s working fine now.

Is there somewhere I can mark this post as answered ?