summaryrefslogtreecommitdiffstats
path: root/audio/headset.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2008-09-11 15:22:00 +0300
committerJohan Hedberg <johan.hedberg@nokia.com>2008-09-11 15:22:00 +0300
commitb8e38926181408cd9b2ea93aa6015aaeee2399b2 (patch)
treeb4d2ba6510cbb8b3b9abd7cde460e5594fb9a19a /audio/headset.c
parent0b3d10c5ef6262410e6799ee3e2037c4441b563d (diff)
Implement support for subscriber number request (AT+CNUM)
Diffstat (limited to 'audio/headset.c')
-rw-r--r--audio/headset.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/audio/headset.c b/audio/headset.c
index a7adffd9..f0eb0b7b 100644
--- a/audio/headset.c
+++ b/audio/headset.c
@@ -857,6 +857,18 @@ static int dtmf_tone(struct audio_device *device, const char *buf)
return headset_send(hs, "\r\nOK\n\r");
}
+static int subscriber_number(struct audio_device *device, const char *buf)
+{
+ struct headset *hs = device->headset;
+
+ if (telephony_subscriber_number_req() < 0) {
+ headset_send(hs, "\r\nERROR\r\n");
+ return 0;
+ }
+
+ return headset_send(hs, "\r\nOK\n\r");
+}
+
static struct event event_callbacks[] = {
{ "ATA", answer_call },
{ "ATD", dial_number },
@@ -871,6 +883,7 @@ static struct event event_callbacks[] = {
{ "AT+BTRH", response_and_hold },
{ "AT+BLDN", last_dialed_number },
{ "AT+VTS", dtmf_tone },
+ { "AT+CNUM", subscriber_number },
{ 0 }
};