state : 'disconnected'
onCallChanged: {
- console.log("*** call changed in large, before if")
- if(call && call.msisdn) {
+ console.log("*** call changed in large, before if")
+ if(call && call.msisdn) {
console.log("*** in calllarge if >> " + call.state );
-
- root.state = call.state
-
- /* if (call.name) {
- root.callerLabelText = call.name;
-
-
- } else {
- */
- if (call.numberLen <= 10)
- {
- root.callerLabelText = call.msisdn[0] + call.msisdn[1] + call.msisdn[2] + '-' +
- call.msisdn[3] + call.msisdn[4] + call.msisdn[5] + '-' +
- call.msisdn[6] + call.msisdn[7] + call.msisdn[8] + call.msisdn[9];
- }
- else
- root.callerLabelText = call.msisdn;
- //}
+
+ root.state = call.state
+
+ if (call.msisdn !== undefined && call.msisdn[0]!== undefined)
+ {
+ if (call.msisdn.trim().length <= 10)
+ {
+ root.callerLabelText = call.msisdn[0] + call.msisdn[1] + call.msisdn[2] + '-' +
+ call.msisdn[3] + call.msisdn[4] + call.msisdn[5] + '-' +
+ call.msisdn[6] + call.msisdn[7] + call.msisdn[8] + call.msisdn[9];
+ }
+ else
+ root.callerLabelText = call.msisdn;
+ }
}
}