[sip-comm-dev] Problem with Call Listeners


#1

I've been messing with a plugin that interfaces to a mysql database so
that when SIP calls are received it polls the database to see if we know
any info about the caller.

Unfortunately other projects got in the way and I'm returning to it
after a 3month break. Somewhere between the old SIPCom code of a few
months ago and that of the past week, the Call Listener seems to have
stopped working. When I receive a call now the following error appears
in the console:

10:58:05.703 SEVERE:
impl.protocol.sip.SipStackSharing.getListenerFor().908 no listener found
for local party: <sip:6023@10.44.10.26:5060;transport=udp>

I can't figure out whats changed. The bad news is I'm a relative new
comer to sipcom and I'm kind of stuck as to where to look next.

Any ideas?

Heres the method I use to actually setup the callListener, I then
implement the CallListener interface although at the moment its only
dumping to the console stuff like "call received" instead of doing
anything useful. The class itself calls this method from the
constructor.

private void setupCallListener(){

bundle.addServiceListener(this);

            ServiceReference[] serviceRef = null;

try{

                        serviceRef =
bundle.getServiceReferences(ProtocolProviderService.class.getName(),null
);

            }catch(InvalidSyntaxException e){}

            if(serviceRef != null){

for(int i=0; i < serviceRef.length; i++){

ProtocolProviderService p =
(ProtocolProviderService)(bundle.getService(serviceRef[i]));

System.out.println("***: " + p.getProtocolName()); //Prints out SIP.

OperationSet op1 = p.getOperationSet(OperationSetBasicTelephony.class);

if(op1 != null){

OperationSetBasicTelephony tel =
(OperationSetBasicTelephony)op1;//(p.getOperationSet(OperationSetBasicTe
lephony.class));

tel.addCallListener(this);

this.addPPS(p);

}

}

}

}

The addPPS method is called from serviceChanged inside the
ServiceListener. All it does is add the service to an array. This is
the same as the DTMFCPFeeder class by JM HEITZ.

Finally, apologies to Emil for sending this to the wrong address.

···

#####################################################################################
This e-mail message has been scanned for Viruses and Content and cleared
by NetIQ MailMarshal
#####################################################################################


#2

Hi Wayne,

···

On Sun, Dec 14, 2008 at 01:20:19PM -0000, Wayne Merricks wrote:

Heres the method I use to actually setup the callListener, I then
implement the CallListener interface although at the moment its only
dumping to the console stuff like "call received" instead of doing
anything useful. The class itself calls this method from the
constructor.

Could you please make a patch against current svn with all your
modifications so that it would be easier to test?

Cheers,

--
Sébastien Mazy

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net