Hi all,
I am trying to create a very simple test case which answers a call.  However, I 
cannot get the remote side (which initiated the call) to move out of a 
'ringing' state.  Looking in the Sipx log I am repeatedly getting the message,

" 
"2009-02-15T18:51:32.450000Z":343:SIP:DEBUG:DAN:SipUserAgent-3:000004FC:sipXtapi:"SipUDPServerBase::send
 0B66DCD0 isInUseForWrite 16, client info\n        remote host: :0\n          
remote IP: 0.0.0.0:0\n   remote Via address: :-1\n            received address: 
:-1"
"2009-02-15T18:51:32.451000Z":344:OUTGOING:INFO:DAN:SipUserAgent-3:000004FC:sipXtapi:"SipUserAgent::sendUdp
 resend 1 of UDP message\nUDP SIP User Agent sent message:\n----Remote 
Host:10.0.0.10---- Port: 5060----\nSIP/2.0 200 OK\r\nFrom: 
<sip:sof...@dan>;tag=Dialogic_2398387624-3016932\r\nTo: 
sip:1...@127.0.0.1;tag=20966\r\nCall-Id: 8ef47da8-2c08e...@10.0.0.10\r\ncseq: 1 
INVITE\r\nContact: <sip:1...@192.168.4.4:5080>\r\nVia: SIP/2.0/UDP 
10.0.0.10:5060;rport=5060;branch=z9hG4bK2398387624-2951396\r\nDate: Sun, 15 Feb 
2009 18:51:31 GMT\r\nAllow: INVITE, ACK, CANCEL, BYE, REFER, OPTIONS, PING, 
INFO, REGISTER, SUBSCRIBE, NOTIFY\r\nUser-Agent: sipX/1.3.0 
(WinNT)\r\nSupported: replaces\r\nContent-Length: 
0\r\n\r\n--------------------END--------------------\n""

Obviously with incrementing " isInUseForWrite" numbers.

I think this might be part of the problem?

I have also attached an Ethereal UDP packet dump which shows a repeated attempt 
to send the same UDP packet.

I am wondering whether anyone has any glues as to why the UDP packet isn't 
being sent/received properly?

