Asterisk outbound call loop detected

I am fairly new to Asterisk and below is my configuration. I am using softphone(MicroSIP). Incoming calls dialled to my DID are coming to the softphone and call can be established. On making outbound calls from softphone to the sip trunk, i get SIP response 482 “Loop Detected” back from the trunk.

[general]
context=FROMTRUNK
port=5060
bindaddr=0.0.0.0
call-limit=5
qualify=yes
srvlookup=yes
disallow=all
allow=ulaw
allow=alaw
nat=force_rport,comedia
callerid=+913XXXXXXXXX
autocreatepeer=yes
localnet=192.168.2.0/255.255.255.0
directmedia=yes
language=En
allowtransfer=yes
maxexpiry=3600
defaultexpiry=300
useragent=JIO SIP TRUNK
dtmfmode=rfc2833
alwaysauthreject = no
rtptimeout=60
rtpholdtimeout=300
rtcachefriends=yes
allowguest=yes
sipdebug = no
registertimeout=60
registerattempts=0
callgroup=1
pickupgroup=1
callevents=yes
trustrpid=yes
sendrpid=yes

register => +91XXXXXXXXXX:+91XXXXXXXXXX@100.XXX.XXX.XXX:5060/+91XXXXXXXXXX

[8077]
type=friend
fromuser=+91XXXXXXXXXX
username=+91XXXXXXXXXX
secret=+91XXXXXXXXXX
context=internal
host=100.XXX.XXX.XXX
fromdomain=100.XXX.XXX.XXX
domain=100.XXX.XXX.XXX
qualify=yes
nat=no
dtmfmode=rfc2833
disallow=all
allow=ulaw
allow=alaw
sendrpid=yes
trustrpid=yes
directmedia=yes

[7001]
type=friend
context=internal
secret=123
callerid=“7001”
host=dynamic
sendrpid=yes
trustrpid=yes
callcounter=yes

======================================================

[general]
static = yes
writeprotect = no
priorityjumping = no
autofallthrough = no
clearglobalvars = no

[FROMTRUNK]
exten => _+91XXXXXXXXXX,1,NoOp(Incoming Call from trunk - ${EXTEN})
same => n, Answer()
same => n, Dial(SIP/7001,20,r)
same => n, Hangup()

[internal]
exten => _0X., 1, NoOp(Making Outgoing Call)
exten => _0X., 2, Set(CALLERID(num)=+91XXXXXXXXXX)
exten => _0X., 3, Dial(SIP/+91XXXXXXXXXX/${EXTEN:1})
exten => _0X., 4, Hangup()

======================================================

I keep getting this error

testasterisk*CLI>
== Using SIP RTP CoS mark 5
– Executing [087XXXXXX54@internal:1] NoOp(“SIP/7001-00000013”, “Making Outgoing Call”) in new stack
– Executing [087XXXXXX54@internal:2] Set(“SIP/7001-00000013”, “CALLERID(num)=+91XXXXXXXXXX”) in new stack
– Executing [087XXXXXX54@internal:3] Dial(“SIP/7001-00000013”, “SIP/+91XXXXXXXXXX/87XXXXXX54”) in new stack
== Using SIP RTP CoS mark 5
– Called SIP/+91XXXXXXXXXX/87XXXXXX54
– Got SIP response 482 “Loop Detected” back from 100.XXX.XXX.XXX:5060
– SIP/+91XXXXXXXXXX-00000014 is circuit-busy
== Everyone is busy/congested at this time (1:0/1/0)
– Executing [087XXXXXX54@internal:4] Hangup(“SIP/7001-00000013”, “”) in new stack
== Spawn extension (internal, 087XXXXXX54, 4) exited non-zero on ‘SIP/7001-00000013’
– Unregistered SIP ‘7001’
– Registered SIP ‘7001’ at 192.168.2.116:61824

On Friday 02 August 2024 at 17:12:21, devUser1404 via Asterisk Community
wrote:

I am fairly new to Asterisk

In that case you really should not be using the deprecated (since several
years) and unsupported chan_sip, because you will spending time learning about
a channel driver which no longer even exists in the latest version.

You really should start with PJSIP instead and become familiar with how the
supported channel driver works.

I know this is not an answer to your dialplan problem - maybe someone else
will address that - but if you have a configuration using PJSIP at least more
people will be familiar with it and able to help out.

Antony.


“There is no reason for any individual to have a computer in their home.”

  • Ken Olsen, President of Digital Equipment Corporation (DEC, later consumed
    by Compaq, later merged with HP)

                                                Please reply to the list;
                                                      please *don't* CC me.
    

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.