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