You might get quicker answers posting to the sipx tapi dev list.

http://list.sipfoundry.org/archive/sipxtapi-dev/


>>> Daniel Thornhill <[email protected]> 02/15/09 2:58 PM >>>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
<![endif]-->
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout><![endif]-->Hiall,<o:p></o:p>
Hiall,<o:p></o:p>
Iam 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 ofa 'ringing' 
state.  Looking in the Sipx log I am repeatedly getting themessage,<o:p></o:p>
<o:p> </o:p>
"2009-02-15T18:51:32.450000Z":343:SIP:DEBUG:DAN:SipUserAgent-3:000004FC:sipXtapi:"SipUDPServerBase::send0B66DCD0
 isInUseForWrite 16, client info\n        remotehost: :0\n          remote 
IP:0.0.0.0:0\n   remote Via address: :-1\n            receivedaddress: 
:-1"<o:p></o:p>
"2009-02-15T18:51:32.451000Z":344:OUTGOING:INFO:DAN:SipUserAgent-3:000004FC:sipXtapi:"SipUserAgent::sendUdpresend
 1 of UDP message\nUDP SIP User Agent sent 
message:\n----RemoteHost:10.0.0.10---- Port: 5060----\nSIP/2.0 200 
OK\r\nFrom:<sip:sof...@dan>;tag=Dialogic_2398387624-3016932\r\nTo: 
sip:[email protected];tag=20966\r\nCall-Id:[email protected]\r\ncseq: 1 
INVITE\r\nContact:<sip:[email protected]:5080>\r\nVia: 
SIP/2.0/UDP10.0.0.10:5060;rport=5060;branch=z9hG4bK2398387624-2951396\r\nDate: 
Sun, 15 Feb2009 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""<o:p></o:p>
<o:p> </o:p>
Obviouslywith incrementing " isInUseForWrite" numbers.<o:p></o:p>
<o:p> </o:p>
Ithink this might be part of the problem?<o:p></o:p>
<o:p> </o:p>
Ihave also attached an Ethereal UDP packet dump which shows a repeated 
attemptto send the same UDP packet.<o:p></o:p>
<o:p> </o:p>
Iam wondering whether anyone has any glues as to why the UDP packet isn't 
beingsent/received properly?<o:p></o:p>
<o:p> </o:p>
 connected event sentso I am assuming my code is near enough right?<o:p></o:p>
<o:p> </o:p>
public voidreceivedCallStateInfo(final CallStateInfo callStateInfo) {<o:p></o:p>
               System.out.println("SipXTest.receivedCallStateInfo():: got call 
state infoevent " + callStateInfo.getSipXCallStateEvent());<o:p></o:p>
               <o:p></o:p>
               byte[] lineUrl = new byte[1024];<o:p></o:p>
               int result = SipXNativeLibrary.instance.sipxCallGetID(<o:p></o:p>
                               callStateInfo.getSipXCallHandle(), lineUrl, 
1024) ;<o:p></o:p>
               System.out.println("SipXTest.receivedCallStateInfo():: line url: 
" +new String(lineUrl));<o:p></o:p>
               <o:p></o:p>
               <o:p></o:p>
               switch (callStateInfo.getSipXCallStateEvent()) {<o:p></o:p>
                       case CALLSTATE_ALERTING:<o:p></o:p>
                               byte[] remoteId = new byte[256];<o:p></o:p>
                               
SipXNativeLibrary.instance.sipxCallGetRemoteID(<o:p></o:p>
                                               
callStateInfo.getSipXCallHandle(), remoteId, 256) ;<o:p></o:p>
                               
System.out.println("SipXTest.receivedCallStateInfo():: " + 
newString(remoteId));<o:p></o:p>
                               result = 
SipXNativeLibrary.instance.sipxCallStartTone(<o:p></o:p>
                                               
callStateInfo.getSipXCallHandle(), 
SipXToneId.ID_TONE_RINGBACK.getSipXValue(),true, false) ;<o:p></o:p>
                               
System.out.println("SipXTest.receivedCallStateInfo():: call alerting.["  + 
SipXResult.valueOf(result) + "].");<o:p></o:p>
                               <o:p></o:p>
                               result = 
SipXNativeLibrary.instance.sipxCallAnswer(callStateInfo.getSipXCallHandle(),false);
                               <o:p></o:p>
                               
System.out.println("SipXTest.receivedCallStateInfo():: call alerting.["  + 
SipXResult.valueOf(result) + "].");<o:p></o:p>
                               <o:p></o:p>
                               break;<o:p></o:p>
                       case CALLSTATE_OFFERING:<o:p></o:p>
                               remoteId = new byte[256];<o:p></o:p>
                               
SipXNativeLibrary.instance.sipxCallGetRemoteID(<o:p></o:p>
                                               
callStateInfo.getSipXCallHandle(), remoteId, 256) ;<o:p></o:p>
                               
System.out.println("SipXTest.receivedCallStateInfo():: " + 
newString(remoteId));<o:p></o:p>
<o:p> </o:p>
                               result = 
SipXNativeLibrary.instance.sipxCallAccept(<o:p></o:p>
                                               
callStateInfo.getSipXCallHandle(), null, null, null, true);<o:p></o:p>
                               
System.out.println("SipXTest.receivedCallStateInfo():: result:: " 
+SipXResult.valueOf(result));<o:p></o:p>
                               break;<o:p></o:p>
                       case CALLSTATE_CONNECTED:<o:p></o:p>
                               remoteId = new byte[256];<o:p></o:p>
                               
SipXNativeLibrary.instance.sipxCallGetRemoteID(<o:p></o:p>
                                               
callStateInfo.getSipXCallHandle(), remoteId, 256) ;<o:p></o:p>
                               
System.out.println("SipXTest.receivedCallStateInfo():: " + 
newString(remoteId));<o:p></o:p>
                               result = 
SipXNativeLibrary.instance.sipxCallStopTone(callStateInfo.getSipXCallHandle());<o:p></o:p>
                             
System.out.println("SipXTest.receivedCallStateInfo():: call conected.["  + 
SipXResult.valueOf(result) + "].");<o:p></o:p>
                             break;<o:p></o:p>
               }<o:p></o:p>
               <o:p></o:p>
       }<o:p></o:p>
<o:p> </o:p>
Thanks,<o:p></o:p>
Daniel<o:p></o:p>
<o:p> </o:p>
<o:p></o:p>
ValidSoftLimited<o:p></o:p>
 <o:p></o:p>
64Paul Street<o:p></o:p>
London<o:p></o:p>
EC2A4NG<o:p></o:p>
<o:p> </o:p>
[email protected]<o:p></o:p>
<o:p> </o:p>
www.validsoft.com<o:p></o:p>
 <o:p></o:p>



<o:p></o:p>
 <o:p></o:p>



<o:p></o:p>
If you are not the intended recipient, any disclosure, copying,distribution or 
any action taken or omitted to be taken in reliance on it, isprohibited and may 
be unlawful.<o:p></o:p>

When addressed to our clients any opinions or advice contained inthis e-mail 
are subject to the terms and conditions expressed in the governingValidSoft 
client terms and conditions. <o:p></o:p>
<o:p></o:p>
<o:p> </o:p>
</[email protected]>
_______________________________________________
sipx-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-dev
Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev

Reply via email to