[Serusers] Ser routing problems

Andrei Pelinescu-Onciul pelinescu-onciul at fokus.fraunhofer.de
Fri Oct 1 21:26:49 CEST 2004


On Oct 01, 2004 at 15:31, michael at fingerprint.de <michael at fingerprint.de> wrote:
> I have a routing problem which I cant explain.
> 
> A UA communicates with a Sip-Server over ser as a proxy. As the Sip-Server
> only supports TCP connection the t_relay_to_tcp function is used. And as
> the Sip-Server doesn't register to the Ser proxy a routeing for that
> destination (sip server) is done by hand. See ser.cfg and Sip messages
> below. 
> 
> Everything seems to work just find except the BYE Message form the Sip
> Server via the proxy to the UA. Ser sends the received BYE to himself
> (Message 8) and then back to the Sip Server (Message 9).
> 
> listening points:
> UA:        192.168.0.5:5555
> ser:       192.168.0.5:5060
> sipserver: 192.168.0.5:5080
> 
> Any suggestions?
> 
> 
Do you have an "alias=192.168.0.5" in your ser.cfg?
If so remove it and try again
[ - you don't need to alias your own ip
  - in 0.8.14 an alias will match all the ports
  => it will match 192.168.0.5:5555 and ser will get confused thinking
  the message is for itself and a strict router was in the path. When it
  will try to recover from the strict router it will mess things up.  ]


BTW: the ACK from UA to ser (message 5) is missing a route.

Andrei


