[Serusers] Too Many Hops

Noel Sharpe noels at radnetwork.co.uk
Tue Nov 15 10:14:10 CET 2005


sounds to me like you have a looping problem in your script.  I had 
something similar when using the example from OnSIP.org.  The 
loose_route bit needed to be inside a condition:
    if (uri!=myself){
        if (loose_route()) {
            route(1);      
        };          
    };
xlog/ngrep is your friend here as you will be able to see which message 
is being sent between the two servers.

Noel

Giovanni Balasso wrote:

>Alle 09:47, mercoledì 02 novembre 2005, Matteo Piazza ha scritto:
>  
>
>>I have Ser and asterisk on the same machine.
>>When i try to call with a SIP phone registred on asterisk another sip
>>phone also registred on asterisk through SER I receve this error message:
>>Too many hops
>>    
>>
>
>Too many hops is usually reached when there is no rule (or no way) to deliver 
>sip message, adding some log(), or better xlog(), to your routing script 
>could help you (and us) debugging and understanding what's wrong, and which 
>method(s) fail.
>
>
>  
>
>>        if (method == "INVITE") {
>>          if (uri =~"^sip:0[0-9]*@*"){
>>           log(1, "Check 1 succed Forwarding to Asterisk\n");
>>           rewritehostport("192.168.9.97:5061");
>>           t_relay();
>>           break;
>>          };
>>         };
>>
>>    
>>
>
>I don't think this will solve your problem but in my experience I had better 
>result with t_relay_to_udp("192.168.9.97","5061") than 
>rewritehostport("192.168.9.97:5061").
>
>  
>




More information about the sr-users mailing list