[HELP] * detects loop then dumps call into wrong context

We have a SNOM360 (ext 226) configured for redirection (away on annual leave) to another SNOM360 (ext 225), being tested from a SNOM320 (ext 227) which appears on the surface to be an easy adjustment.

Was receiving the following message,

"Got SIP response 302 "Moved Temporarily" back from"

of which, I was able to understand and correct by adding the following to the sip.conf file,

"promiscredir    = yes"

Why would Asterisk-PBX get confused and assume a loop existed with the redirection? It obviously understands that it needs to redirect the call, and actually attempts to get it right and then gets it horrible wrong, sending it to the wrong context.

– Got SIP response 302 “Moved Temporarily” back from 10.255.6.197
– Now forwarding SIP/227-cc31 to ‘SIP/225@sip.bisabicara.swsa.com.au’ (thanks to SIP/226-94ec) <— This is what I would expect to see working
– Got SIP response 482 “Loop Detected” back from 10.255.6.2 <— Asterisk-PBX appears to be having a difficulty
– Now forwarding SIP/227-cc31 to ‘Local/225@from-sip-unknown’ (thanks to SIP/sip.bisabicara.swsa.com.au-e14f) <— And drops the redirection into the wrong context.

So for argument sake, I add some additional extension commands to permit the call to proceed, not that I would have thought it to be necessary. And the redirection works. Not exactly a clean redirection, and I would rather resolve the error messages and ensure that it does call the correct context - assuming this is what Asterisk-PBX should be capable of.

Asterisk-PBX v1.2.6
SNOM’s v5.3.6
Extensions within the same context

Any ideas? Is this the way it should occur or is Asterisk-PBX miss behaving? Or do I have it all wrong?

Hello,

I’m not sure if these are set up in the base * or are an AAH item but have you tried *72 from the phone you want to forward? That sets up call forwarding in AAH at least. Here is that code AAH uses from extensions.conf:

[app-callforward]
; dialed call forward app - forwards calling extension
exten => _*72.,1,Macro(user-callerid)
exten => _*72.,2,Set(DB(CF/${CALLERID(number)})=${EXTEN:3})
exten => _*72.,3,Answer
exten => _*72.,4,Wait(1)
exten => _*72.,5,Playback(call-fwd-unconditional)
exten => _*72.,6,Playback(for)
exten => _*72.,7,Playback(extension)
exten => _*72.,8,SayDigits(${CALLERID(number)})
exten => _*72.,9,Playback(is-set-to)
exten => _*72.,10,SayDigits(${EXTEN:3})
exten => _*72.,11,Macro(hangupcall)
; prompting call forward app - forwards entered extension
exten => *72,1,Answer
exten => *72,2,Wait(1)
exten => *72,3,BackGround(please-enter-your)
exten => *72,4,Playback(extension)
exten => *72,5,Read(fromext,then-press-pound)
exten => *72,6,Wait(1)
exten => *72,7,BackGround(ent-target-attendant)
exten => *72,8,Read(toext,then-press-pound)
exten => *72,9,Wait(1)
exten => *72,10,Set(DB(CF/${fromext})=${toext})
exten => *72,11,Playback(call-fwd-unconditional)
exten => *72,12,Playback(for)
exten => *72,13,Playback(extension)
exten => *72,14,SayDigits(${fromext})
exten => *72,15,Playback(is-set-to)
exten => *72,16,SayDigits(${toext})
exten => *72,17,Macro(hangupcall)
; cancels dialed extension call forward
exten => _*73.,1,DBdel(CF/${EXTEN:3})
exten => _*73.,2,Answer
exten => _*73.,3,Wait(1)
exten => _*73.,4,SayDigits(${EXTEN:3})
exten => _*73.,5,Playback(call-fwd-cancelled)
exten => _*73.,6,Macro(hangupcall)
; cancels call forward for calling extension
exten => *73,1,Macro(user-callerid)
exten => *73,2,DBdel(CF/${CALLERID(number)})
exten => *73,3,Answer
exten => *73,4,Wait(1)
exten => *73,5,Playback(call-fwd-cancelled)
exten => *73,6,Macro(hangupcall)
; dialed call forward on busy app - forwards calling extension when busy
exten => _*90.,1,Macro(user-callerid)
exten => _*90.,2,Set(DB(CFB/${CALLERID(number)})=${EXTEN:3})
exten => _*90.,3,Answer
exten => _*90.,4,Wait(1)
exten => _*90.,5,Playback(call-fwd-on-busy)
exten => _*90.,6,Playback(for)
exten => _*90.,7,Playback(extension)
exten => _*90.,8,SayDigits(${CALLERID(number)})
exten => _*90.,9,Playback(is-set-to)
exten => _*90.,10,SayDigits(${EXTEN:3})
exten => _*90.,11,Macro(hangupcall)
; cancels call forward on busy for calling extension
exten => *91,1,Macro(user-callerid)
exten => *91,2,DBdel(CFB/${CALLERID(number)})
exten => *91,3,Answer
exten => *91,4,Wait(1)
exten => *91,5,Playback(call-fwd-on-busy)
exten => *91,6,Playback(de-activated)
exten => *91,7,Macro(hangupcall)
exten => h,1,Hangup

I hope this helps,

Tom

Hi Tom

That is the dialplan entries for setting the database entries for call forwarding with AAH.
All it is doing is adding or deleting entries from the internal database.
The forwarding is caried out else where in the dialplan referencing those database entries.

Ian

:blush: Sorry, well now I know what they are! :astonished:

Tom

Hi

No probs AAH is a bit of a jungle to find your way around in. :unamused:

Ian

Not using AAH, just the core asterisk software v1.2.6.