hanenehrizi / sipdroid

Automatically exported from code.google.com/p/sipdroid
GNU General Public License v3.0
0 stars 0 forks source link

CallerId error in 1.1.3 #168

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Upgrade from 1.1.2 to 1.1.3
2. Registering on asterisk or gizmo5
3. Making a call

What is the expected output? What do you see instead?
Instead of a normal call screen, I encounter a runtime exceptiom

What version of the product are you using? On what operating system?
Sipdroid on Android emulator

Which SIP server are you using? What happens with PBXes?
Asterisk or gizmo5, haven't tried with PBXes.

Please provide any additional information below.

The logcat shows that this error is launched by the parser.java (line 64,
Parser.java) in zoolu.tools, which is extended by SipParser.java. It is
clear that this error only occurs if a null string is used as a parameter
to the constructor of the SipParser object (line 42, SipParser.java). 

SipParser.java is called by NameAddress.java upon the initialization of its
constructor (line 62, NameAddress.java). 

NameaAddress object is instantiated by the invite method in
InviteDialog.java for both caller and callee (line 216 and 217,
InviteDialog.java).

This invite method is launched by the call method of ExtendedCall.java
(line 127, ExtendedCall.java), which is called by UserAgent.call (line 279,
UserAgent.java).

The invite method has a trap to prevent a null string being passed as a
parameter in the "from" field and thus prevent the runtime exception, by
using the "from_url" string as a subtitute (line 249, UserAgent.java),
which is intuitively not supposed to be another null string.

But when I checked, it was null, and there was no part in the
SipClientEngine.java upon instantiating the UserAgentProfile object (line
78, SipClientEngine.java), that changes the value of the callerid field,
after it is instantiated to null (line 59, UserAgentProfile).

Things only began to run normally again, when I changed line 249 of
UserAgentProfile.java (this: "from_url = user_profile.callerid", to this:
"from_url = user_profile.from_url"), thus undoing the change made by r340
in UserAgentProfile.java.

Is this normally the case?

Original issue reported on code.google.com by Silversp...@gmail.com on 3 Nov 2009 at 10:52

GoogleCodeExporter commented 9 years ago
You must be using a completely different source code. There is no 
SipClientEngine.java. 
You might refer to SipdroidEngine.java but the line numbers don't match. Also 
r340 did 
not change UserAgentProfile.java. Please recheck.

Original comment by pmerl...@googlemail.com on 3 Nov 2009 at 7:31

GoogleCodeExporter commented 9 years ago
Im sorry for the naming and numbers mismatch, this is now the correct version, 
please
do read again:

The logcat shows that this error is launched by the parser.java (line 64,
Parser.java) in zoolu.tools, which is extended by SipParser.java. It is
clear that this error only occurs if a null string is used as a parameter
to the constructor of the SipParser object (line 42, SipParser.java). 

SipParser.java is called by NameAddress.java upon the initialization of its
constructor (line 62, NameAddress.java). 

NameaAddress object is instantiated by the invite method in
InviteDialog.java for both caller and callee (line 216 and 217,
InviteDialog.java).

This invite method is launched by the call method of ExtendedCall.java
(line 126, ExtendedCall.java), which is called by UserAgent.call (line 275,
UserAgent.java).

The invite method has a trap to prevent a null string being passed as a
parameter in the "from" field and thus prevent the runtime exception, by
using the "from_url" string as a subtitute (line 247, UserAgent.java),
which is intuitively not supposed to be another null string.

But when I checked, it was null, and there was no part in the
SipdroidEngine.java upon instantiating the UserAgentProfile object (line
73, SipdroidEngine.java), that changes the value of the callerid field,
after it is instantiated to null (line 59, UserAgentProfile).

Things only began to run normally again, when I changed line 247 of
UserAgent.java (this: "from_url = user_profile.callerid", to this:
"from_url = user_profile.from_url"), thus undoing the change made by r340
in UserAgent.java.

Is this normally the case?

Original comment by Silversp...@gmail.com on 4 Nov 2009 at 5:12

GoogleCodeExporter commented 9 years ago
Look into SipdroidEngine.java. user_profile.callerid is set a few lines after 
instantiating the user_profile object.

Original comment by pmerl...@googlemail.com on 4 Nov 2009 at 8:19