views:

50

answers:

1

Hi all,

I am just starting to look at Jain Sip and I was wondering how to create a SipUri that only contains the ip address and does not contain the user and the @ symbol.

So currently I get sip:[email protected] and I want to get sip:192.xxx.x.xxx

My code is below but, I can remove the User but I cant seem to get rid of the @ symbol, has anyone any ideas how to do this?

 SipURI toAddress = addressFactory
            .createSipURI(toUser, toSipAddress);
    toAddress.removeParameter(toUser);
    Address toNameAddress = addressFactory.createAddress(toAddress);
    toNameAddress.setDisplayName(toDisplayName);
    ToHeader toHeader = headerFactory.createToHeader(toNameAddress,
            null);
A: 

I used a normal Uri address rather than a SipUri

Donal Rafferty