Moved Temporarily

Hey,
First of all, i’d like to say im new here and i’ve got a lil problem;)

Im using my AGI application written in java with asterisk. It works fine, but some times Asterisk getting “Moved Temporarily”, which force Asterisk to forward SIP/mISDN channel to Local.

    -- Called gdfi051
    -- Got SIP response 302 "Moved Temporarily" back from 192.168.0.168
    -- Now forwarding mISDN/2-u20 to 'Local/54@XXX' (thanks to SIP/gdfi051-08249a88)
[Dec 18 14:38:53] NOTICE[21051]: cdr.c:434 ast_cdr_free: CDR on channel 'SIP/gdfi051-08249a88' not posted
    -- Executing [54@XXX:1] GotoIf("Local/54@XXX-efa4,2", "1?3") in new stack
    -- Goto (XXX,54,3)
    -- Executing [54@XXX:3] AGI("Local/54@XXX-efa4,2", "agi://127.0.0.1/call-processor") in new stack

This crashes my AGI application. Forwarded channel runs new instance of AGI. I’ve got 2 ways to fixed it up:

  • fix AGI
  • force Asterisk not to forward to Local channel.

Here is my question:
Is there any way to tell Asterisk not to forward to Local channel? Maybe my qiestion is a lil childish, but i if the initial call is from SIP channel the new forwarded channel also should be SIP, no ?