[PATCH v2] phonesim: Extend STK conformance menu with Setup Call items
by Philippe Nunes
---
src/conformancesimapplication.cpp | 247 +++++++++++++++++++++++++++++++++++++
src/simapplication.h | 2 +
2 files changed, 249 insertions(+)
diff --git a/src/conformancesimapplication.cpp b/src/conformancesimapplication.cpp
index a2bd3af..fd146f4 100644
--- a/src/conformancesimapplication.cpp
+++ b/src/conformancesimapplication.cpp
@@ -41,6 +41,7 @@ const QString ConformanceSimApplication::getName()
#define ConformanceMenu_GetInkey 2
#define ConformanceMenu_GetInput 3
#define ConformanceMenu_MoreTime 4
+#define ConformanceMenu_SetupCall 5
#define NormalMenu_1_1 1
#define NormalMenu_1_2 2
@@ -101,6 +102,20 @@ const QString ConformanceSimApplication::getName()
#define GetInputMenu_Text_Attribute 11
#define GetInputMenu_Main 12
+#define SetupCall_Confirmed 1
+#define SetupCall_Long_AID 2
+#define SetupCall_Subaddress_Not_Supported 3
+#define SetupCall_Rejected 4
+#define SetupCall_Putting_On_Hold 5
+#define SetupCall_Disconnect_Others 6
+#define SetupCall_If_Not_Busy 7
+#define SetupCall_On_Hold_Not_allowed 8
+#define SetupCall_Max_Dialing_Number 9
+#define SetupCall_Two_AID 10
+#define SetupCall_Basic_icon 11
+#define SetupCall_Self_basic_icon 12
+#define SetupCall_Basic_icon_during_call 13
+
void ConformanceSimApplication::mainMenu()
{
QSimCommand cmd;
@@ -126,6 +141,10 @@ void ConformanceSimApplication::mainMenu()
item.setLabel( "More Time" );
items += item;
+ item.setIdentifier( ConformanceMenu_SetupCall );
+ item.setLabel( "Setup Call" );
+ items += item;
+
cmd.setMenuItems( items );
command( cmd, 0, 0 );
@@ -162,6 +181,12 @@ void ConformanceSimApplication::mainMenuSelection( int id )
}
break;
+ case ConformanceMenu_SetupCall:
+ {
+ sendSetupCallMenu();
+ }
+ break;
+
default:
{
// Don't know what this item is, so just re-display the main menu.
@@ -1746,3 +1771,225 @@ void ConformanceSimApplication::GetInputIconMenu( const QSimTerminalResponse& re
break;
}
}
+
+void ConformanceSimApplication::sendSetupCallMenu()
+{
+ QSimCommand cmd;
+ QSimMenuItem item;
+ QList<QSimMenuItem> items;
+
+ cmd.setType( QSimCommand::SelectItem );
+ cmd.setTitle( "Setup Call (Icon support)" );
+
+ item.setIdentifier( SetupCall_Confirmed );
+ item.setLabel( "Call confirmed and connected" );
+ items += item;
+
+ item.setIdentifier( SetupCall_Long_AID );
+ item.setLabel( "Long first alpha identifier" );
+ items += item;
+
+ item.setIdentifier( SetupCall_Subaddress_Not_Supported );
+ item.setLabel( "Called party subaddress not supported" );
+ items += item;
+
+ item.setIdentifier( SetupCall_Rejected );
+ item.setLabel( "Call rejected by the user" );
+ items += item;
+
+ item.setIdentifier( SetupCall_Putting_On_Hold );
+ item.setLabel( "Putting all other calls on hold" );
+ items += item;
+
+ item.setIdentifier( SetupCall_Disconnect_Others );
+ item.setLabel( "Disconnecting all other calls" );
+ items += item;
+
+ item.setIdentifier( SetupCall_If_Not_Busy );
+ item.setLabel( "Only if not currently busy on another call" );
+ items += item;
+
+ item.setIdentifier( SetupCall_On_Hold_Not_allowed );
+ item.setLabel( "Call hold is not allowed" );
+ items += item;
+
+ item.setIdentifier( SetupCall_Max_Dialing_Number );
+ item.setLabel( "Max dialing number string, no alpha" );
+ items += item;
+
+ item.setIdentifier( SetupCall_Two_AID );
+ item.setLabel( "Two alpha identifiers" );
+ items += item;
+
+ item.setIdentifier( SetupCall_Basic_icon );
+ item.setLabel( "Basic icon" );
+ items += item;
+
+ item.setIdentifier( SetupCall_Self_basic_icon );
+ item.setLabel( "Self-explanatory basic icon" );
+ items += item;
+
+ item.setIdentifier( SetupCall_Basic_icon_during_call );
+ item.setLabel( "Icon during setup call" );
+ items += item;
+
+ cmd.setMenuItems( items );
+
+ command( cmd, this, SLOT(SetupCallMenu(QSimTerminalResponse)) );
+}
+
+void ConformanceSimApplication::SetupCallMenu( const QSimTerminalResponse& resp )
+{
+ QSimCommand cmd;
+
+ if ( resp.result() != QSimTerminalResponse::Success ) {
+ /* Unknown response - just go back to the main menu. */
+ endSession();
+
+ return;
+ }
+
+ /* Item selected. */
+ switch ( resp.menuItem() ) {
+ case SetupCall_Confirmed:
+ case SetupCall_If_Not_Busy:
+ case SetupCall_Rejected:
+ {
+ cmd.setType( QSimCommand::SetupCall );
+ cmd.setDestinationDevice( QSimCommand::Network );
+ cmd.setText( "Not busy" );
+ cmd.setNumber( "+012340123456p1p2" );
+ cmd.setDisposition( QSimCommand::IfNoOtherCalls );
+ command( cmd, this, SLOT(sendSetupCallMenu()) );
+ }
+ break;
+
+ case SetupCall_Long_AID:
+ {
+ cmd.setType( QSimCommand::SetupCall );
+ cmd.setDestinationDevice( QSimCommand::Network );
+ cmd.setText( "Three types are defined: - set up a call, but only "
+ "if not currently busy on another call; - set up a call"
+ ", putting all other calls (if any) on hold; - set up a"
+ " call, disconnecting all other calls (if any) first."
+ " For each of these types," );
+ cmd.setNumber( "+01" );
+ cmd.setDisposition( QSimCommand::IfNoOtherCalls );
+ command( cmd, this, SLOT(sendSetupCallMenu()) );
+ }
+ break;
+
+ case SetupCall_Subaddress_Not_Supported:
+ {
+ cmd.setType( QSimCommand::SetupCall );
+ cmd.setDestinationDevice( QSimCommand::Network );
+ cmd.setText( "Called party" );
+ cmd.setNumber( "+012340123456p1p2" );
+ cmd.setSubAddress ("9595959595");
+ cmd.setDisposition( QSimCommand::IfNoOtherCalls );
+ command( cmd, this, SLOT(sendSetupCallMenu()) );
+ }
+ break;
+
+ case SetupCall_Putting_On_Hold:
+ {
+ cmd.setType( QSimCommand::SetupCall );
+ cmd.setDestinationDevice( QSimCommand::Network );
+ cmd.setText( "On hold" );
+ cmd.setNumber( "+012340123456p1p2" );
+ cmd.setDisposition( QSimCommand::PutOnHold );
+ command( cmd, this, SLOT(sendSetupCallMenu()) );
+ }
+ break;
+
+ case SetupCall_On_Hold_Not_allowed:
+ {
+ cmd.setType( QSimCommand::SetupCall );
+ cmd.setDestinationDevice( QSimCommand::Network );
+ cmd.setText( "On hold" );
+ cmd.setNumber( "+0123401234" );
+ cmd.setDisposition( QSimCommand::PutOnHold );
+ command( cmd, this, SLOT(sendSetupCallMenu()) );
+ }
+ break;
+
+ case SetupCall_Disconnect_Others:
+ {
+ cmd.setType( QSimCommand::SetupCall );
+ cmd.setDestinationDevice( QSimCommand::Network );
+ cmd.setText( "Disconnect" );
+ cmd.setNumber( "+012340123456p1p2" );
+ cmd.setDisposition( QSimCommand::Disconnect );
+ command( cmd, this, SLOT(sendSetupCallMenu()) );
+ }
+ break;
+
+ case SetupCall_Max_Dialing_Number:
+ {
+ cmd.setType( QSimCommand::SetupCall );
+ cmd.setDestinationDevice( QSimCommand::Network );
+ cmd.setNumber( "+01234567890123456789012345678901" );
+ cmd.setDisposition( QSimCommand::Disconnect );
+ command( cmd, this, SLOT(sendSetupCallMenu()) );
+ }
+ break;
+
+ case SetupCall_Two_AID:
+ {
+ cmd.setType( QSimCommand::SetupCall );
+ cmd.setDestinationDevice( QSimCommand::Network );
+ cmd.setText( "CONFIRMATION" );
+ cmd.setOtherText( "CALL" );
+ cmd.setNumber( "+012340123456p1p2" );
+ cmd.setDisposition( QSimCommand::Disconnect );
+ command( cmd, this, SLOT(sendSetupCallMenu()) );
+ }
+ break;
+
+ case SetupCall_Basic_icon:
+ {
+ cmd.setType( QSimCommand::SetupCall );
+ cmd.setDestinationDevice( QSimCommand::Network );
+ cmd.setText( "Set up call Icon 3.1.1" );
+ cmd.setNumber( "+012340123456p1p2" );
+ cmd.setIconId( 1 );
+ cmd.setIconSelfExplanatory( false );
+ cmd.setDisposition( QSimCommand::IfNoOtherCalls );
+ command( cmd, this, SLOT(sendSetupCallMenu()) );
+ }
+ break;
+
+ case SetupCall_Self_basic_icon:
+ {
+ cmd.setType( QSimCommand::SetupCall );
+ cmd.setDestinationDevice( QSimCommand::Network );
+ cmd.setText( "Set up call Icon 3.2.1" );
+ cmd.setNumber( "+012340123456p1p2" );
+ cmd.setIconId( 1 );
+ cmd.setIconSelfExplanatory( true );
+ cmd.setDisposition( QSimCommand::IfNoOtherCalls );
+ command( cmd, this, SLOT(sendSetupCallMenu()) );
+ }
+ break;
+
+ case SetupCall_Basic_icon_during_call:
+ {
+ cmd.setType( QSimCommand::SetupCall );
+ cmd.setDestinationDevice( QSimCommand::Network );
+ cmd.setText( "Set up call Icon 3.4.1" );
+ cmd.setNumber( "+012340123456p1p2" );
+ cmd.setIconId( 1 );
+ cmd.setIconSelfExplanatory( true );
+ cmd.setOtherText( "Set up call Icon 3.4.2" );
+ cmd.setOtherIconId( 1 );
+ cmd.setOtherIconSelfExplanatory( true );
+ cmd.setDisposition( QSimCommand::IfNoOtherCalls );
+ command( cmd, this, SLOT(sendSetupCallMenu()) );
+ }
+ break;
+
+ default:
+ endSession();
+ break;
+ }
+}
diff --git a/src/simapplication.h b/src/simapplication.h
index 54ef103..f5b54b5 100644
--- a/src/simapplication.h
+++ b/src/simapplication.h
@@ -174,6 +174,8 @@ protected slots:
void sendGetInputNormalMenu();
void sendGetInputIconMenu();
void GetInputIconMenu( const QSimTerminalResponse& resp );
+ void sendSetupCallMenu();
+ void SetupCallMenu( const QSimTerminalResponse& resp );
};
#endif
--
1.7.9.5
8 years, 4 months
[PATCH v4 1/2] dbus: Add Terminated error
by Philippe Nunes
---
src/dbus.c | 8 ++++++++
src/ofono.h | 1 +
2 files changed, 9 insertions(+)
diff --git a/src/dbus.c b/src/dbus.c
index 3f5c12d..1f9f9ba 100644
--- a/src/dbus.c
+++ b/src/dbus.c
@@ -409,6 +409,14 @@ DBusMessage *__ofono_error_not_recognized(DBusMessage *msg)
"String not recognized as USSD/SS");
}
+DBusMessage *__ofono_error_terminated_by_network(DBusMessage *msg)
+{
+ return g_dbus_create_error(msg, OFONO_ERROR_INTERFACE
+ ".Terminated",
+ "Operation is terminated by the"
+ " network");
+}
+
DBusMessage *__ofono_error_from_error(const struct ofono_error *error,
DBusMessage *msg)
{
diff --git a/src/ofono.h b/src/ofono.h
index aca81b4..e20d8fa 100644
--- a/src/ofono.h
+++ b/src/ofono.h
@@ -66,6 +66,7 @@ DBusMessage *__ofono_error_emergency_active(DBusMessage *msg);
DBusMessage *__ofono_error_incorrect_password(DBusMessage *msg);
DBusMessage *__ofono_error_not_allowed(DBusMessage *msg);
DBusMessage *__ofono_error_not_recognized(DBusMessage *msg);
+DBusMessage *__ofono_error_terminated_by_network(DBusMessage *msg);
DBusMessage *__ofono_error_from_error(const struct ofono_error *error,
DBusMessage *msg);
--
1.7.9.5
8 years, 4 months
Sim plug-and-play
by Cornel Spinu
Hi,
I'm using ofono 0.48 with a cinterion modem and I want enable an plug-and-play
sim. Basically when I insert a sim into the modem, I want to do an pin check and
then continue with other procedures. I was think of creating a notify function
when AT^SCKS function returns 1 (sim inserted). The thing is I dont know where
to capture the response from that command. Can anyone give me a suggetion?
Thank you,
Cornel
8 years, 4 months
[PATCH 1/3] phonesim: Extend conformance menu with Setup Call items
by Philippe Nunes
---
src/conformancesimapplication.cpp | 247 +++++++++++++++++++++++++++++++++++++
src/simapplication.h | 2 +
2 files changed, 249 insertions(+)
diff --git a/src/conformancesimapplication.cpp b/src/conformancesimapplication.cpp
index a2bd3af..11265a5 100644
--- a/src/conformancesimapplication.cpp
+++ b/src/conformancesimapplication.cpp
@@ -41,6 +41,7 @@ const QString ConformanceSimApplication::getName()
#define ConformanceMenu_GetInkey 2
#define ConformanceMenu_GetInput 3
#define ConformanceMenu_MoreTime 4
+#define ConformanceMenu_SetupCall 5
#define NormalMenu_1_1 1
#define NormalMenu_1_2 2
@@ -101,6 +102,20 @@ const QString ConformanceSimApplication::getName()
#define GetInputMenu_Text_Attribute 11
#define GetInputMenu_Main 12
+#define SetupCall_Confirmed 1
+#define SetupCall_Long_AID 2
+#define SetupCall_Subaddress_Not_Supported 3
+#define SetupCall_Rejected 4
+#define SetupCall_Putting_On_Hold 5
+#define SetupCall_Disconnect_Others 6
+#define SetupCall_If_Not_Busy 7
+#define SetupCall_On_Hold_Not_allowed 8
+#define SetupCall_Max_Dialing_Number 9
+#define SetupCall_Two_AID 10
+#define SetupCall_Basic_icon 11
+#define SetupCall_Self_basic_icon 12
+#define SetupCall_Basic_icon_during_call 13
+
void ConformanceSimApplication::mainMenu()
{
QSimCommand cmd;
@@ -126,6 +141,10 @@ void ConformanceSimApplication::mainMenu()
item.setLabel( "More Time" );
items += item;
+ item.setIdentifier( ConformanceMenu_SetupCall );
+ item.setLabel( "Setup Call" );
+ items += item;
+
cmd.setMenuItems( items );
command( cmd, 0, 0 );
@@ -162,6 +181,12 @@ void ConformanceSimApplication::mainMenuSelection( int id )
}
break;
+ case ConformanceMenu_SetupCall:
+ {
+ sendSetupCallMenu();
+ }
+ break;
+
default:
{
// Don't know what this item is, so just re-display the main menu.
@@ -1746,3 +1771,225 @@ void ConformanceSimApplication::GetInputIconMenu( const QSimTerminalResponse& re
break;
}
}
+
+void ConformanceSimApplication::sendSetupCallMenu()
+{
+ QSimCommand cmd;
+ QSimMenuItem item;
+ QList<QSimMenuItem> items;
+
+ cmd.setType( QSimCommand::SelectItem );
+ cmd.setTitle( "Setup Call (Icon support)" );
+
+ item.setIdentifier( SetupCall_Confirmed );
+ item.setLabel( "Call confirmed and connected" );
+ items += item;
+
+ item.setIdentifier( SetupCall_Long_AID );
+ item.setLabel( "Long first alpha identifier" );
+ items += item;
+
+ item.setIdentifier( SetupCall_Subaddress_Not_Supported );
+ item.setLabel( "Called party subaddress not supported" );
+ items += item;
+
+ item.setIdentifier( SetupCall_Rejected );
+ item.setLabel( "Call rejected by the user" );
+ items += item;
+
+ item.setIdentifier( SetupCall_Putting_On_Hold );
+ item.setLabel( "Putting all other calls on hold" );
+ items += item;
+
+ item.setIdentifier( SetupCall_Disconnect_Others );
+ item.setLabel( "Disconnecting all other calls" );
+ items += item;
+
+ item.setIdentifier( SetupCall_If_Not_Busy );
+ item.setLabel( "Only if not currently busy on another call" );
+ items += item;
+
+ item.setIdentifier( SetupCall_On_Hold_Not_allowed );
+ item.setLabel( "Call hold is not allowed" );
+ items += item;
+
+ item.setIdentifier( SetupCall_Max_Dialing_Number );
+ item.setLabel( "Max dialling number string, no alpha" );
+ items += item;
+
+ item.setIdentifier( SetupCall_Two_AID );
+ item.setLabel( "Two alpha identifiers" );
+ items += item;
+
+ item.setIdentifier( SetupCall_Basic_icon );
+ item.setLabel( "Basic icon" );
+ items += item;
+
+ item.setIdentifier( SetupCall_Self_basic_icon );
+ item.setLabel( "Self-explanatory basic icon" );
+ items += item;
+
+ item.setIdentifier( SetupCall_Basic_icon_during_call );
+ item.setLabel( "Icon during setup call" );
+ items += item;
+
+ cmd.setMenuItems( items );
+
+ command( cmd, this, SLOT(SetupCallMenu(QSimTerminalResponse)) );
+}
+
+void ConformanceSimApplication::SetupCallMenu( const QSimTerminalResponse& resp )
+{
+ QSimCommand cmd;
+
+ if ( resp.result() != QSimTerminalResponse::Success ) {
+ /* Unknown response - just go back to the main menu. */
+ endSession();
+
+ return;
+ }
+
+ /* Item selected. */
+ switch ( resp.menuItem() ) {
+ case SetupCall_Confirmed:
+ case SetupCall_If_Not_Busy:
+ case SetupCall_Rejected:
+ {
+ cmd.setType( QSimCommand::SetupCall );
+ cmd.setDestinationDevice( QSimCommand::Network );
+ cmd.setText( "Not busy" );
+ cmd.setNumber( "+012340123456p1p2" );
+ cmd.setDisposition( QSimCommand::IfNoOtherCalls );
+ command( cmd, this, SLOT(sendSetupCallMenu()) );
+ }
+ break;
+
+ case SetupCall_Long_AID:
+ {
+ cmd.setType( QSimCommand::SetupCall );
+ cmd.setDestinationDevice( QSimCommand::Network );
+ cmd.setText( "Three types are defined: - set up a call, but only "
+ "if not currently busy on another call; - set up a call"
+ ", putting all other calls (if any) on hold; - set up a"
+ " call, disconnecting all other calls (if any) first."
+ " For each of these types," );
+ cmd.setNumber( "+01" );
+ cmd.setDisposition( QSimCommand::IfNoOtherCalls );
+ command( cmd, this, SLOT(sendSetupCallMenu()) );
+ }
+ break;
+
+ case SetupCall_Subaddress_Not_Supported:
+ {
+ cmd.setType( QSimCommand::SetupCall );
+ cmd.setDestinationDevice( QSimCommand::Network );
+ cmd.setText( "Called party" );
+ cmd.setNumber( "+012340123456p1p2" );
+ cmd.setSubAddress ("9595959595");
+ cmd.setDisposition( QSimCommand::IfNoOtherCalls );
+ command( cmd, this, SLOT(sendSetupCallMenu()) );
+ }
+ break;
+
+ case SetupCall_Putting_On_Hold:
+ {
+ cmd.setType( QSimCommand::SetupCall );
+ cmd.setDestinationDevice( QSimCommand::Network );
+ cmd.setText( "On hold" );
+ cmd.setNumber( "+012340123456p1p2" );
+ cmd.setDisposition( QSimCommand::PutOnHold );
+ command( cmd, this, SLOT(sendSetupCallMenu()) );
+ }
+ break;
+
+ case SetupCall_On_Hold_Not_allowed:
+ {
+ cmd.setType( QSimCommand::SetupCall );
+ cmd.setDestinationDevice( QSimCommand::Network );
+ cmd.setText( "On hold" );
+ cmd.setNumber( "+0123401234" );
+ cmd.setDisposition( QSimCommand::PutOnHold );
+ command( cmd, this, SLOT(sendSetupCallMenu()) );
+ }
+ break;
+
+ case SetupCall_Disconnect_Others:
+ {
+ cmd.setType( QSimCommand::SetupCall );
+ cmd.setDestinationDevice( QSimCommand::Network );
+ cmd.setText( "Disconnect" );
+ cmd.setNumber( "+012340123456p1p2" );
+ cmd.setDisposition( QSimCommand::Disconnect );
+ command( cmd, this, SLOT(sendSetupCallMenu()) );
+ }
+ break;
+
+ case SetupCall_Max_Dialing_Number:
+ {
+ cmd.setType( QSimCommand::SetupCall );
+ cmd.setDestinationDevice( QSimCommand::Network );
+ cmd.setNumber( "+01234567890123456789012345678901" );
+ cmd.setDisposition( QSimCommand::Disconnect );
+ command( cmd, this, SLOT(sendSetupCallMenu()) );
+ }
+ break;
+
+ case SetupCall_Two_AID:
+ {
+ cmd.setType( QSimCommand::SetupCall );
+ cmd.setDestinationDevice( QSimCommand::Network );
+ cmd.setText( "CONFIRMATION" );
+ cmd.setOtherText( "CALL" );
+ cmd.setNumber( "+012340123456p1p2" );
+ cmd.setDisposition( QSimCommand::Disconnect );
+ command( cmd, this, SLOT(sendSetupCallMenu()) );
+ }
+ break;
+
+ case SetupCall_Basic_icon:
+ {
+ cmd.setType( QSimCommand::SetupCall );
+ cmd.setDestinationDevice( QSimCommand::Network );
+ cmd.setText( "Set up call Icon 3.1.1" );
+ cmd.setNumber( "+012340123456p1p2" );
+ cmd.setIconId( 1 );
+ cmd.setIconSelfExplanatory( false );
+ cmd.setDisposition( QSimCommand::IfNoOtherCalls );
+ command( cmd, this, SLOT(sendSetupCallMenu()) );
+ }
+ break;
+
+ case SetupCall_Self_basic_icon:
+ {
+ cmd.setType( QSimCommand::SetupCall );
+ cmd.setDestinationDevice( QSimCommand::Network );
+ cmd.setText( "Set up call Icon 3.2.1" );
+ cmd.setNumber( "+012340123456p1p2" );
+ cmd.setIconId( 1 );
+ cmd.setIconSelfExplanatory( true );
+ cmd.setDisposition( QSimCommand::IfNoOtherCalls );
+ command( cmd, this, SLOT(sendSetupCallMenu()) );
+ }
+ break;
+
+ case SetupCall_Basic_icon_during_call:
+ {
+ cmd.setType( QSimCommand::SetupCall );
+ cmd.setDestinationDevice( QSimCommand::Network );
+ cmd.setText( "Set up call Icon 3.4.1" );
+ cmd.setNumber( "+012340123456p1p2" );
+ cmd.setIconId( 1 );
+ cmd.setIconSelfExplanatory( true );
+ cmd.setOtherText( "Set up call Icon 3.4.2" );
+ cmd.setOtherIconId( 1 );
+ cmd.setOtherIconSelfExplanatory( true );
+ cmd.setDisposition( QSimCommand::IfNoOtherCalls );
+ command( cmd, this, SLOT(sendSetupCallMenu()) );
+ }
+ break;
+
+ default:
+ endSession();
+ break;
+ }
+}
diff --git a/src/simapplication.h b/src/simapplication.h
index 54ef103..f5b54b5 100644
--- a/src/simapplication.h
+++ b/src/simapplication.h
@@ -174,6 +174,8 @@ protected slots:
void sendGetInputNormalMenu();
void sendGetInputIconMenu();
void GetInputIconMenu( const QSimTerminalResponse& resp );
+ void sendSetupCallMenu();
+ void SetupCallMenu( const QSimTerminalResponse& resp );
};
#endif
--
1.7.9.5
8 years, 4 months
[PATCH v3 1/4] ussd: Recover idle state after a transaction error
by Philippe Nunes
The "USSD terminated by network" notification is handled to recover
the idle state in case of USSD transaction error.
---
src/ussd.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/ussd.c b/src/ussd.c
index 74888b2..a35f172 100644
--- a/src/ussd.c
+++ b/src/ussd.c
@@ -414,6 +414,18 @@ void ofono_ussd_notify(struct ofono_ussd *ussd, int status, int dcs,
return;
}
+ if (status == OFONO_USSD_STATUS_TERMINATED &&
+ (ussd->state == USSD_STATE_IDLE ||
+ ussd->state == USSD_STATE_USER_ACTION)) {
+ ussd_change_state(ussd, USSD_STATE_IDLE);
+
+ if (ussd->pending == NULL)
+ return;
+
+ reply = __ofono_error_failed(ussd->pending);
+ goto out;
+ }
+
if (status == OFONO_USSD_STATUS_NOT_SUPPORTED) {
ussd_change_state(ussd, USSD_STATE_IDLE);
--
1.7.9.5
8 years, 4 months
[PATCH 0/4] DTMF in dialing number
by Philippe Nunes
GCF test cases unveiled the following requirements not currently
supported by oFono:
- Dialing number provided by Setup Call can include a pause character
followed by a DTMF string.
I noticed that DTMFs concatenated to the dialing number are likely to be
handled directly by the modem. So, I suggest to include the pause character
as an acceptable digit in the phone number.
- Dialing number provided by Setup Call can be greater than 20 digits.
- AID shall not be displayed in case of self explanatory icon
As I'm not sure if it is intended to not take into account this icon qualifier
I just implemented a fix in stk.c
If you agree with this requirement, then we would need to check the icon
qualifier in each Stkagent method.
Philippe.
Philippe Nunes (4):
stk: convert to phone number format
common: Accept pause character in the dialing number
voicecall: Accept long phone number format for STK
stk: AID shall not be displayed in case of self explanatory icon
src/common.c | 2 +-
src/stk.c | 55 ++++++++++++++++++++++++++++++++++++++++---------------
src/voicecall.c | 2 +-
3 files changed, 42 insertions(+), 17 deletions(-)
--
1.7.9.5
8 years, 4 months
[PATCH 00/12] mmsd: (resending) Support Delivery Report notification
by Ronald Tessier
These patches concern mmsd and add delivery report notification support.
Add MMS M-Delivery.ind PDU decoding support.
Update meta file of the sent message to store the received msg_id and to add a
group [delivery_status] if delivery_report is requested.
Upon MMS M-Delivery.ind PDU reception, update delivery_status recipient entry
with the received status (this is described in doc/storage.txt) and signal the
new delivery_report status for the recipient concerned.
Modify the monitor_mms test script to add report_changed monitoring.
Update message-api.txt doc to describe new ReportChanged signal.
Ronald Tessier (12):
mmsutil: Define mms_delivery_ind struct
mmsutil: Decode delivery_ind msg
service: Store msg_id provided by M-Send.conf PDU
service: Move mms_address_to_string() up
service: Add a group [delivery_status] in the msg status
service: Support M-Delivery.ind in mms_service_push_notify()
service: Support delivery_ind notif on start
store: Define MMS_META_UUID_XXX len and suffix
service: Process delivery_ind notification
service: Send a delivery changed signal
test: Add ReportChanged to monitored signals
doc: Add ReportChanged signal description
doc/message-api.txt | 7 ++
src/mmsutil.c | 22 ++++-
src/mmsutil.h | 8 ++
src/service.c | 260 ++++++++++++++++++++++++++++++++++++++++++++++-----
src/store.c | 8 +-
src/store.h | 5 +
test/monitor-mms | 10 ++
7 files changed, 292 insertions(+), 28 deletions(-)
--
1.7.9.5
8 years, 4 months