[asterisk-dev] Call Forwarding Detail Needed

Arpit Mehta am2866 at columbia.edu
Sun Apr 1 16:42:38 MST 2007


Hi,

I think it should be there in Asterisk. I just want to know how Asterisk
implements this and where does it implement it.

Regards

Arpit

On 4/1/07, Steve Totaro <stotaro at totarotechnologies.com> wrote:
>
> The scenario you describe is *extremely easy* to setup and test.  I am
> sure, you will find that there is no loop detection and if you watch the
> console with any level of verbose, it will continue to scroll very
> rapidly down the screen.
>
> Maybe RDNIS could be used to back track one extra level of forwarding,
> other than that, I do not believe there is any mechanism to prevent this.
>
> What is your fear or what are you thinking is a problem?  Do you see
> this causing so much activity that it slows or crashes a server?  Why
> not try it and see?
>
> Thanks,
> Steve
>
> Arpit Mehta wrote:
> > Hi,
> >
> > Thanks. That was useful. But it is more like calling myself and hence
> > making a loop.
> >
> > I was thinking of how Asterisk detects a loop where more than one
> > participants are involved. Also whether for detection of the loop,
> > Asterisk will require to store and receive information from the
> > calling person that all these numbers have been call forwarded to
> > since that will be needed to find out whether or not you are call
> > forwarding to the same person.
> >
> > Thanks
> >
> > Regards
> >
> > Arpit
> >
> > On 4/1/07, *Leif Madsen* <leif.madsen at asteriskdocs.org
> > <mailto:leif.madsen at asteriskdocs.org>> wrote:
> >
> >     On Sunday 01 April 2007 03:34:53 Arpit Mehta wrote:
> >     > I just want to know if Asterisk handles a looping case and where
> >     does it
> >     > handle that .
> >     >
> >     > A--> B --> C--> D --> B
> >     >
> >     > If A calls  B ,
> >     >   B call fwds to C ,
> >     >   C call fwds to D ,
> >     >   D call fwds to B . Now there is a loop .
> >     > How does asterisk prevent this loop? I just to know where (as in
> >     which
> >     > module in the Asterisk source code) and how is this prevented
> >     (that is if a
> >     > data structure of all the numbers that it has call fwded to is
> >     passed on to
> >     > B,C,D so that it can detect a loop)?
> >     >
> >     > Thanks. I hope you understand my scenario. Any suggestions are
> >     welcome.
> >
> >     As far I might understand it, Asterisk would basically parse the
> >     Via: headers
> >     to determine where the call was coming from, and if it detected a
> >     loop,
> >     *should* handle that (this does seem like a loop, and not a spiral).
> >
> >     I'll have to defer this to the SIP experts and C experts, but
> >     basically here
> >     is the code that chan_sip.c (at line 13185 of my chan_sip.c file)
> >     that checks
> >     for the loop:
> >
> >             /* Check if this is a loop */
> >             if (ast_test_flag(&p->flags[0], SIP_OUTGOING) && p->owner &&
> >     (p->owner->_state != AST_STATE_UP)) {
> >                     /* This is a call to ourself.  Send ourselves an
> >     error code
> >     and stop
> >                     processing immediately, as SIP really has no good
> >     mechanism
> >     for
> >                     being able to call yourself */
> >                     /* If pedantic is on, we need to check the tags.
> >     If they're
> >     different, this is
> >                     in fact a forked call through a SIP proxy
> >     somewhere. */
> >                     transmit_response(p, "482 Loop Detected", req);
> >                     p->invitestate = INV_COMPLETED;
> >                     sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
> >                     return 0;
> >             }
> >
> >     Leif Madsen.
> >
> >
> >
> >
> > --
> > Arpit Mehta
> > Graduate Student
> > Department of Computer Science
> > Columbia University
> >
> > Tel: 1-646-387-5998
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > --Bandwidth and Colocation provided by Easynews.com --
> >
> > asterisk-dev mailing list
> > To UNSUBSCRIBE or update options visit:
> >    http://lists.digium.com/mailman/listinfo/asterisk-dev
> >
>
>


-- 
Arpit Mehta
Graduate Student
Department of Computer Science
Columbia University

Tel: 1-646-387-5998
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20070401/9d697fce/attachment.htm


More information about the asterisk-dev mailing list