View previous topic :: View next topic |
Author |
Message |
goroi Guest
|
Posted: Mon Jul 17, 2006 12:50 pm Post subject: ACTION_CALL_CONTROL |
|
|
Hi all,
In standart 11.14 is written "When this service is activated by the SIM, all dialled digit strings, supplementary service control strings and USSD strings are first passed to the SIM before the ME sets up the call, the supplementary service operation or the USSD operation. The ME shall also pass to the SIM at the same time its current serving cell. The SIM has the ability to allow, bar or modify the call"
STK application is registered for ACTION_CALL_CONTROL and then in data it receive somthing (I suppose dialed number, type ot call , something else). Where I can find
explanation and format of "data".
The second question is how can I replay to ME to pass call if known number is dialed or to modify call, where this communication happen ? |
|
Back to top |
|
 |
goroi Guest
|
Posted: Tue Jul 18, 2006 8:30 am Post subject: |
|
|
My question is : how to replay to ME what to do to allow call , to modify . In specificatoin is written SW1/SW2 have to be set 90 00 , and codes 00 for alllow 01 doeny and 02 allowed with modification , where these code have to be set up? |
|
Back to top |
|
 |
goroi Guest
|
Posted: Tue Jul 18, 2006 8:59 am Post subject: |
|
|
Shall this response be APDU command and How can I construct it? |
|
Back to top |
|
 |
pz Guest
|
Posted: Tue Jul 18, 2006 11:54 am Post subject: |
|
|
Prepare answer and use retval() at the end of your call handling the CALL_CONTROL, i.e. 9F len_of_answer.
Phone then issues GET_RESPONSE and you return the answer in buf_B() - use FILE_APDU action for this. |
|
Back to top |
|
 |
goroi Guest
|
Posted: Tue Aug 22, 2006 6:44 am Post subject: |
|
|
Hi Pz , I thing that I did something wrong , or I am afraid that can't understand what taht exactly mean "Prepare answer and use" . I thought that answer should contain command that I want to be executed . In example below I wanted to send USSD but unfortunately this isn't proper code. Can you help me or can you explain me what you excatly men when you said "use FILE_APDU action for this.".
10x in advance
u8 PROGMEM t_Text_ss[]={0x0A, 0x01, 0x02, 0x0B};
................
case ACTION_CALL_CONTROL:
response = buf_B ();
response[resp_len++] = CALL_MODIFIED;
response[resp_len++] = strlen(t_Text_ss);
for (u8 i = 0; i < strlen(t_Text_ss); i++)
response[resp_len++] = rb(t_Text_ss+i);
retval(0x9F06);
break; |
|
Back to top |
|
 |
pz Guest
|
Posted: Tue Aug 22, 2006 1:48 pm Post subject: |
|
|
goroi wrote: | Hi Pz , I thing that I did something wrong , or I am afraid that can't understand what taht exactly mean "Prepare answer and use" . I thought that answer should contain command that I want to be executed . In example below I wanted to send
|
If you look into 11.14 you will see that answer on CALL_CONTROL is 9f xx, i.e. only 2 bytes telling the phone to use GET_RESPONSE APDU to actually fetch your data.
This is what I meant prepare anser and use it later. You have to prepare answer in this moment because you have to know length to return in 9f len.
Quote: |
USSD but unfortunately this isn't proper code. Can you help me or can you explain me what you excatly men when you said "use FILE_APDU action for this.".
10x in advance
u8 PROGMEM t_Text_ss[]={0x0A, 0x01, 0x02, 0x0B};
................
case ACTION_CALL_CONTROL:
response = buf_B ();
response[resp_len++] = CALL_MODIFIED;
response[resp_len++] = strlen(t_Text_ss);
for (u8 i = 0; i < strlen(t_Text_ss); i++)
response[resp_len++] = rb(t_Text_ss+i);
retval(0x9F06);
break; |
Code: |
case ACTION_CALL_CONTROL:
prepare answer into your_buffer;
retval(0x9f00|len_of yout_answer);
break;
case FILE_APDU:
if (((File_apdu_data *) data)->prev_ins == ME_CMD_ENVELOPE
&& ((File_apdu_data *) data)->ins == ME_CMD_GET_RESPONSE)
{
u8 *response=buf_B();
for(i=0;i<your_answer_len;i++) response[i]=your_buffer[i];
}
|
|
|
Back to top |
|
 |
