[Users] NAT+uac_replace_from

Daniel-Constantin Mierla daniel at voice-system.ro
Fri Jan 6 12:28:52 CET 2006


Send me the network traces for this case to see what is wrong. The uac 
module has a mode when it should do automatic replacement in subsequent 
requests.

Daniel


On 01/06/06 04:37, unplug wrote:
> Thanks for your reply.  According to your reply, I add the following
> code for the PRACK.
> if (method=="PRACK") {
>            if (avp_db_load("$from/uri","s:alias")) {
>                  xlog("L_INFO","sip408: have alias - [$avp(s:alias)]\n");
>                  uac_replace_from("anonymous","sip:$avp(s:alias)@$si");
>            } else {
>                  xlog("L_INFO","sip411: no alias\n");
>            };
> }
>
> The result is the same as before.  It seems there is a conflict in the
> from header and it causes the 481 error.  To be more precise, below is
> the protocol flow.
>
> 		UA1				server1			server2
> fromtag:taga	-----from username:9000 INVITE----->				
> fromtag:taga	<----from username:9000 100 trying---
> 			after uac_replace_from("1234","sip:1234@$si")
> fromtag:taga 					------from username:1234 INVITE ---->
> (callee rings but caller drops)
> fromtag:taga					<-----from username:1234 100 trying----
> (callee still rings until answers the call)
> fromtag:taga					<----from username:1234 session progress 183---
> fromtag:taga	<-----from username:9000 session prgress 183----
> fromtag:taga	-----from username:9000 PRACK----------->
> fromtag:taga					----------from username:9000 PRACK--->
> fromtag:taga					<----from username:9000 481 call leg -----
> fromtag:taga	<----from username:9000 481 call leg -----
>
>
> On 1/5/06, Daniel-Constantin Mierla <daniel at voice-system.ro> wrote:
>   
>> Hello,
>>
>> "SIP/2.0 481 Call Leg/Transaction Does Not Exist" is for PRACK, because you do not change the From header for it. You have to do the same translation for all requests within the dialog. See the documentation of uac module: .
>>
>> http://openser.org/docs/modules/1.1.x/uac.html
>>
>> Cheers,
>> Daniel
>>
>>
>> On 01/04/06 12:21, unplug wrote:
>>     
>>> Actually, I am replacing the username of the uri with the alias that
>>> stored in the database.  In my configuration file, it is using
>>> mediaproxy for NAT function (features-callfwd.5.0.cfg from getting
>>> started). I also add the following codes in the very first of the
>>> route routine for alias replacing purpose.
>>>
>>> route {
>>> ...
>>>         if (!has_totag() && method=="INVITE") {
>>>           if (avp_db_load("$from/uri","s:alias")) {
>>>                 xlog("L_INFO","sip408: have alias - [$avp(s:alias)]\n");
>>>                 uac_replace_from("anonymous","sip:$avp(s:alias)@$si");
>>>           } else {
>>>                 xlog("L_INFO","sip411: no alias\n");
>>>           };
>>>         };
>>> ...
>>> }
>>>
>>> When I make a call from a phone to the PSTN phone, the caller drops
>>> the ring when the callee rings.  Callee hangs up and callee rings
>>> again few seconds after.  You can find an error message "SIP/2.0 481
>>> Call Leg/Transaction Does Not Exist" in line 180.  I wonder if there
>>> is any thing wrong with the above code or my concept is wrong.  Please
>>> help.  Below is the sip message.
>>> [...]
>>>
>>>       
>
>   




More information about the sr-users mailing list