Forum Discussion

satish_txt_2254's avatar
May 22, 2017

SIP Record-Route in loop for some packets

I am noticing some of SIP packet getting in strange

Record-Route
loop and same thing happening with
Via:
header also its getting in loop. I have SIP Record-Route enabled in SIP profile.

71.41.196.202 - Self IP 71.41.196.180 - Virtual Server (f5)

61.91.253.99 - SIP Proxy server

U 71.41.196.202:13703 -> 61.91.253.99:5060
INVITE sip:confctl-2@71.41.196.180:5060 SIP/2.0.
Record-Route: .
Record-Route: .
Record-Route: .
Record-Route: .
Record-Route: .
Record-Route: .
Record-Route: .
Record-Route: .
Record-Route: .
Record-Route: .
Record-Route: .
Record-Route: .
Record-Route: .
Record-Route: .
Record-Route: .
Record-Route: .
Record-Route: .
Record-Route: .
Record-Route: .
Record-Route: .
Record-Route: .
Record-Route: .
Record-Route: .
Record-Route: .
Record-Route: 


3 Replies

  • I have notice F5 doing this loop don't know why, if i replace F5 with SIP dispatcher everything works fine.

     

  • Note the absence of the protocol and port field in "Record-Route: ". In the absence of the protocol and port field it's assumed this will be UDP on default SIP port.

    If you are running in TCP mode then this will result in failure for any messages which will rely routing on the route as defined by "Record-Route". This is a known defect and a bug ID has been filed to ensure the correct transport and port fields are added based on the transport protocol and port used.

    You can workaround the issue by using an iRule like in the example below.

    when RULE_INIT {

    • "e.f.g.h" is the IP address of the inbound virtual server.
    • "a.b.c.d" is the IP address of the outbound virtual server if a specific IP address is used instead of 0.0.0.0 or inbound SNAT IP address when outbound vip is 0.0.0.0.
    • static::sipPortIn is the SIP port for the inbound virtual server port.
    • static::sipPortOu is the SIP port for outbound virtual server where a specific IP address has been used for the outbound virtual else use same port as vip port.
    • "transportUsed" could be "tcp", "udp" or "sctp". Note that by default without transport parameter it defaults to "udp" as such current default behaviour works for UDP.

      set static::sipVipIP "e.f.g.h" set static::sipSNAT "a.b.c.d" set static::sipPortIn "wxzy" set static::sipPortOu "mnop" set static::transport "transportUsed"

      }

      when SIP_REQUEST_SEND {

      `if { [IP::local_addr] eq $static::sipSNAT }{
          set newRecordRoute ""
          SIP::header remove "Record-Route" 0
          SIP::header insert Record-Route $newRecordRoute
      log local0.debug "Server side new record route: [SIP::header value "Record-Route" 0]"
      
      
      }
      elseif { [IP::local_addr] eq $static::sipVipIP }{
      set newRecordRoute ""
      SIP::header remove "Record-Route" 0
      SIP::header insert Record-Route $newRecordRoute
      
      log local0.debug "Public side new record route: [SIP::header value "Record-Route" 0]"
      
      
      }
      

    }