[Kamailio-Users] uac_replace_from again

Daniel-Constantin Mierla miconda at gmail.com
Wed Nov 4 15:38:37 CET 2009



On 04.11.2009 15:32 Uhr, olivier.taylor at gmail.com wrote:
> doing that, I get a loop :(
>
>   if(has_totag()){
>         if(is_method("BYE")){
>               xlog("L_NOTICE", "------------------>  LOOSE route");
>           }
>         t_relay(); #relay all in-dialog messages (also BYEs)
>         exit;
>   }
you need to do loose_route() for BYE, otherwise the Route header is not 
consumed.


Cheers,
Daniel

>
> seems that kamailio is sending the request back to himself...
>
> Thanks anyway
>
>
>
>
>
> Nov  4 17:21:53 localhost /usr/local/sbin/kamailio[29730]: 
> ------------------>  LOOSE route
> Nov  4 17:21:53 localhost /usr/local/sbin/kamailio[29731]: 
> ------------------>  LOOSE route
> Nov  4 17:21:53 localhost /usr/local/sbin/kamailio[29733]: 
> ------------------>  LOOSE route
> Nov  4 17:21:53 localhost /usr/local/sbin/kamailio[29735]: 
> ------------------>  LOOSE route
> Nov  4 17:21:53 localhost /usr/local/sbin/kamailio[29733]: 
> ------------------>  LOOSE route
> Nov  4 17:21:53 localhost /usr/local/sbin/kamailio[29735]: 
> ------------------>  LOOSE route
> Nov  4 17:21:53 localhost /usr/local/sbin/kamailio[29733]: 
> ------------------>  LOOSE route
> Nov  4 17:21:53 localhost /usr/local/sbin/kamailio[29732]: 
> ------------------>  LOOSE route
> Nov  4 17:21:53 localhost /usr/local/sbin/kamailio[29730]: 
> ------------------>  LOOSE route
> Nov  4 17:21:53 localhost /usr/local/sbin/kamailio[29729]: 
> ------------------>  LOOSE route
> Nov  4 17:21:53 localhost /usr/local/sbin/kamailio[29728]: 
> ------------------>  LOOSE route
> Nov  4 17:21:53 localhost /usr/local/sbin/kamailio[29734]: 
> ------------------>  LOOSE route
> Nov  4 17:21:53 localhost /usr/local/sbin/kamailio[29731]: 
> ------------------>  LOOSE route
> Nov  4 17:21:53 localhost /usr/local/sbin/kamailio[29731]: 
> ------------------>  LOOSE route
> Nov  4 17:21:53 localhost /usr/local/sbin/kamailio[29735]: 
> ------------------>  LOOSE route
> Nov  4 17:21:53 localhost /usr/local/sbin/kamailio[29729]: 
> ------------------>  LOOSE route
> Nov  4 17:21:53 localhost /usr/local/sbin/kamailio[29728]: 
> ------------------>  LOOSE route
> Nov  4 17:21:53 localhost /usr/local/sbin/kamailio[29734]: 
> ------------------>  LOOSE route
> Nov  4 17:21:53 localhost /usr/local/sbin/kamailio[29732]: 
> ------------------>  LOOSE route
> Nov  4 17:21:53 localhost /usr/local/sbin/kamailio[29734]: 
> ------------------>  LOOSE route
> Nov  4 17:21:53 localhost /usr/local/sbin/kamailio[29732]: 
> ------------------>  LOOSE route
> Nov  4 17:21:53 localhost /usr/local/sbin/kamailio[29731]: 
> ------------------>  LOOSE route
> Nov  4 17:21:53 localhost /usr/local/sbin/kamailio[29732]: 
> ------------------>  LOOSE route
> Nov  4 17:21:53 localhost /usr/local/sbin/kamailio[29733]: 
> ------------------>  LOOSE route
> Nov  4 17:21:53 localhost /usr/local/sbin/kamailio[29732]: 
> ------------------>  LOOSE route
> Nov  4 17:21:53 localhost /usr/local/sbin/kamailio[29730]: 
> ------------------>  LOOSE route
>
>
> marius zbihlei a écrit :
>>
>>>
>>>
>>>    if (is_method("INVITE"))
>>>    {
>>>        record_route();
>>>        uac_replace_from("sip:997321073 at xxxxxx.be");
>>>        rewritehost("xxxxxx.be");
>>>    }
>>>
>>>
>>>    if (has_totag()) {
>>>        if (loose_route()) {
>>>            if (is_method("BYE")) {
>>>                xlog("L_NOTICE", "------------------>  LOOSE route");
>>>                t_relay();
>> I think there are too many t_relay(). Just one will suffice.
>>    if(has_totag()){
>>          if(is_method("BYE")){
>>                xlog(......);
>>            }
>>          t_relay(); #relay all in-dialog messages (also BYEs)
>>          exit;
>>    }
>>
>> Can you try with smth like this?
>>
>> Cheers
>> Marius
>>
>>
>
>
>
> _______________________________________________
> Kamailio (OpenSER) - Users mailing list
> Users at lists.kamailio.org
> http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
> http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
>

-- 
Daniel-Constantin Mierla
* http://www.asipto.com/




More information about the Users mailing list