3

reorganize caller variables

in call event state, it sould be no matter in which direction the call is to get its external participiant.

why at first find out, in which direction the call is and then use "called name" and "called num" or "caller name" and "caller num"??

it would be much better, when the global variables are:

%EXT_NAME
%EXT_NUM
%CALL_DIRECTION
%CALL_DURATION
%CALL_ANSWER_DATE
%CALL_ANSWER_TIME
%LOCAL_NUM for dual sim

2 replies

MB

Hi João,

%evtprm() is empty

Profile: Call Outgoing (16)
  Restore: no
  State: Call [ Type:Outgoing Number:* ]
   Enter: Call Out (13)
    <call start time>
    A1: Variable Set [ Name:%call1 To:%UPS Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ] 
    <call date>
    A2: Variable Set [ Name:%call2 To:%CODATE Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ] 
    <call date>
    A3: Variable Set [ Name:%call3 To:%COTIME Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ] 
    <caller name>
    A4: Variable Set [ Name:%call4 To:%CONUM Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ] 
    <call date>
    A5: Variable Set [ Name:%call5 To:%CONAME Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ] 
    A6: Variable Set [ Name:%evtprm1 To:xxx Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ] 
    A7: Run Shell [ Command:echo start %call() e %evtprm() >> /sdcard/calllog.txt Timeout (Seconds):0 Use Root:Off Store Output In: Store Errors In: Store Result In: ] 

   Exit: Call Out end (18)
    <call start time>
    A1: Variable Set [ Name:%call1 To:%UPS Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ] 
    <call date>
    A2: Variable Set [ Name:%call2 To:%CODATE Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ] 
    <call date>
    A3: Variable Set [ Name:%call3 To:%COTIME Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ] 
    <caller name>
    A4: Variable Set [ Name:%call4 To:%CONUM Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ] 
    <call date>
    A5: Variable Set [ Name:%call5 To:%CONAME Recurse Variables:Off Do Maths:Off Append:Off Max Rounding Digits:3 ] 
    A6: Run Shell [ Command:echo end %call() e %evtprm() >> /sdcard/calllog.txt Timeout (Seconds):0 Use Root:Off Store Output In: Store Errors In: Store Result In: ] 
start 10747,20.04.20,10.59,08003301001,08003301001 e xxx
end 10758,20.04.20,10.59,08003301001,08003301001 e

and when i doesnt set var %evtprm1 it will be empty too..

best regards,

Max

Hhmm, that's cause you used the state. Can you please try using an event for that?

MB

    Profile: missed call (8)
    Restore: no
    Event: Missed Call [ Caller:* ]
    Enter: log missed call (9)
    A1: Run Shell [ Command:echo missed call %evtprm() >> /sdcard/evtprm.txt Timeout (Seconds):0 Use Root:Off Store Output In: Store Errors In: Store Result In: ]
   
    Profile: phone idle (10)
    Restore: no
    Event: Phone Idle
    Enter: log phone idle (14)
    A1: Run Shell [ Command:echo phone idle %evtprm() >> /sdcard/evtprm.txt Timeout (Seconds):0 Use Root:Off Store Output In: Store Errors In: Store Result In: ]
   
    Profile: phone offhook (19)
    Restore: no
    Event: Phone Offhook
    Enter: log phone offhook (20)
    A1: Run Shell [ Command:echo phone offhook %evtprm() >> /sdcard/evtprm.txt Timeout (Seconds):0 Use Root:Off Store Output In: Store Errors In: Store Result In: ]
   
    Profile: phone ringing (21)
    Restore: no
    Event: Phone Ringing [ Caller:* ]
    Enter: log phone ringing (22)
    A1: Run Shell [ Command:echo phone ringing %evtprm() >> /sdcard/evtprm.txt Timeout (Seconds):0 Use Root:Off Store Output In: Store Errors In: Store Result In: ]
   
logging:

# incoming call, no answer
phone ringing +492051309
phone idle
missed call +492051309

# incoming call with answer
phone ringing +492051309
phone offhook
phone idle

outgoing calls with connection
phone offhook
phone idle
phone offhook
phone idle


the number is not filled in phone idle state too..

Yes, unfortunately it'll only fill in %evtprm() for events that have input filters. Sorry about that. What's missing is the number in the phone idle event, right?

MB

Hi João,

when it is possible to add the phone number and call end reason (missing, dismiss, normal call end) would be great, when i can access it in idle state!

when it is allowed to make wishes, it would be perfect, when i get all the following:

%EXT_NAME
%EXT_NUM
%CALL_DIRECTION
%CALL_DURATION
%CALL_ANSWER_DATE
%CALL_ANSWER_TIME
%CALL_END_REASON
%LOCAL_NUM for dual sim

:-)

but only call end reason and external phone number is all i need for getting all the information in with a external database and many lookups.

Thank you!

best regards,
Max

Hi there. Does the %evtprm() array maybe contain what you need?