Hi everyone,

Small problem here. When SIPP generates a call and the SIP server responds with 
>=400, SIPP sends a malformed ACK. Example (irrelevant message parts are 
omitted):



2014-05-07      11:43:12.287177 1399448592.287177 Unexpected UDP message 
received (index 2, hash 1156682133):

SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 127.0.0.1:5060;branch=z9hG4bK-60909-1-0;received=10.15.119.54
From: sip:00000@127.0.0.1:5060;tag=60909SIPpTag001
To: sip:1234567@10.0.0.1:5060;tag=6052F3B0-90E


2014-05-07      11:43:12.287185 1399448592.287185 Aborting call 
1-60909@127.0.0.1 (index 2).
2014-05-07      11:43:12.287220 1399448592.287220 Sending UDP message for call 
1-60909@127.0.0.1 (index -1, hash 3706695911):
ACK  SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:5060;branch=z9hG4bK-60909-1-0;received=10.15.119.54
From: sip:00000@127.0.0.1:5060;tag=60909SIPpTag001
To: sip:1234567@10.0.0.1:5060;tag=6052F3B0-90E





The problem is that the request URI in ACK is empty (two spaces following each 
other, should be "ACK sip:1234567@10.0.0.1:5060 SIP/2.0"), and the SIP server 
doesn't recognize the message continuing to hold the call and resend the error 
message until the timeout expires.




Here's the code generating the ACK (call.cpp):

            if((src_recv) && (get_reply_code(src_recv) >= 400)) {
                sendBuffer(createSendingMessage(get_default_message("ack"), 
-2));
            }




SIPP tries to get the URI for the ACK from the "To:" field of the last message:


char * call::get_last_request_uri ()
{
...
    tmp = strchr(last_To, '<');
    if (!tmp) {
        return strdup("");
    }
    tmp++;

    tmp2 = strchr(last_To, '>');
    if (!tmp2) {
        return strdup("");
    }

However, there are no angular brackets in this example, so the function returns 
an empty value. According to RFC 2822 (relevant to SIP), "There is also an 
alternate simple form of a mailbox where the addr-spec address appears alone, 
without the recipient's name or the angle brackets", so this has to be 
accounted for.


I'm not a programmer. I've implemented an extremely dirty fix that looks for " 
" and ";" in case "<" and ">" were not found in the "To" field. Please 
implement something neater to resolve the issue.




Regards,
Dmitriy
------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
&#149; 3 signs your SCM is hindering your productivity
&#149; Requirements for releasing software faster
&#149; Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
Sipp-users mailing list
Sipp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sipp-users

Reply via email to