I found that when using the pcapplay to send a ulaw stream that if my asterisk server told it to send media to 13134, sipp was sending media to 1313.
Looking at the source, it looks like the pointer math is just off in get_remote_port_media() in call.cpp.
--- sipp.svn/call.cpp 2008-04-09 10:50:37.000000000 -0400
+++ sipp.svn.patched/call.cpp 2008-04-29 12:52:20.000000000 -0400
@@ -192,7 +192,7 @@
/* m=audio not found */
- begin += strlen(pattern) - 1;
+ begin += strlen(pattern);
end = strstr(begin, "\r\n");
ERROR("get_remote_port_media: no CRLF found");
if you leave the -1 in there begin ends up pointing at the blank space after the pattern, so for m=audio 13134 it is pointing at the space between the o and 1, and your strncpy will grab 5 characters starting with the blank space omitting the 4.