givanov78
Joined: 17 Jun 2009 Posts: 1
|
Posted: Wed Jun 17, 2009 2:07 pm Post subject: |
|
|
I've tried to deny call using ACTION_CALL_CONTROL as shown in the next code:
Code: |
case ACTION_CALL_CONTROL:
retval (0x9F02); // 2 bytes call control response
break;
case ACTION_FILE_APDU:
if (((File_apdu_data*) data)->prev_ins == ME_CMD_ENVELOPE
&& ((File_apdu_data*) data)->ins == ME_CMD_GET_RESPONSE)
{
u8* response = buf_B ();
response[0] = 1; // call control - deny call
response[1] = 0;
}
break;
|
Unfortunately this does not work. Any suggestions that may help me to deny call? |
|
Back to top |
|
 |
dary
Joined: 15 Oct 2007 Posts: 54
|
Posted: Thu Jun 18, 2009 3:24 pm Post subject: |
|
|
Strange, what phone is this? Do you have TP2/TL2 to see what's going on, i.e. debug communication between phone and SIM? |
|
Back to top |
|
 |
jbladox
Joined: 29 Jul 2008 Posts: 24
|
Posted: Fri Jun 26, 2009 8:27 pm Post subject: |
|
|
I am also trying to deny the call, but provide a more meaningful response message to the user. I am able to successfully deny the call, but not get the meaningful response message.
I have:
Code: |
case ACTION_CALL_CONTROL:
retval(0x9F09);
break;
case ACTION_FILE_APDU:
if(((File_apdu_data*) data)->prev_ins == ME_CMD_ENVELOPE
&& ((File_apdu_data*) data)->ins == ME_CMD_GET_RESPONSE) {
u8* r = buf_B();
r[0] = 0x01; //deny call
r[1] = 0x07; //following length
r[2] = 'B';
r[3] = 'a';
r[4] = 'd';
r[5] = ' ';
r[6] = 'n';
r[7] = 'u';
r[8] = 'm';
//For some reason, putting 0x9000 here makes it work
//Even though we've told the SIM we're only sending 9 bytes ...
r[9] = 0x90;
r[10] = 0x00;
}
break;
|
I never see the "Bad num" message anywhere, but always get a different default message "Operation not allowed". Is there a way to change this message from "Operation not allowed"?
Thanks,
J |
|
Back to top |
|
 |
jbladox
Joined: 29 Jul 2008 Posts: 24
|
Posted: Mon Jun 29, 2009 12:22 pm Post subject: |
|
|
I forgot to add in my post.....
givanov78: try adding 0x9000 at the end of your b_Buf() like I did. That worked for me. |
|
Back to top |
|
 |
pz Guest
|
Posted: Tue Jun 30, 2009 10:30 am Post subject: |
|
|
jbladox wrote: | I am also trying to deny the call, but provide a more meaningful response message to the user. I am able to successfully deny the call, but not get the meaningful response message.
I have:
Code: |
case ACTION_CALL_CONTROL:
retval(0x9F09);
break;
case ACTION_FILE_APDU:
if(((File_apdu_data*) data)->prev_ins == ME_CMD_ENVELOPE
&& ((File_apdu_data*) data)->ins == ME_CMD_GET_RESPONSE) {
u8* r = buf_B();
r[0] = 0x01; //deny call
r[1] = 0x07; //following length
r[2] = 'B';
r[3] = 'a';
r[4] = 'd';
r[5] = ' ';
r[6] = 'n';
r[7] = 'u';
r[8] = 'm';
//For some reason, putting 0x9000 here makes it work
//Even though we've told the SIM we're only sending 9 bytes ...
r[9] = 0x90;
r[10] = 0x00;
}
break;
|
I never see the "Bad num" message anywhere, but always get a different default message "Operation not allowed". Is there a way to change this message from "Operation not allowed"?
Thanks,
J |
This very much depends on the phone used, some do show it, some don't. |
|
Back to top |
|
 |
|