Hi,
I found a bug when using sipp with uac_pcap scenario. Version 3.1
When sipp starts to send RTP-Traffic to my asterisk server, Wireshark
shows an ICMP-DESTINATION-UNREACHABLE message from my asterisk.
sipp -sn uac_pcap -i 192.168.1.1 -mi 192.168.1.1 -l 20 -mp 5606 -s 500
extension 500 is musiconhold on asterisk
I checked and found that the "Destination Port Number" for the
RTP-Traffic is wrong. In the SessionDescriptionProtocol asterisk says it
uses Port 11994 and sipp send its RTP-Traffic to Port 1199 => The length
of the port number is wrong.
I changed in call.cpp the following line and it works.
strncpy(number, begin, sizeof(number) -1 );
to
strncpy(number, begin, sizeof(number));
here the complete function:
/*
* Look for "m=audio " or "m=video " pattern in the message and extract the
* following value which should be port number
*/
#define PAT_AUDIO 1
#define PAT_VIDEO 2
uint16_t get_remote_port_media(char *msg, int pattype)
{
char *pattern;
char *begin, *end;
char number[6];
if (pattype == PAT_AUDIO) {
pattern = "m=audio ";
} else if (pattype == PAT_VIDEO) {
pattern = "m=video ";
} else {
ERROR("Internal error: Undefined media pattern %d\n", 3);
}
begin = strstr(msg, pattern);
if (!begin) {
/* m=audio not found */
return 0;
}
begin += strlen(pattern) - 1;
end = strstr(begin, "\r\n");
if (!end)
ERROR("get_remote_port_media: no CRLF found");
memset(number, 0, sizeof(number));
strncpy(number, begin, sizeof(number) );
return atoi(number);
}
Best regards,
Dom
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Sipp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sipp-users