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