> 
> ser.cfg
> 
> route{
>         # initial sanity checks -- messages with
>         # max_forwards==0, or excessively long requests
>         if (!mf_process_maxfwd_header("10")) {
>                 sl_send_reply("483","Too Many Hops");
>                 break;
>         };
>         if ( msg:len > max_len ) {
>                 sl_send_reply("513", "Message too big");
>                 break;
>         };
> 
>         # we record-route all messages -- to make sure that
>         # subsequent messages will go through our proxy; that's
>         # particularly good if upstream and downstream entities
>         # use different transport protocol
>         if (method=="INVITE") record_route();
> 
>         # loose-route processing
>         if (loose_route()) {
>                 t_relay();
>                 break;
>         };
> 
> 
>         # dest SipAS? then relay via tcp without lookup
>         if(uri=~"sip:sipas at 192.168.0.5" || uri=~"sip:192.168.0.5:5080") {
>                         if (!t_relay_to_tcp("192.168.0.5","5080")) {
>                                 sl_reply_error();
>                                 break;
>                         };
>                         break;
>         };
> 
>         # if the request is for other domain use UsrLoc
>         # (in case, it does not work, use the following command
>         # with proper names and addresses in it)
>         if (uri==myself) {
> 
>                 if (method=="REGISTER") {
>                         log("saving location \n");
>                         save("location");
>                         break;
>                 };
> 
>                 # native SIP destinations are handled using our USRLOC DB
>                 if (!lookup("location")) {
>                         sl_send_reply("404", "Not Found");
>                         log("not in locDB\n");
>                         break;
>                 };
>         };
> 
>         if (!t_relay()) {
>                 sl_reply_error();
>                 break;
>         };
> 
> }
> 
> 
> 
> 
> 
> 
> 
> ###########################################################################
> Call flow:
> 
> 1. ==== UA sends to ser
> INVITE sip:sipas at 192.168.0.5 SIP/2.0
> Call-ID: f978201facd1ba9e7345af63683f96a1 at 192.168.0.5
> CSeq: 1 INVITE
> From: "user" <sip:user at 192.168.0.5:5555;transport=udp>;tag=25591289
> To: <sip:sipas at 192.168.0.5>
> Via: SIP/2.0/UDP
> 192.168.0.5:5555;branch=z9hG4bK98fa6f82a8447d74fe9a04da3d9dd0a1
> Max-Forwards: 70
> Contact: "user" <sip:192.168.0.5:5555;transport=udp>
> Content-Type: application/sdp
> Content-Length: 154
> 
> (sdp not shown)
> ---------------------------------------------
> 
> 2. ==== ser to Sip Server
> INVITE sip:sipas at 192.168.0.5 SIP/2.0
> Record-Route:
> <sip:sipas at 192.168.0.5;transport=tcp;r2=on;ftag=25591289;lr=on>
> Record-Route: <sip:sipas at 192.168.0.5;r2=on;ftag=25591289;lr=on>
> Call-ID: f978201facd1ba9e7345af63683f96a1 at 192.168.0.5
> CSeq: 1 INVITE
> From: "user" <sip:user at 192.168.0.5:5555;transport=udp>;tag=25591289
> To: <sip:sipas at 192.168.0.5>
> Via: SIP/2.0/TCP 192.168.0.5;branch=z9hG4bK6446.87704592.0
> Via: SIP/2.0/UDP
> 192.168.0.5:5555;branch=z9hG4bK98fa6f82a8447d74fe9a04da3d9dd0a1
> Max-Forwards: 69
> Contact: "user" <sip:192.168.0.5:5555;transport=udp>
> Content-Type: application/sdp
> Content-Length: 154
> 
> sdp not shown
> ---------------------------------------------
> 
> 3. ==== Sip Server to ser
> SIP/2.0 200 OK
> Via: SIP/2.0/TCP 192.168.0.5;branch=z9hG4bK6446.87704592.0
> Via: SIP/2.0/UDP
> 192.168.0.5:5555;branch=z9hG4bK98fa6f82a8447d74fe9a04da3d9dd0a1
> Record-Route:
> <sip:sipas at 192.168.0.5;ftag=25591289;r2=on;lr=on;transport=tcp>
> Record-Route: <sip:sipas at 192.168.0.5;ftag=25591289;r2=on;lr=on>
> From: user <sip:user at 192.168.0.5:5555;transport=udp>;tag=25591289
> To: <sip:sipas at 192.168.0.5>;tag=swwmb9
> Call-ID: f978201facd1ba9e7345af63683f96a1 at 192.168.0.5
> CSeq: 1 INVITE
> Contact: <sip:192.168.0.5:5080;transport=tcp>
> Content-Length: 163
> Content-Type: application/sdp
> 
> sdp not shown
> 
> ---------------------------------------------
> 
> 4. ==== ser to UA
> SIP/2.0 200 OK
> Via: SIP/2.0/UDP
> 192.168.0.5:5555;branch=z9hG4bK98fa6f82a8447d74fe9a04da3d9dd0a1
> Record-Route:
> <sip:sipas at 192.168.0.5;ftag=25591289;r2=on;lr=on;transport=tcp>
> Record-Route: <sip:sipas at 192.168.0.5;ftag=25591289;r2=on;lr=on>
> From: user <sip:user at 192.168.0.5:5555;transport=udp>;tag=25591289
> To: <sip:sipas at 192.168.0.5>;tag=swwmb9
> Call-ID: f978201facd1ba9e7345af63683f96a1 at 192.168.0.5
> CSeq: 1 INVITE
> Contact: <sip:192.168.0.5:5080;transport=tcp>
> Content-Length: 163
> Content-Type: application/sdp
> 
> sdpnot shown
> ---------------------------------------------
> 
> 5. ==== UA to ser
> ACK sip:192.168.0.5:5080;transport=udp SIP/2.0
> Call-ID: f978201facd1ba9e7345af63683f96a1 at 192.168.0.5
> CSeq: 1 ACK
> From: "user" <sip:user at 192.168.0.5:5555;transport=udp>;tag=25591289
> To: <sip:sipas at 192.168.0.5>;tag=swwmb9
> Via: SIP/2.0/UDP 192.168.0.5:5555;branch=3139322e3136382e302e353a3535353
> Max-Forwards: 70
> Route: <sip:sipas at 192.168.0.5;ftag=25591289;r2=on;lr=on>
> Content-Length: 0
> 
> ---------------------------------------------
> 6. ==== ser to Sip Server
> ACK sip:192.168.0.5:5080;transport=udp SIP/2.0
> Call-ID: f978201facd1ba9e7345af63683f96a1 at 192.168.0.5
> CSeq: 1 ACK
> From: "user" <sip:user at 192.168.0.5:5555;transport=udp>;tag=25591289
> To: <sip:sipas at 192.168.0.5>;tag=swwmb9
> Via: SIP/2.0/TCP 192.168.0.5;branch=0
> Via: SIP/2.0/UDP 192.168.0.5:5555;branch=3139322e3136382e302e353a3535353
> Max-Forwards: 69
> Content-Length: 0
> 
> ---------------------------------------------
> 7. ==== Sip Server to ser
> BYE sip:user at 192.168.0.5:5555;transport=udp SIP/2.0
> Via: SIP/2.0/TCP 192.168.0.5:5080;branch=z9hG4bKf7kfy5
> Route: <sip:sipas at 192.168.0.5;ftag=25591289;r2=on;lr=on;transport=tcp>
> Route: <sip:sipas at 192.168.0.5;ftag=25591289;r2=on;lr=on>
> Max-Forwards: 70
> From: <sip:sipas at 192.168.0.5>;tag=swwmb9
> To: user <sip:user at 192.168.0.5:5555;transport=udp>;tag=25591289
> Call-ID: f978201facd1ba9e7345af63683f96a1 at 192.168.0.5
> CSeq: 1 BYE
> Content-Length: 0
> 
> ---------------------------------------------
> 
> 8. ==== ser to ser!
> BYE sip:sipas at 192.168.0.5;ftag=25591289;r2=on;lr=on SIP/2.0
> Via: SIP/2.0/UDP 192.168.0.5;branch=z9hG4bK6446.97704592.0;i=2
> Via: SIP/2.0/TCP 192.168.0.5:5080;branch=z9hG4bKf7kfy5
> Max-Forwards: 69
> From: <sip:sipas at 192.168.0.5>;tag=swwmb9
> To: user <sip:user at 192.168.0.5:5555;transport=udp>;tag=25591289
> Call-ID: f978201facd1ba9e7345af63683f96a1 at 192.168.0.5
> CSeq: 1 BYE
> Content-Length: 0
> 
> 
> ---------------------------------------------
> 9. ==== ser to Sip Server! (and not to UA)
> BYE sip:sipas at 192.168.0.5;ftag=25591289;r2=on;lr=on SIP/2.0
> Via: SIP/2.0/TCP 192.168.0.5;branch=z9hG4bK6446.a7704592.0
> Via: SIP/2.0/UDP 192.168.0.5;branch=z9hG4bK6446.97704592.0;i=2
> Via: SIP/2.0/TCP 192.168.0.5:5080;branch=z9hG4bKf7kfy5
> Max-Forwards: 68
> From: <sip:sipas at 192.168.0.5>;tag=swwmb9
> To: user <sip:user at 192.168.0.5:5555;transport=udp>;tag=25591289
> Call-ID: f978201facd1ba9e7345af63683f96a1 at 192.168.0.5
> CSeq: 1 BYE
> Content-Length: 0
> 
> ---------------------------------------------
> 10. ==== ser to Sip Server!
> BYE sip:sipas at 192.168.0.5;ftag=25591289;r2=on;lr=on SIP/2.0
> Via: SIP/2.0/UDP 192.168.0.5;branch=z9hG4bK6446.97704592.0;i=2
> Via: SIP/2.0/TCP 192.168.0.5:5080;branch=z9hG4bKf7kfy5
> Max-Forwards: 69
> From: <sip:sipas at 192.168.0.5>;tag=swwmb9
> To: user <sip:user at 192.168.0.5:5555;transport=udp>;tag=25591289
> Call-ID: f978201facd1ba9e7345af63683f96a1 at 192.168.0.5
> CSeq: 1 BYE
> Content-Length: 0
> 
> and so on.....
> 
> _______________________________________________
> Serusers mailing list
> serusers at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers




More information about the sr-users mailing list