Hi am i trying to register the client on asterisk server.
I have modify the sipDroid code and for now i only want to register with the
server.
This is message sent from client (modified code)
REGISTER sip:192.168.a.a SIP/2.0
Via: SIP/2.0/UDP 10.0.2.15:50927;rport;branch=z9hG4bK87975
Max-Forwards: 70
To: <sip:xxx@192.168.0.3>
From: <sip:xxx@192.168.0.3>;tag=z9hG4bK37789030
Call-ID: 860871844385@10.0.2.15
CSeq: 1 REGISTER
Contact: <sip:xxx@10.0.2.15:50927;transport=udp>
Expires: 3600
User-Agent: Sipdroid/1.0/GALAXY_Tab
Content-Length: 0
This is the exact message which sipdroid code send
//Create message re (modified by mandrajg)
Message req = MessageFactory.createRegisterRequest(sip_provider,
target, target, new NameAddress(user_profile.contact_url), qvalue, icsi);
req.setExpiresHeader(new ExpiresHeader(String.valueOf(expire_time)));
//create and fill the authentication params this is done when
//the UA has been challenged by the registrar or intermediate UA
if (next_nonce != null)
{
AuthorizationHeader ah = new AuthorizationHeader("Digest");
ah.addUsernameParam(username);
ah.addRealmParam(realm);
ah.addNonceParam(next_nonce);
ah.addUriParam(req.getRequestLine().getAddress().toString());
ah.addQopParam(qop);
String response = (new DigestAuthentication(SipMethods.REGISTER,
ah, null, passwd)).getResponse();
ah.addResponseParam(response);
req.setAuthorizationHeader(ah);
}
if (expire_time > 0)
{
printLog("Registering contact " + contact + " (it expires in "
+ expire_time + " secs)", LogLevel.HIGH);
}
else
{
printLog("Unregistering contact " + contact, LogLevel.HIGH);
}
t = new TransactionClient(sip_provider, req, this, 30000);
t.request();
But it only register with the server when 3G is ON why?
Any body please help me...
Original issue reported on code.google.com by peswani....@gmail.com on 22 May 2012 at 2:44
Original issue reported on code.google.com by
peswani....@gmail.com
on 22 May 2012 at 2:44