My call state handling code is very simple, shown below.  I am getting the 
CALLSTATE_CONNECTED connected event sent so I am assuming my code is near 
enough right?

            public void receivedCallStateInfo(final CallStateInfo 
callStateInfo) {
                System.out.println("SipXTest.receivedCallStateInfo():: got call 
state info event " + callStateInfo.getSipXCallStateEvent());

                byte[] lineUrl = new byte[1024];
                int result = SipXNativeLibrary.instance.sipxCallGetID(
                                callStateInfo.getSipXCallHandle(), lineUrl, 
1024) ;
                System.out.println("SipXTest.receivedCallStateInfo():: line 
url: " + new String(lineUrl));


                switch (callStateInfo.getSipXCallStateEvent()) {
                        case CALLSTATE_ALERTING:
                                byte[] remoteId = new byte[256];
                                SipXNativeLibrary.instance.sipxCallGetRemoteID(
                                                
callStateInfo.getSipXCallHandle(), remoteId, 256) ;
                                
System.out.println("SipXTest.receivedCallStateInfo():: " + new 
String(remoteId));
                                result = 
SipXNativeLibrary.instance.sipxCallStartTone(
                                                
callStateInfo.getSipXCallHandle(), SipXToneId.ID_TONE_RINGBACK.getSipXValue(), 
true, false) ;
                                
System.out.println("SipXTest.receivedCallStateInfo():: call alerting. ["  + 
SipXResult.valueOf(result) + "].");

                                result = 
SipXNativeLibrary.instance.sipxCallAnswer(callStateInfo.getSipXCallHandle(), 
false);
                                
System.out.println("SipXTest.receivedCallStateInfo():: call alerting. ["  + 
SipXResult.valueOf(result) + "].");

                                break;
                        case CALLSTATE_OFFERING:
                                remoteId = new byte[256];
                                SipXNativeLibrary.instance.sipxCallGetRemoteID(
                                                
callStateInfo.getSipXCallHandle(), remoteId, 256) ;
                                
System.out.println("SipXTest.receivedCallStateInfo():: " + new 
String(remoteId));

                                result = 
SipXNativeLibrary.instance.sipxCallAccept(
                                                
callStateInfo.getSipXCallHandle(), null, null, null, true);
                                
System.out.println("SipXTest.receivedCallStateInfo():: result:: " + 
SipXResult.valueOf(result));
                                break;
                        case CALLSTATE_CONNECTED:
                                remoteId = new byte[256];
                                SipXNativeLibrary.instance.sipxCallGetRemoteID(
                                                
callStateInfo.getSipXCallHandle(), remoteId, 256) ;
                                
System.out.println("SipXTest.receivedCallStateInfo():: " + new 
String(remoteId));
                                result = 
SipXNativeLibrary.instance.sipxCallStopTone(callStateInfo.getSipXCallHandle());
                              
System.out.println("SipXTest.receivedCallStateInfo():: call conected. ["  + 
SipXResult.valueOf(result) + "].");
                              break;
                }

        }

Thanks,
Daniel

Daniel Thornhill
ValidSoft Limited

64 Paul Street
London
EC2A 4NG

e: daniel.thornh...@validsoft.com<mailto:daniel.thornh...@validsoft.com>

url: www.validsoft.com<http://www.validsoft.com/>

ValidSoft Ltd is a Private Limited Company.
ValidSoft Ltd, Castle Buildings, Tara Street, Tullamore, Co Offaly, Ireland.
Registration Number: 377068
Registered in Dublin.

The information in this e-mail is confidential and may be legally privileged. 
It is intended solely for the addressee(s).
Access to this e-mail by anyone else is unauthorised.

If you are not the intended recipient, any disclosure, copying, distribution or 
any action taken or omitted to be taken in reliance on it, is prohibited and 
may be unlawful.

When addressed to our clients any opinions or advice contained in this e-mail 
are subject to the terms and conditions expressed in the governing ValidSoft 
client terms and conditions.


No.     Time        Source                Destination           Protocol Info
      1 0.000000    10.0.0.10             10.0.0.10             SIP/SDP  
Request: INVITE sip:1...@127.0.0.1:5080, with session description

Frame 1 (760 bytes on wire, 760 bytes captured)
Ethernet II, Src: 02:00:4c:4f:4f:50 (02:00:4c:4f:4f:50), Dst: 02:00:4c:4f:4f:50 
(02:00:4c:4f:4f:50)
Internet Protocol, Src: 10.0.0.10 (10.0.0.10), Dst: 10.0.0.10 (10.0.0.10)
User Datagram Protocol, Src Port: 5060 (5060), Dst Port: 5080 (5080)
    Source port: 5060 (5060)
    Destination port: 5080 (5080)
    Length: 726
    Checksum: 0xc50f [correct]
Session Initiation Protocol
    Request-Line: INVITE sip:1...@127.0.0.1:5080 SIP/2.0
    Message Header
        Via: SIP/2.0/UDP 10.0.0.10:5060;rport;branch=z9hG4bK2540918624-3148004
        Max-Forwards: 70
        Allow: SUBSCRIBE,NOTIFY,REFER,INVITE,ACK,OPTIONS,CANCEL,BYE
        Supported: timer,replaces,TIMER
        From: <sip:sof...@dan>;tag=Dialogic_2540918624-3213540
        To: sip:1...@127.0.0.1
        Call-ID: 97735760-2f08e4...@10.0.0.10
        CSeq: 1 INVITE
        Contact: <sip:sof...@10.0.0.10:5060>
        Content-Type: application/sdp
        Content-Length: 273
    Message body
        Session Description Protocol
            Session Description Protocol Version (v): 0
            Owner/Creator, Session Id (o): dialogic 256 2 IN IP4 10.0.0.10
            Session Name (s): SipSession with SoftIP
            Session Information (i): SoftIP
            URI of Description (u): http://www.dialogic.com
            Connection Information (c): IN IP4 10.0.0.10
            Time Description, active time (t): 0 0
            Media Description, name and address (m): audio 20030 RTP/AVP 8 0 101
            Media Attribute (a): rtpmap:8 PCMA/8000/1
            Media Attribute (a): rtpmap:0 PCMU/8000/1
            Media Attribute (a): rtpmap:101 telephone-event/8000
            Media Attribute (a): fmtp:101 0-15
            Media Attribute (a): sendrecv

No.     Time        Source                Destination           Protocol Info
      2 0.014040    10.0.0.10             10.0.0.10             SIP      
Status: 100 Trying

Frame 2 (323 bytes on wire, 323 bytes captured)
Ethernet II, Src: 02:00:4c:4f:4f:50 (02:00:4c:4f:4f:50), Dst: 02:00:4c:4f:4f:50 
(02:00:4c:4f:4f:50)
Internet Protocol, Src: 10.0.0.10 (10.0.0.10), Dst: 10.0.0.10 (10.0.0.10)
User Datagram Protocol, Src Port: 2480 (2480), Dst Port: 5060 (5060)
    Source port: 2480 (2480)
    Destination port: 5060 (5060)
    Length: 289
    Checksum: 0xa751 [correct]
Session Initiation Protocol
    Status-Line: SIP/2.0 100 Trying
    Message Header
        From: <sip:sof...@dan>;tag=Dialogic_2540918624-3213540
        To: sip:1...@127.0.0.1
        Call-Id: 97735760-2f08e4...@10.0.0.10
        Cseq: 1 INVITE
        Via: SIP/2.0/UDP 
10.0.0.10:5060;rport=5060;branch=z9hG4bK2540918624-3148004
        Contact: sip:192.168.4.4:5080
        Content-Length: 0

No.     Time        Source                Destination           Protocol Info
      3 0.230653    10.0.0.10             10.0.0.10             SIP      
Status: 183 Session Progress

Frame 3 (523 bytes on wire, 523 bytes captured)
Ethernet II, Src: 02:00:4c:4f:4f:50 (02:00:4c:4f:4f:50), Dst: 02:00:4c:4f:4f:50 
(02:00:4c:4f:4f:50)
Internet Protocol, Src: 10.0.0.10 (10.0.0.10), Dst: 10.0.0.10 (10.0.0.10)
User Datagram Protocol, Src Port: 2481 (2481), Dst Port: 5060 (5060)
    Source port: 2481 (2481)
    Destination port: 5060 (5060)
    Length: 489
    Checksum: 0x1998 [correct]
Session Initiation Protocol
    Status-Line: SIP/2.0 183 Session Progress
    Message Header
        From: <sip:sof...@dan>;tag=Dialogic_2540918624-3213540
        To: sip:1...@127.0.0.1;tag=23705
        Call-Id: 97735760-2f08e4...@10.0.0.10
        Cseq: 1 INVITE
        Via: SIP/2.0/UDP 
10.0.0.10:5060;rport=5060;branch=z9hG4bK2540918624-3148004
        Date: Sun, 15 Feb 2009 18:53:54 GMT
        Contact: sip:192.168.4.4:5080
        User-Agent: sipX/1.3.0 (WinNT)
        Allow: INVITE, ACK, CANCEL, BYE, REFER, OPTIONS, PING, INFO, REGISTER, 
SUBSCRIBE, NOTIFY
        Supported: replaces
        Content-Length: 0

No.     Time        Source                Destination           Protocol Info
      4 0.272004    10.0.0.10             10.0.0.10             SIP      
Status: 200 OK

Frame 4 (513 bytes on wire, 513 bytes captured)
Ethernet II, Src: 02:00:4c:4f:4f:50 (02:00:4c:4f:4f:50), Dst: 02:00:4c:4f:4f:50 
(02:00:4c:4f:4f:50)
Internet Protocol, Src: 10.0.0.10 (10.0.0.10), Dst: 10.0.0.10 (10.0.0.10)
User Datagram Protocol, Src Port: 2482 (2482), Dst Port: 5060 (5060)
    Source port: 2482 (2482)
    Destination port: 5060 (5060)
    Length: 479
    Checksum: 0x1a8d [correct]
Session Initiation Protocol
    Status-Line: SIP/2.0 200 OK
    Message Header
        From: <sip:sof...@dan>;tag=Dialogic_2540918624-3213540
        To: sip:1...@127.0.0.1;tag=23705
        Call-Id: 97735760-2f08e4...@10.0.0.10
        Cseq: 1 INVITE
        Contact: <sip:1...@192.168.4.4:5080>
        Via: SIP/2.0/UDP 
10.0.0.10:5060;rport=5060;branch=z9hG4bK2540918624-3148004
        Date: Sun, 15 Feb 2009 18:53:54 GMT
        Allow: INVITE, ACK, CANCEL, BYE, REFER, OPTIONS, PING, INFO, REGISTER, 
SUBSCRIBE, NOTIFY
        User-Agent: sipX/1.3.0 (WinNT)
        Supported: replaces
        Content-Length: 0

No.     Time        Source                Destination           Protocol Info
      5 0.777074    10.0.0.10             10.0.0.10             SIP      
Status: 200 OK

Frame 5 (513 bytes on wire, 513 bytes captured)
Ethernet II, Src: 02:00:4c:4f:4f:50 (02:00:4c:4f:4f:50), Dst: 02:00:4c:4f:4f:50 
(02:00:4c:4f:4f:50)
Internet Protocol, Src: 10.0.0.10 (10.0.0.10), Dst: 10.0.0.10 (10.0.0.10)
User Datagram Protocol, Src Port: 2483 (2483), Dst Port: 5060 (5060)
    Source port: 2483 (2483)
    Destination port: 5060 (5060)
    Length: 479
    Checksum: 0x1a8c [correct]
Session Initiation Protocol
    Status-Line: SIP/2.0 200 OK
    Message Header
        From: <sip:sof...@dan>;tag=Dialogic_2540918624-3213540
        To: sip:1...@127.0.0.1;tag=23705
        Call-Id: 97735760-2f08e4...@10.0.0.10
        Cseq: 1 INVITE
        Contact: <sip:1...@192.168.4.4:5080>
        Via: SIP/2.0/UDP 
10.0.0.10:5060;rport=5060;branch=z9hG4bK2540918624-3148004
        Date: Sun, 15 Feb 2009 18:53:54 GMT
        Allow: INVITE, ACK, CANCEL, BYE, REFER, OPTIONS, PING, INFO, REGISTER, 
SUBSCRIBE, NOTIFY
        User-Agent: sipX/1.3.0 (WinNT)
        Supported: replaces
        Content-Length: 0

No.     Time        Source                Destination           Protocol Info
      6 1.781003    10.0.0.10             10.0.0.10             SIP      
Status: 200 OK

Frame 6 (513 bytes on wire, 513 bytes captured)
Ethernet II, Src: 02:00:4c:4f:4f:50 (02:00:4c:4f:4f:50), Dst: 02:00:4c:4f:4f:50 
(02:00:4c:4f:4f:50)
Internet Protocol, Src: 10.0.0.10 (10.0.0.10), Dst: 10.0.0.10 (10.0.0.10)
User Datagram Protocol, Src Port: 2484 (2484), Dst Port: 5060 (5060)
    Source port: 2484 (2484)
    Destination port: 5060 (5060)
    Length: 479
    Checksum: 0x1a8b [correct]
Session Initiation Protocol
    Status-Line: SIP/2.0 200 OK
    Message Header
        From: <sip:sof...@dan>;tag=Dialogic_2540918624-3213540
        To: sip:1...@127.0.0.1;tag=23705
        Call-Id: 97735760-2f08e4...@10.0.0.10
        Cseq: 1 INVITE
        Contact: <sip:1...@192.168.4.4:5080>
        Via: SIP/2.0/UDP 
10.0.0.10:5060;rport=5060;branch=z9hG4bK2540918624-3148004
        Date: Sun, 15 Feb 2009 18:53:54 GMT
        Allow: INVITE, ACK, CANCEL, BYE, REFER, OPTIONS, PING, INFO, REGISTER, 
SUBSCRIBE, NOTIFY
        User-Agent: sipX/1.3.0 (WinNT)
        Supported: replaces
        Content-Length: 0

No.     Time        Source                Destination           Protocol Info
      7 3.787316    10.0.0.10             10.0.0.10             SIP      
Status: 200 OK

Frame 7 (513 bytes on wire, 513 bytes captured)
Ethernet II, Src: 02:00:4c:4f:4f:50 (02:00:4c:4f:4f:50), Dst: 02:00:4c:4f:4f:50 
(02:00:4c:4f:4f:50)
Internet Protocol, Src: 10.0.0.10 (10.0.0.10), Dst: 10.0.0.10 (10.0.0.10)
User Datagram Protocol, Src Port: 2485 (2485), Dst Port: 5060 (5060)
    Source port: 2485 (2485)
    Destination port: 5060 (5060)
    Length: 479
    Checksum: 0x1a8a [correct]
Session Initiation Protocol
    Status-Line: SIP/2.0 200 OK
    Message Header
        From: <sip:sof...@dan>;tag=Dialogic_2540918624-3213540
        To: sip:1...@127.0.0.1;tag=23705
        Call-Id: 97735760-2f08e4...@10.0.0.10
        Cseq: 1 INVITE
        Contact: <sip:1...@192.168.4.4:5080>
        Via: SIP/2.0/UDP 
10.0.0.10:5060;rport=5060;branch=z9hG4bK2540918624-3148004
        Date: Sun, 15 Feb 2009 18:53:54 GMT
        Allow: INVITE, ACK, CANCEL, BYE, REFER, OPTIONS, PING, INFO, REGISTER, 
SUBSCRIBE, NOTIFY
        User-Agent: sipX/1.3.0 (WinNT)
        Supported: replaces
        Content-Length: 0

No.     Time        Source                Destination           Protocol Info
      8 7.794392    10.0.0.10             10.0.0.10             SIP      
Status: 200 OK

Frame 8 (513 bytes on wire, 513 bytes captured)
Ethernet II, Src: 02:00:4c:4f:4f:50 (02:00:4c:4f:4f:50), Dst: 02:00:4c:4f:4f:50 
(02:00:4c:4f:4f:50)
Internet Protocol, Src: 10.0.0.10 (10.0.0.10), Dst: 10.0.0.10 (10.0.0.10)
User Datagram Protocol, Src Port: 2490 (2490), Dst Port: 5060 (5060)
    Source port: 2490 (2490)
    Destination port: 5060 (5060)
    Length: 479
    Checksum: 0x1a85 [correct]
Session Initiation Protocol
    Status-Line: SIP/2.0 200 OK
    Message Header
        From: <sip:sof...@dan>;tag=Dialogic_2540918624-3213540
        To: sip:1...@127.0.0.1;tag=23705
        Call-Id: 97735760-2f08e4...@10.0.0.10
        Cseq: 1 INVITE
        Contact: <sip:1...@192.168.4.4:5080>
        Via: SIP/2.0/UDP 
10.0.0.10:5060;rport=5060;branch=z9hG4bK2540918624-3148004
        Date: Sun, 15 Feb 2009 18:53:54 GMT
        Allow: INVITE, ACK, CANCEL, BYE, REFER, OPTIONS, PING, INFO, REGISTER, 
SUBSCRIBE, NOTIFY
        User-Agent: sipX/1.3.0 (WinNT)
        Supported: replaces
        Content-Length: 0

No.     Time        Source                Destination           Protocol Info
      9 11.800169   10.0.0.10             10.0.0.10             SIP      
Status: 200 OK

Frame 9 (513 bytes on wire, 513 bytes captured)
Ethernet II, Src: 02:00:4c:4f:4f:50 (02:00:4c:4f:4f:50), Dst: 02:00:4c:4f:4f:50 
(02:00:4c:4f:4f:50)
Internet Protocol, Src: 10.0.0.10 (10.0.0.10), Dst: 10.0.0.10 (10.0.0.10)
User Datagram Protocol, Src Port: 2491 (2491), Dst Port: 5060 (5060)
    Source port: 2491 (2491)
    Destination port: 5060 (5060)
    Length: 479
    Checksum: 0x1a84 [correct]
Session Initiation Protocol
    Status-Line: SIP/2.0 200 OK
    Message Header
        From: <sip:sof...@dan>;tag=Dialogic_2540918624-3213540
        To: sip:1...@127.0.0.1;tag=23705
        Call-Id: 97735760-2f08e4...@10.0.0.10
        Cseq: 1 INVITE
        Contact: <sip:1...@192.168.4.4:5080>
        Via: SIP/2.0/UDP 
10.0.0.10:5060;rport=5060;branch=z9hG4bK2540918624-3148004
        Date: Sun, 15 Feb 2009 18:53:54 GMT
        Allow: INVITE, ACK, CANCEL, BYE, REFER, OPTIONS, PING, INFO, REGISTER, 
SUBSCRIBE, NOTIFY
        User-Agent: sipX/1.3.0 (WinNT)
        Supported: replaces
        Content-Length: 0
_______________________________________________
sipx-dev mailing list
sipx-...@list.sipfoundry.org
List Archive: http://list.sipfoundry.org/archive/sipx-dev
Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev
_______________________________________________
sipxtapi-dev mailing list
sipxtapi-dev@list.sipfoundry.org
List Archive: http://list.sipfoundry.org/archive/sipxtapi-dev/

Reply via email to