core: handle incoming calls (RING/CRING, CLIP, NO CARRIER).

This commit is contained in:
Marco Bascetta
2015-05-05 18:00:09 +02:00
committed by Aleksander Morgado
parent c53bc10092
commit 6d85146bba
7 changed files with 258 additions and 9 deletions

View File

@@ -348,6 +348,32 @@ mm_voice_cring_regex_get (void)
NULL);
}
GRegex *
mm_voice_clip_regex_get (void)
{
/* Example:
* <CR><LF>+CLIP: "+393351391306",145,,,,0<CR><LF>
* \_ Number \_ Type \_ Validity
*/
return g_regex_new ("\\r\\n\\+CLIP:\\s*\"(\\S+)\",\\s*(\\d+),\\s*,\\s*,\\s*,\\s*(\\d+)\\r\\n",
G_REGEX_RAW | G_REGEX_OPTIMIZE,
0,
NULL);
}
GRegex *
mm_voice_nocarrier_regex_get (void)
{
/* Example:
* <CR><LF>NO CARRIER<CR><LF>
*/
return g_regex_new ("\\r\\n\\NO CARRIER\\r\\n",
G_REGEX_RAW | G_REGEX_OPTIMIZE,
0,
NULL);
}
GRegex *
mm_voice_dtmf_regex_get (void)
{