Hi all

I've noticed that when I use the [routes] keyword in a request, but there is no 
route set (ie. the proxy did not record-route), then sipp inserts a blank line 
(CRLF) in the SIP header, when it should insert nothing at all.

For example, if I send this ACK after receiving the 200 OK with no Record-Route 
headers:

  <send>
    <![CDATA[

      ACK [next_url] SIP/2.0
      Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
      From: "[caller]" <sip:[EMAIL PROTECTED]:[local_port]>;tag=[call_number]
      To: "[callee]" <sip:[EMAIL PROTECTED]:[remote_port]>[peer_tag_param]
      Call-ID: [call_id]
      CSeq: [cseq] ACK
      [routes]
      Contact: sip:[EMAIL PROTECTED]:[local_port]
      Max-Forwards: 70
      Content-Length: [len]

    ]]>
  </send>

... then the packet that actually gets transmitted looks like this:

ACK sip:192.168.0.19:5070;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.0.19:5050;branch=z9hG4bK-1-3-15130
From: sipp <tel:2080001000>;tag=1
To: sut <tel:2080001010>;tag=1
Call-ID: [EMAIL PROTECTED]
CSeq: 1 ACK

Contact: sip:[EMAIL PROTECTED]:5050
Max-Forwards: 70
Content-Length: 0

The blank line looks like the end of header at the receiver, so the message is 
truncated.

I've attached a patch I made to call.cpp in the sipp.2007-03-14 snapshot. If 
there is no route set then no blank line is inserted. Perhaps this will be of 
use to someone.

Cheers
Ben
-- 
Ben Evans / Software Engineer / Open Cloud / [EMAIL PROTECTED]
Tel: +6421636182 / PO Box 19210, Wellington, NZ / www.opencloud.com
--- call.cpp	2007-03-15 05:58:43.000000000 +1300
+++ call.cpp	2007-03-27 10:05:35.000000000 +1200
@@ -2150,6 +2150,11 @@
             if (dialog_route_set) {
                 dest += sprintf(dest, "Route: %s", dialog_route_set);
             }
+            else {
+                // Skip to end of line
+                while((*src) && (*src != '\n')) src++;
+                if (*src == '\n') src++;
+            }            
 #ifdef _USE_OPENSSL
         } else if(strstr(keyword, "authentication")) {
             /* This keyword is substituted below */
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Sipp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sipp-users

Reply via email to