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.
interface: any filter: (ip) and ( port 5060 ) # U 10.0.0.46:5060 -> 10.0.0.27:5060 INVITE sip:34163634@10.0.0.27 SIP/2.0. Via: SIP/2.0/UDP 10.0.0.46:5060;branch=z9hG4bKeKunMgjqbhggzOxi. Max-Forwards: 70. User-Agent: Koncept KE10XX v4.32.05 00-09-45-0a-fc-2d. From: "9000" sip:9000@10.0.0.27;tag=l7473818dCOs9ZMG. To: "34163634" sip:34163634@10.0.0.27. Call-ID: wVhSdbheOYfdmQmf@10.0.0.46. Contact: sip:9000@10.0.0.46:5060. CSeq: 1 INVITE. Supported: 100rel, replaces. Content-Type: application/sdp. Content-Length: 286. . v=0. o=9000 58685689 12166570 IN IP4 10.0.0.46. s=SIP CALL. c=IN IP4 10.0.0.46. t=0 0. m=audio 6000 RTP/AVP 18 3 0 8 4 101. a=rtpmap:18 G729/8000. a=rtpmap:3 GSM/8000. a=rtpmap:0 PCMU/8000. a=rtpmap:8 PCMA/8000. a=rtpmap:4 G723/8000. a=rtpmap:101 telephone-event/8000. a=fmtp:101 0-15.
# U 10.0.0.27:5060 -> 10.0.0.46:5060 SIP/2.0 100 trying -- your call is important to us. Via: SIP/2.0/UDP 10.0.0.46:5060;branch=z9hG4bKeKunMgjqbhggzOxi;rport=5060. From: "9000" sip:9000@10.0.0.27;tag=l7473818dCOs9ZMG. To: "34163634" sip:34163634@10.0.0.27. Call-ID: wVhSdbheOYfdmQmf@10.0.0.46. CSeq: 1 INVITE. Server: OpenSer (1.0.0 (i386/linux)). Content-Length: 0. Warning: 392 10.0.0.27:5060 "Noisy feedback tells: pid=3353 req_src_ip=10.0.0.46 req_src_port=5060 in_uri=sip:34163634@10.0.0.27 out_uri=sip:934163634@10.30.0.248 via_cnt==1". .
# U 10.0.0.27:5060 -> 10.30.0.248:5060 INVITE sip:934163634@10.30.0.248 SIP/2.0. Record-Route: sip:34163634@10.0.0.27:5060;nat=yes;ftag=l7473818dCOs9ZMG;lr=on. Via: SIP/2.0/UDP 10.0.0.27;branch=z9hG4bK0d2f.18572a04.0. Via: SIP/2.0/UDP 10.0.0.46:5060;rport=5060;branch=z9hG4bKeKunMgjqbhggzOxi. Max-Forwards: 69. User-Agent: Koncept KE10XX v4.32.05 00-09-45-0a-fc-2d. From: "anonymous"sip:36418473@10.0.0.46;tag=l7473818dCOs9ZMG. To: "34163634" sip:34163634@10.0.0.27. Call-ID: wVhSdbheOYfdmQmf@10.0.0.46. Contact: sip:9000@10.0.0.46:5060. CSeq: 1 INVITE. Supported: 100rel, replaces. Content-Type: application/sdp. Content-Length: 287. . v=0. o=9000 58685689 12166570 IN IP4 10.0.0.46. s=SIP CALL. c=IN IP4 10.0.0.27. t=0 0. m=audio 35540 RTP/AVP 18 3 0 8 4 101. a=rtpmap:18 G729/8000. a=rtpmap:3 GSM/8000. a=rtpmap:0 PCMU/8000. a=rtpmap:8 PCMA/8000. a=rtpmap:4 G723/8000. a=rtpmap:101 telephone-event/8000. a=fmtp:101 0-15.
# U 10.30.0.248:5060 -> 10.0.0.27:5060 SIP/2.0 100 Trying. Via: SIP/2.0/UDP 10.0.0.27;branch=z9hG4bK0d2f.18572a04.0,SIP/2.0/UDP 10.0.0.46:5060;rport=5060;branch=z9hG4bKeKunMgjqbhggzOxi. From: "anonymous"sip:36418473@10.0.0.46;tag=l7473818dCOs9ZMG. To: "34163634" sip:34163634@10.0.0.27;tag=1EBAD768-B8F. Date: Wed, 04 Jan 2006 09:15:35 GMT. Call-ID: wVhSdbheOYfdmQmf@10.0.0.46. Server: Cisco-SIPGateway/IOS-12.x. CSeq: 1 INVITE. Allow-Events: telephone-event. Content-Length: 0. .
# U 10.30.0.248:5060 -> 10.0.0.27:5060 SIP/2.0 183 Session Progress. Via: SIP/2.0/UDP 10.0.0.27;branch=z9hG4bK0d2f.18572a04.0,SIP/2.0/UDP 10.0.0.46:5060;rport=5060;branch=z9hG4bKeKunMgjqbhggzOxi. From: "anonymous"sip:36418473@10.0.0.46;tag=l7473818dCOs9ZMG. To: "34163634" sip:34163634@10.0.0.27;tag=1EBAD768-B8F. Date: Wed, 04 Jan 2006 09:15:35 GMT. Call-ID: wVhSdbheOYfdmQmf@10.0.0.46. Server: Cisco-SIPGateway/IOS-12.x. CSeq: 1 INVITE. Require: 100rel. RSeq: 1250. Allow-Events: telephone-event. Contact: sip:934163634@10.30.0.248:5060. Record-Route: sip:34163634@10.0.0.27:5060;nat=yes;ftag=l7473818dCOs9ZMG;lr=on. Content-Type: application/sdp. Content-Disposition: session;handling=required. Content-Length: 177. . v=0. o=CiscoSystemsSIP-GW-UserAgent 584 9780 IN IP4 10.30.0.248. s=SIP Call. c=IN IP4 10.30.0.248. t=0 0. m=audio 17340 RTP/AVP 18. a=rtpmap:18 G729/8000. a=fmtp:18 annexb=yes.
# U 10.0.0.27:5060 -> 10.0.0.46:5060 SIP/2.0 183 Session Progress. Via: SIP/2.0/UDP 10.0.0.46:5060;rport=5060;branch=z9hG4bKeKunMgjqbhggzOxi. From: "9000" sip:9000@10.0.0.27;tag=l7473818dCOs9ZMG. To: "34163634" sip:34163634@10.0.0.27;tag=1EBAD768-B8F. Date: Wed, 04 Jan 2006 09:15:35 GMT. Call-ID: wVhSdbheOYfdmQmf@10.0.0.46. Server: Cisco-SIPGateway/IOS-12.x. CSeq: 1 INVITE. Require: 100rel. RSeq: 1250. Allow-Events: telephone-event. Contact: sip:934163634@10.30.0.248:5060. Record-Route: sip:34163634@10.0.0.27:5060;nat=yes;ftag=l7473818dCOs9ZMG;lr=on. Content-Type: application/sdp. Content-Disposition: session;handling=required. Content-Length: 175. . v=0. o=CiscoSystemsSIP-GW-UserAgent 584 9780 IN IP4 10.30.0.248. s=SIP Call. c=IN IP4 10.0.0.27. t=0 0. m=audio 35540 RTP/AVP 18. a=rtpmap:18 G729/8000. a=fmtp:18 annexb=yes.
# U 10.0.0.46:5060 -> 10.0.0.27:5060 PRACK sip:934163634@10.30.0.248:5060 SIP/2.0. Via: SIP/2.0/UDP 10.0.0.46:5060;branch=z9hG4bK8UeWxCfGrMJSO66f. Route: sip:34163634@10.0.0.27:5060;nat=yes;ftag=l7473818dCOs9ZMG;lr=on. Max-Forwards: 70. User-Agent: Koncept KE10XX v4.32.05 00-09-45-0a-fc-2d. From: "9000" sip:9000@10.0.0.27;tag=l7473818dCOs9ZMG. To: "34163634" sip:34163634@10.0.0.27;tag=1EBAD768-B8F. Call-ID: wVhSdbheOYfdmQmf@10.0.0.46. Contact: sip:9000@10.0.0.46:5060. CSeq: 2 PRACK. RAck: 1250 1 INVITE. Content-Length: 0. .
# U 10.0.0.27:5060 -> 10.30.0.248:5060 PRACK sip:934163634@10.30.0.248:5060 SIP/2.0. Record-Route: sip:10.0.0.27;ftag=l7473818dCOs9ZMG;lr=on. Via: SIP/2.0/UDP 10.0.0.27;branch=z9hG4bKdc2f.dbee15d1.0. Via: SIP/2.0/UDP 10.0.0.46:5060;branch=z9hG4bK8UeWxCfGrMJSO66f. Max-Forwards: 69. User-Agent: Koncept KE10XX v4.32.05 00-09-45-0a-fc-2d. From: "9000" sip:9000@10.0.0.27;tag=l7473818dCOs9ZMG. To: "34163634" sip:34163634@10.0.0.27;tag=1EBAD768-B8F. Call-ID: wVhSdbheOYfdmQmf@10.0.0.46. Contact: sip:9000@10.0.0.46:5060. CSeq: 2 PRACK. RAck: 1250 1 INVITE. Content-Length: 0. .
#----------------------------------line 180 -------------------------- U 10.30.0.248:5060 -> 10.0.0.27:5060 SIP/2.0 481 Call Leg/Transaction Does Not Exist. Via: SIP/2.0/UDP 10.0.0.27;branch=z9hG4bKdc2f.dbee15d1.0,SIP/2.0/UDP 10.0.0.46:5060;branch=z9hG4bK8UeWxCfGrMJSO66f. From: "9000" sip:9000@10.0.0.27;tag=l7473818dCOs9ZMG. To: "34163634" sip:34163634@10.0.0.27;tag=1EBAD768-B8F. Call-ID: wVhSdbheOYfdmQmf@10.0.0.46. CSeq: 2 PRACK. Content-Length: 0. .
# U 10.0.0.27:5060 -> 10.0.0.46:5060 SIP/2.0 481 Call Leg/Transaction Does Not Exist. Via: SIP/2.0/UDP 10.0.0.46:5060;branch=z9hG4bK8UeWxCfGrMJSO66f. From: "9000" sip:9000@10.0.0.27;tag=l7473818dCOs9ZMG. To: "34163634" sip:34163634@10.0.0.27;tag=1EBAD768-B8F. Call-ID: wVhSdbheOYfdmQmf@10.0.0.46. CSeq: 2 PRACK. Content-Length: 0. .
# U 10.30.0.248:5060 -> 10.0.0.27:5060 SIP/2.0 183 Session Progress. Via: SIP/2.0/UDP 10.0.0.27;branch=z9hG4bK0d2f.18572a04.0,SIP/2.0/UDP 10.0.0.46:5060;rport=5060;branch=z9hG4bKeKunMgjqbhggzOxi. From: "anonymous"sip:36418473@10.0.0.46;tag=l7473818dCOs9ZMG. To: "34163634" sip:34163634@10.0.0.27;tag=1EBAD768-B8F. Date: Wed, 04 Jan 2006 09:15:35 GMT. Call-ID: wVhSdbheOYfdmQmf@10.0.0.46. Server: Cisco-SIPGateway/IOS-12.x. CSeq: 1 INVITE. Require: 100rel. RSeq: 1250. Allow-Events: telephone-event. Contact: sip:934163634@10.30.0.248:5060. Record-Route: sip:34163634@10.0.0.27:5060;nat=yes;ftag=l7473818dCOs9ZMG;lr=on. Content-Type: application/sdp. Content-Disposition: session;handling=required. Content-Length: 177. . v=0. o=CiscoSystemsSIP-GW-UserAgent 584 9780 IN IP4 10.30.0.248. s=SIP Call. c=IN IP4 10.30.0.248. t=0 0. m=audio 17340 RTP/AVP 18. a=rtpmap:18 G729/8000. a=fmtp:18 annexb=yes.
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. [...]
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@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. [...]
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@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. [...]
Hi Daniel,
Below is the network trace http://meerkat.no-ip.com/openser/dnis.log As you can see, line 123 is a PRACK method but with the wrong From header. Then error 481, line 140 will occur. I found that uac_replace_from("username","uri") can't replace in the method PRACK. As I don't know whether there is a mistake in my configuration file. Here is the configuration file. http://meerkat.no-ip.com/openser/openser.cfg In line 105-107 and route 7, you can find the uac_replace_from function. From the some messages in the forum, uac_replace_from("username","uri") must be called where here is no totag(), line 105. I am not sure whether it is the case cause the problem.
On 1/6/06, Daniel-Constantin Mierla daniel@voice-system.ro wrote:
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
Hi,
when changing the FROM header in the initial request, you need to accordingly change it in all sequential requests. To do so, the easiest way is to switch to the auto mode (as Daniel suggested): modparam("uac","from_restore_mode","auto") and change the from only in initial INVITEs.
regards, Bogdan
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@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. [...]
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users