throbber
/*
`+----------------------------------------------------------------
`------+
`| Copyright (c) 1996-1999 Vail Systems, Inc. All Rights
`Reserved |
`+----------------------------------------------------------------
`------+
`$Id: mc_vm.c,v 1.139 1999/12/31 16:30:12 alex Exp $
`+----------------------------------------------------------------
`------+
`*/
`****************************************************************
`************
` Module : mc_vm.c
` This module holds Webley application code.
` HISTORICAL INFORMATION:
` 10-04-96 Alex Kurganov:Vail Created
`*****************************************************************
`*************/
`#include <stdio.h>
`#include <stdlib.h>
`#include <string.h>
`#include <signal.h>
`#include <sys/types.h>
`#include <sys/timeb.h>
`#include <time.h>
`#include <dirent.h>
`#include <sys/wait.h>
`#include <sys/stat.h>
`#include <sys/ipc.h>
`#include <sys/msg.h>
`#include <fcntl.h>
`#include <memory.h>
`#include <setjmp.h>
`#include <unistd.h>
`#include <math.h>
`#include <errno.h>
`#include <sys/socket.h>
`#include <netinet/in.h>
`#include <netdb.h>
`#include <varargs.h>
`#include <sys/time.h>
`
`/*
`
`1
`
`Parus Exhibit 2025
`Google, et al. v. Parus Holdings, Inc.
`IPR2020-00846
`Page 1 of 295
`
`

`

`#include "vlib_scsa.h"
`#include "notif_scsa.h"
`#include "app_api.h"
`#include "mcall.h"
`#include "mc_conf.h"
`#include "mc_br_result.h"
`#include "webley_vocab.h"
`#include "app_lnhtts.h" /* internal TTS definitions */
`#undef DEBUG
`#define DEBUG(x) x
`#define MAX_LINE_LEN 101
`#define SOCKET int
`#define REM_SERV_VAR_LENGTH 512
`#define REM_SERV_NO_MAX 16
`#define SECONDS 20
`#define MX_HOST_NAME_SIZE 32
`#define MAXBUFFER 2*4096
`#define TEMPBUF 2*4096
`#define APACHE_PORT 80
`#define UNISERV_PORT 6666
`#define PORT_IN_USE UNISERV_PORT
`/* Confidence measures for Nuance 6.11 */
`#define GOOD_BYE_CONFIDENCE 400
`#define DELETE_CONFIDENCE 400
`#define NAME_CONFIDENCE 450
`SOCKET make_connection();
`char *GetConfigVar(char*, char*);
`/* This is the prefix for the */
`/* temporary recording file */
`#define REPEAT_PLAYMENU
`2
`#define MENU_POSITIONS
`5
`#define F_FORK_CHILD
`#define F_NO_FORK
`static char vr_buf[144];
`static char vr_tok[144];
`static int msgArc = 0;
`static int dSeen = 0;
`static int globalVRmode = 0;
`int SessionJobNumber = -1;
`static int confNum = -1;
`static char getMname_msg[128];
`static int scodeValid = 0;
`
`1
`0
`
`2
`
`Parus Exhibit 2025, Page 2 of 295
`
`

`

`static int classOfService = 0;
`int playFullFlag = 0;
`int playFullFaxFlag = 0;
`char *playList[MAX_MULTPLAY_LIST +1];
`int playListCnt = 0;
`int dialCnt = 0;
`extern int dFlag;
`extern int trunk_num;
`extern char app_path_name[];
`extern char app_name[];
`extern char app_home[];
`extern char msg_home[];
`extern char msg_host[];
`extern char *convertPhone();
`extern char *vr_convert();
`extern int vrAlloc();
`extern int vrDealloc();
`extern char *
`getFoundSubscriber();
`extern char
`getCreditWarn();
`extern double
`getPrepaidAmount();
`extern double
`getWarnThreshold();
`extern double getCreditLimit();
`extern double getStopThreshold();
`extern char
`getCreditWarn();
`extern char
`getCreditStop();
`extern char getIntlDial();
`extern int closeDBHandle();
`extern DESTINATION_S *callContact();
`extern char * getRandomResponse();
`extern DV_TPT rtptarr[MAX_TPTARR];
`extern int curr_rtpt;
`MESSAGE_S * recordWebleyMsg();
`LIST_S * getListByName();
`LIST_S * getList();
`int phoneSetup(MAILBOX_S *m, int type);
`int control_vr_timeout(struct VR_RES *vr_tokens);
`void trimMessage(char *fname, int sampRate, int *msgLength);
`extern int isOutbound();
`
`extern char * getResellerAccount();
`#ifdef PBELL_PERSONAL
` char mpack_module[] = "pacbellMpack.pl";
` char mpack_module_trans[] = "pacbellMpackTrans.pl";
`#else
` char mpack_module[] = "webleyMpack.pl";
` char mpack_module_trans[] = "webleyMpackTrans.pl";
`#endif
`/
`
`3
`
`Parus Exhibit 2025, Page 3 of 295
`
`

`

`* ---------------------------------------------------------------
`----------- */
`int setServiceClass(int servClass)
`{
`classOfService = servClass;
`return classOfService;
`
`}/*
`
` ---------------------------------------------------------------
`----------- */
`int getClassOfService()
`{
`return classOfService;
`
`}/*
`
` ---------------------------------------------------------------
`----------- */
`int getScode()
`{
`/* return scodeValid; */
`return 1;
`
`}/*
`
` ---------------------------------------------------------------
`----------- */
`int callingFromBase(MAILBOX_S *m)
`ESTINATION_S *cd;
`if ( m ) {
` cd = checkDestination(m, getCallerPhone(),
`MC_PERSONAL_GROUP);
`if (!cd)
`return R_FALSE;
`switch(cd->dType) {
`case MC_HOME_TYPE :
`case MC_OFFICE_TYPE :
`case MC_MOBILE_TYPE :
`case MC_CELL_TYPE :
`return R_TRUE;
`
`{D
`
`}
`eturn R_FALSE;
`
`}r
`
`}/*
`
`}/
`
` ---------------------------------------------------------------
`----------- */
`int setMsgArc(arc)
`{
`msgArc = arc;
`return R_TRUE;
`
`4
`
`Parus Exhibit 2025, Page 4 of 295
`
`

`

`* ---------------------------------------------------------------
`----------- */
`int getMsgArc()
`{
`return msgArc;
`
`}/*
`
` ---------------------------------------------------------------
`----------- */
`/* This routine is used to disable DTMF interrupts for conference
`on the fly
`* on an inbound side when a subscriber calling another
`subscriber
`*/
`int talkingToSubscriber(char *mode)
`tatic int talkSubFlag = 0;
`if (!strcmp(mode, "set"))
`talkSubFlag = 1;
`else if (!strcmp(mode, "clear"))
`talkSubFlag = 0;
`return talkSubFlag;
`
`{s
`
`}/*
`
` ---------------------------------------------------------------
`----------- */
`int isName(char *name)
` register int i, len;
` if (!name || !*name )
`return 0;
` len = strlen(name);
` for (i = 0; i < len; i++) {
`if (!isdigit(name[i]) )
`/* it looks like name, not a speed-dial code */
`return 1;
` }
` return(0);
`
`{
`
`}/*
`
` ---------------------------------------------------------------
`----------- */
`char * getAssistantNoReplyAddress()
`ifdef PBELL_PERSONAL
` return "no_reply@pacbell-pa.com";
`#else
` if (!strcmp((char *)getResellerAccount(), "5800" ))
` return "no_reply@opusassistant.com";
` else
` return "no_reply@webley.com";
`
`{#
`
`5
`
`Parus Exhibit 2025, Page 5 of 295
`
`

`

`#endif
`
`}/*
`
` ---------------------------------------------------------------
`----------- */
`char * getAssistantName()
`ifdef PBELL_PERSONAL
` return "PB Assistant";
`#else
` if (!strcmp((char *)getResellerAccount(), "5800" ))
` return "Opus";
` if (getVoicePerson() == 1)
` return "Copper";
` else
` return "Webley";
`#endif
`
`{#
`
`}/*
`
`{#
`
` ---------------------------------------------------------------
`----------- */
`int getBrandCode()
`ifdef PBELL_PERSONAL
` return 2;
`#else
` if (!strcmp((char *)getResellerAccount(), "5800" ))
` return 1;
` /* the rest are webley brands */
` return 0;
`#endif
`
`}/*
`
` ---------------------------------------------------------------
`----------- */
`int sendUpdateDestination(m, pd, ph)
`MAILBOX_S *m;
`DESTINATION_S *pd;
`char *ph;
`{
`
`if (!pd)
`return R_FALSE;
`if ( strlen(ph) < 10 || !strncmp(ph, "9999", 4) )
`return R_FALSE;
` if ( pd->dData ) {
`if ( !strcmp(ph, pd->dData) )
`return R_TRUE;
` pd->updateFlag = MX_UPDATE_DEST;
` free(pd->dData);
` }
`
`6
`
`Parus Exhibit 2025, Page 6 of 295
`
`

`

` else
` pd->updateFlag = MX_CREATE_DEST;
` pd->dData = strdup(ph);
` DEBUG(printf("<%d>Changing current dest %s for
`mbox <%s>\n",
` trunk_num, pd->dData, m->
`mbox));
` UpdateDestination(m, pd);
` return R_TRUE;
`
`}/*
`
`{
`
` ---------------------------------------------------------------
`----------- */
`char *toLower(char *s)
` char *p;
` for (p = s; *p; p++) {
` *p = tolower(*p);
` };
` return s;
`
`}/*
`
` ---------------------------------------------------------------
`----------- */
`char *lCase(char *s)
`* convert names to lower case after the first letter */
`char *p;
`for (p = s; *p; p++) {
`if ( p == s )
`*p = toupper(*p);
`else
`*p = tolower(*p);
`
`{/
`
`};
`return s;
`
`}/*
`
` ---------------------------------------------------------------
`----------- */
`char *clearDName(nm, scratch)
`char *nm;
`char *scratch;
`{
`register int i, j, len;
`len = strlen(nm);
`for(i = 0, j =0; nm[j]; j++ ) {
`if ( isalnum(nm[j]) )
`scratch[i++] = toupper(nm[j]);
`cratch[i] = 0;
`return scratch;
`
`}s
`
`7
`
`Parus Exhibit 2025, Page 7 of 295
`
`

`

`}/*
`
` ---------------------------------------------------------------
`----------- */
`int getDestinationByName(m, name, group, class, dp)
`MAILBOX_S *m;
`char *name;
`int group;
`int class;
`int *dp;
`egister int i, j = 0;
`char cn[80], s[80];
` if (!name || ! *name )
` return NULL;
` clearDName(name, s);
` for (i = 0; i < m->destCnt; i++ ) {
` if ( m->dest[i] && isMyClass( m->dest[i]->
`dClass, class ) &&
` m->dest[i]->dGroup == group ) {
` DEBUG(printf("<%d>Check contact <%s> vs <%
`s>\n",
` trunk_num, m->dest[i]->dName,
`s));
` if ( toupper(*m->dest[i]->dName) ==
`toupper(*name) ) {
` clearDName(m->dest[i]->dName,
`cn);
` DEBUG(printf("<%d>Contact <%s> vs <%
`s>\n",
` trunk_num, cn, s));
` if ( !strcmp(cn, s) ) {
`dp[j++] = i;
`
`DEBUG(printf("<%d>\tCompared <%
`s> and <%s>\n",
` trunk_num, m->dest[i]->
`dName,name));
` }
` }
` }
` }
` return j;
`
`{r
`
`}/*
`
` ---------------------------------------------------------------
`----------- */
`int updateLists(m)
`MAILBOX_S *m;
`{
`
`8
`
`Parus Exhibit 2025, Page 8 of 295
`
`

`

`register int i;
`time_t cur_time;
` if (!m)
` return R_FAILURE;
` cur_time = time(NULL);
` for (i = 0; i < m->listCnt; i++ ) {
` m->lst[i]->lastTstamp = cur_time;
`}
` return R_TRUE;
`
`}/*
`
`{r
`
` ---------------------------------------------------------------
`----------- */
`int checkLists(m)
`MAILBOX_S *m;
`egister int i, prev = 0;
` if (!m)
` return R_FAILURE;
` for (i = 0; i < m->listCnt; i++ ) {
` if ( m->lst[i] ) {
` if ( !m->lst[i]->lastTstamp )
` return R_TRUE;
` if ( !prev )
` prev = m->lst[i]->
`lastTstamp;
` else if ( prev != m->lst[i]->
`lastTstamp )
` return R_TRUE;
` }
` }
` return R_FALSE;
`
`}/*
`
` ---------------------------------------------------------------
`----------- */
`int updateContacts(m)
`MAILBOX_S *m;
`egister int i, prev = 0;
`time_t cur_time;
` if (!m)
` return R_FAILURE;
`cur_time = time(NULL);
` for (i = 0; i < m->destCnt; i++ ) {
` if ( m->dest[i] &&
`
`{r
`
`9
`
`Parus Exhibit 2025, Page 9 of 295
`
`

`

` m->dest[i]->dGroup ==
`MC_CONTACT_GROUP ) {
` m->dest[i]->lastTstamp = cur_time;
` }
` }
` return R_TRUE;
`
`}/*
`
`{r
`
` ---------------------------------------------------------------
`----------- */
`int checkContacts(m)
`MAILBOX_S *m;
`egister int i, prev = 0;
`if (!m)
`return R_FAILURE;
` for (i = 0; i < m->destCnt; i++ ) {
` if ( m->dest[i] &&
` m->dest[i]->dGroup ==
`MC_CONTACT_GROUP ) {
` if ( !m->dest[i]->lastTstamp )
` return R_TRUE;
` if ( !prev )
`prev = m->dest[i]->
`lastTstamp;
` else if ( prev != m->dest[i]->
`lastTstamp )
` return R_TRUE;
` }
` }
` return R_FALSE;
`
`}/*
`
` ---------------------------------------------------------------
`----------- */
`int markContactsForRecompile(m)
`MAILBOX_S *m;
`egister int i, prev = 0;
` if (!m)
` return R_FAILURE;
` for (i = 0; i < m->destCnt; i++ ) {
` if ( m->dest[i] &&
` m->dest[i]->dGroup ==
`MC_CONTACT_GROUP ) {
` m->dest[i]->lastTstamp = 0;
` return R_TRUE;
` }
`
`{r
`
`10
`
`Parus Exhibit 2025, Page 10 of 295
`
`

`

` }
` return R_FALSE;
`
`}/*
`
` ---------------------------------------------------------------
`----------- */
`DESTINATION_S *checkDestination(m, ph, group)
`MAILBOX_S *m;
`char *ph;
`int group;
`egister int i;
`if (!ph || strlen(ph) < 10)
`return NULL;
` for (i = 0; i < m->destCnt; i++ ) {
` if ( m->dest[i] && m->dest[i]->dClass ==
`MC_PHONE_CLASS &&
` m->dest[i]->dGroup == group ) {
` if ( !strcmp(m->dest[i]->dData,
`ph ) )
` return m->dest[i];
` }
` }
`return NULL;
`
`{r
`
`}/*
`
` ---------------------------------------------------------------
`----------- */
`int startFollowMe(m, pd, askFlag )
`MAILBOX_S *m;
`DESTINATION_S *pd;
`int askFlag;
`ESTINATION_S *cd = NULL;
`char curPhone[MAX_BUF_SIZE + 1];
`char ext[MAX_BUF_SIZE + 1];
`int rp;
`register int i, ret_val;
` sprintf(curPhone, getCallerPhone());
` m->updateMask |= MX_FOLLOW;
` if ( strlen(curPhone) == PHONE_NUM_SIZE &&
`strncmp(curPhone, "9999", 4)) {
`cd = checkDestination(m, curPhone, MC_PERSONAL_GROUP);
` /*-->vp_you_followed
` *--> Your calls will follow you to ...
` */
` play_prompt(vp_you_followed);
` if (cd && cd->dType == MC_HOME_TYPE )
` play_prompt(v_home);
` else if (cd && cd->dType == MC_OFFICE_TYPE )
`
`{D
`
`11
`
`Parus Exhibit 2025, Page 11 of 295
`
`

`

` play_prompt(v_office);
` else if (cd && cd->dType == MC_MOBILE_TYPE )
` play_prompt(v_mobile);
` else if (cd && cd->dType == MC_CELL_TYPE )
` play_prompt(v_cell);
` else {
` rp = play_string(curPhone);
`if (rp == TR_LOOP )
`call_exit();
`p = R_FALSE;
`if ( vr_yes_no(vp_is_this_ok, 0, &rp) == R_TRUE ) {
` ret_val = sendUpdateDestination(m,pd,curPhone);
`if ( ret_val == R_TRUE) {
`m->followFlag = time(0);
`lay_prompt(vp_done);
`return R_TRUE;
`lse if ( rp == MD_WEBLEY || rp == MD_CANCEL )
`return R_FALSE;
` else if (rp == TR_LOOP)
` call_exit();
`else if ( askFlag == R_FALSE )
`return R_TRUE;
`}
` /*--> vp_need_current
` *-->I need to know your current phone number
` */
` play_prompt(vp_need_current);
` *curPhone = 0;
` ret_val = getFullPhone(curPhone, &rp, NULL,
`vp_pardon_phone );
`if (ret_val == TR_LOOP )
`call_exit();
` if ( ret_val != R_TRUE || strlen(curPhone)
`< PHONE_NUM_SIZE) {
` if (ret_val == FORGET_IT )
` return R_FALSE;
` if ( !strstr(curPhone, "CANCEL" ) ) {
` play_prompt(vp_incorrect_phone);
` }
`play_prompt(v_cancelled);
`ret_val = R_TRUE;
` }
` else {
`rp = R_FALSE;
` if ( vr_yes_no(vp_need_ext, 1, &rp) != R_TRUE ) {
`if (rp == MD_CANCEL || rp == MD_WEBLEY )
`return R_FALSE;
`
`}e
`
`}p
`
`}r
`
`12
`
`Parus Exhibit 2025, Page 12 of 295
`
`

`

` else if (rp == TR_LOOP)
` call_exit();
`play_prompt(vp_no_problem);
`lse {
` if ((rp = getExtension(m, 0,
`ext)) ==
` R_TRUE ) {
` if (strstr(ext, "cancel")
`||
` strstr(ext,
`"CANCEL" ))
` {
` return R_FALSE;
` }
` ret_val =
`play_string(ext);
` if (ret_val == TR_LOOP )
` call_exit();
` play_prompt(vp_done);
` strcat(curPhone,"x");
`strncat(curPhone,ext,MAX_BUF_SIZE);
` curPhone[MAX_BUF_SIZE] =
`0;
` }
` else if (rp == FORGET_IT ) {
` return R_FALSE;
`}
` else {
` if (strstr(ext, "cancel")
`||
` strstr(ext,
`"CANCEL" ))
` return R_FALSE;
` play_prompt(v_invalid);
` return R_FALSE;
` }
` }
` ret_val = sendUpdateDestination(m,pd,curPhone);
`if ( ret_val == R_TRUE)
` m->followFlag = time(0);
`eturn R_FALSE;
`
`}r
`
`}e
`
`}/*
`
` ---------------------------------------------------------------
`----------- */
`int checkAvailability(MAILBOX_S *m, char *tphone)
`egister int dest;
`DESTINATION_S *pd;
`
`{r
`
`13
`
`Parus Exhibit 2025, Page 13 of 295
`
`

`

` FindException(m);
` checkTransferExceptions(m);
` if (!m || !tphone )
`return -1;
` switch(m->avail) {
` case NOT_AVAIL:
`return -1;
` case AVAIL_GROUP:
`dest = MC_OFFICE_TYPE;
` break;
` case AVAIL_OFFICE:
`dest = MC_OFFICE_TYPE;
` break;
` case AVAIL_HOME:
`dest = MC_HOME_TYPE;
` break;
` case AVAIL_MOBILE:
`dest = MC_MOBILE_TYPE;
`break;
` case AVAIL_CELL:
`dest = MC_CELL_TYPE;
`break;
` case AVAIL_OPERATOR:
`dest = MC_OPERATOR_TYPE;
`break;
` case AVAIL_FOLLOW:
`dest = MC_FOLLOW_TYPE;
`break;
` default:
`return -1;
`}
` pd = findDestination(m, MC_PHONE_CLASS,
`MC_PERSONAL_GROUP, dest );
`if (pd && pd->dData && *pd->dData) {
`strncpy(tphone, pd->dData, 64);
`tphone[64] = 0;
`return dest;
`eturn -1;
`
`}r
`
`}/*
`
` ---------------------------------------------------------------
`----------- */
`int sayAvailabilityBargeIn(MAILBOX_S *m, DESTINATION_S *pd)
`egister int ret_val, andFlag = 0;
`DESTINATION_S *cd;
`char mpath[MAX_STRING_SIZE + 1];
`int ms = 0;
`
`{r
`
`14
`
`Parus Exhibit 2025, Page 14 of 295
`
`

`

`sprintf(mpath, "%s/vox/", app_home );
`ms = strlen(mpath);
`/*
`*--> v_your_avail:
`*--> Your incoming calls are transfered to ...
`*/
`if (m->avail == AVAIL_FOLLOW)
`play_prompt(v_your_avail);
`else
`playList[playListCnt++] =
`strdup(processPrompt(v_your_avail) + ms);
`if (m->avail == AVAIL_HOME )
`/*
`*--> v_home: your home phone number
`*/
`playList[playListCnt++] = strdup(processPrompt(v_home)
`
`{
`+ ms);
`
`}e
`
`}e
`
`lse if (m->avail == AVAIL_OFFICE)
`/*
`*--> v_office: your office phone number
`*/
`{
`playList[playListCnt++] =
`strdup(processPrompt(v_office) + ms);
`lse if (m->avail == AVAIL_MOBILE)
`/*
`*--> v_mobile: your mobile phone number
`*/
`{
`playList[playListCnt++] =
`strdup(processPrompt(v_mobile) + ms);
`lse if (m->avail == AVAIL_CELL)
`/*
`*--> v_cell: your cellular phone number
`*/
`playList[playListCnt++] = strdup(processPrompt(v_cell)
`
`}e
`
`{
`+ ms);
`
`}e
`
`lse if (m->avail == AVAIL_FOLLOW) {
` if (!pd ) {
` cd = findDestination(m, MC_PHONE_CLASS,
` MC_PERSONAL_GROUP,
`
`15
`
`Parus Exhibit 2025, Page 15 of 295
`
`

`

`MC_FOLLOW_TYPE);
` if (cd && cd->dData)
` if (play_string(cd->dData) ==
`TR_LOOP)
`call_exit();
` }
` else if (pd->dData)
` ret_val = play_string(pd->dData);
` else
` ret_val = play_prompt(v_follow);
`if (ret_val == TR_LOOP)
`call_exit();
`
`}
` else if (m->avail == AVAIL_OPERATOR)
` /*
` *--> v_operator: your operator phone number
` */
`{
`playList[playListCnt++] =
`strdup(processPrompt(v_operator) + ms);
`lse if (m->avail == NOT_AVAIL)
`/*
`*--> v_vmail: your voice mail
`*/
`{
`playList[playListCnt++] =
`strdup(processPrompt(v_vmail) + ms);
`lse if ( m->avail == AVAIL_GROUP ) {
` if ( strchr(m->xgroup,'o') ) {
`playList[playListCnt++] =
`strdup(processPrompt(v_office) + ms);
`andFlag++;
`}
` if ( strchr(m->xgroup,'c') ) {
`if ( andFlag )
`playList[playListCnt++] =
` strdup(processPrompt(vp_and) + ms);
`playList[playListCnt++] =
`strdup(processPrompt(v_cell) + ms);
`andFlag++;
`}
` if ( strchr(m->xgroup,'h') ) {
`if ( andFlag )
`playList[playListCnt++] =
` strdup(processPrompt(vp_and) + ms);
`playList[playListCnt++] =
`strdup(processPrompt(v_home) + ms);
`andFlag++;
`
`}e
`
`}e
`
`16
`
`Parus Exhibit 2025, Page 16 of 295
`
`

`

`}
` if ( strchr(m->xgroup,'m') ) {
`if ( andFlag )
`playList[playListCnt++] =
` strdup(processPrompt(vp_and) + ms);
`playList[playListCnt++] =
`strdup(processPrompt(v_mobile) + ms);
`andFlag++;
`}
` if ( strchr(m->xgroup,'f') ) {
`if ( andFlag )
`playList[playListCnt++] =
` strdup(processPrompt(vp_and) + ms);
`playList[playListCnt++] =
`strdup(processPrompt(v_follow) + ms);
`f ( !andFlag ) {
`/* wrong call blast data switch to voicemail */
`m->avail = NOT_AVAIL;
` m->availTstamp = time(0);
` m->updateMask |= MX_AVAIL;
` /*
`*--> v_vmail: your voice mail
`*/
`playList[playListCnt++] =
`strdup(processPrompt(v_vmail) + ms);
`
`}i
`
`}
`eturn playListCnt;
`
`}r
`
`}/*
`
` ---------------------------------------------------------------
`----------- */
`int sayAvailability(MAILBOX_S *m, DESTINATION_S *pd) // alexg
`081899
`{
`return sayAvailability_1(m,pd,NULL);
`
`}/*
`
` ---------------------------------------------------------------
`----------- */
`int sayAvailability_1(MAILBOX_S *m, DESTINATION_S *pd, char
`*message) // alexg 081899
`egister int ret_val, andFlag = 0;
`DESTINATION_S *cd;
`/*
`*--> v_your_avail:
`*--> Your incoming calls are transfered to ...
`*/
`char *msg = v_your_avail;
`
`{r
`
`17
`
`Parus Exhibit 2025, Page 17 of 295
`
`

`

`if (message)
`msg = message;
`ret_val = play_prompt(msg);
`if (m->avail == AVAIL_HOME )
`/*
`*--> v_home: your home phone number
`*/
`ret_val = play_prompt(v_home);
`else if (m->avail == AVAIL_OFFICE)
`/*
`*--> v_office: your office phone number
`*/
`ret_val = play_prompt(v_office);
`else if (m->avail == AVAIL_MOBILE)
`/*
`*--> v_mobile: your mobile phone number
`*/
`ret_val = play_prompt(v_mobile);
`else if (m->avail == AVAIL_CELL)
`/*
`*--> v_cell: your cellular phone number
`*/
`ret_val = play_prompt(v_cell);
`else if (m->avail == AVAIL_FOLLOW) {
` if (!pd ) {
` cd = findDestination(m, MC_PHONE_CLASS,
` MC_PERSONAL_GROUP,
`MC_FOLLOW_TYPE);
`if (cd && cd->dData)
` if (play_string(cd->dData) ==
`TR_LOOP)
` call_exit();
`lse if (pd->dData)
`ret_val = play_string(pd->dData);
`else
` ret_val = play_prompt(v_follow);
`if (ret_val == TR_LOOP)
`call_exit();
`}
` else if (m->avail == AVAIL_OPERATOR)
` /*
` *--> v_operator: your operator phone number
` */
` ret_val = play_prompt(v_operator);
`else if (m->avail == NOT_AVAIL)
`/*
`*--> v_vmail: your voice mail
`*/
`
`}e
`
`18
`
`Parus Exhibit 2025, Page 18 of 295
`
`

`

`ret_val = play_prompt(v_vmail);
`else if ( m->avail == AVAIL_GROUP ) {
` if ( strchr(m->xgroup,'o') ) {
`play_prompt(v_office);
`andFlag++;
`}
` if ( strchr(m->xgroup,'c') ) {
`if ( andFlag )
` play_prompt(vp_and);
`play_prompt(v_cell);
`andFlag++;
`}
` if ( strchr(m->xgroup,'h') ) {
`if ( andFlag )
` play_prompt(vp_and);
`play_prompt(v_home);
`andFlag++;
`}
` if ( strchr(m->xgroup,'m') ) {
`if ( andFlag )
` play_prompt(vp_and);
`play_prompt(v_mobile);
`andFlag++;
`}
` if ( strchr(m->xgroup,'f') ) {
`if ( andFlag )
` play_prompt(vp_and);
`play_prompt(v_follow);
`f ( !andFlag ) {
`/* wrong call blast data switch to voicemail */
`m->avail = NOT_AVAIL;
` m->availTstamp = time(0);
` m->updateMask |= MX_AVAIL;
` /*
`*--> v_vmail: your voice mail
`*/
` ret_val = play_prompt(v_vmail);
`}
`eturn ret_val;
`
`}i
`
`}r
`
`}/*
`
` ---------------------------------------------------------------
`----------- */
`int setVRmode(int vr_mode)
`{
`globalVRmode = vr_mode;
`return globalVRmode;
`
`}/
`
`19
`
`Parus Exhibit 2025, Page 19 of 295
`
`

`

`* ---------------------------------------------------------------
`----------- */
`int getVRmode()
`{
`return globalVRmode;
`
`}/*
`
` ---------------------------------------------------------------
`----------- */
`int set_personal_options(MAILBOX_S *m)
`egister int status = R_FALSE, retries = 2, ret_val = R_TRUE;
`int rp, cmdCode;
`char *message, *pt;
` while (retries-- && ret_val != FORGET_IT) {
`if (status != R_TRUE)
` /*--> vp_persopt_cmds:
` *--> say:
` *--> change security code,
` *--> change name recording,
` *--> change personal greeting,
` *--> change message notification,
` *--> change call screening,
` *--> or cancel
`*/
`#ifdef PBELL_PERSONAL
`message = vp_pb_persopt_cmds;
`#else
`message = vp_persopt_cmds;
`#endif
`else
` /*--> vp_persopt_menu:
` *--> Which personal option would you like to change
` */
`message = vp_persopt_menu;
` pt = vr_token[0].vr_tokens;
` *vr_token[0].vr_tokens = 0;
` *vr_token[1].vr_tokens = 0;
` rp = TR_MAXDG;
` ret_val = vrContPSP(message,
`&rp,"admenu",dFlag,vr_token,-1,getVRmode());
`status = ret_val;
` if (ret_val == R_FAILURE)
` return ret_val;
` else if ( ret_val == TR_LOOP ) {
`call_exit();
`}
` else if ( ret_val == R_TRUE ) {
`if ( rp == TR_MAXDG || rp == TR_TERMDG ) {
` if (*pt == FORGET_IT)
`
`{r
`
`20
`
`Parus Exhibit 2025, Page 20 of 295
`
`

`

` return FORGET_IT;
` cmdCode = readCmdCode(1, 2);
` if ( cmdCode >= 0 )
` cmdCode = (*pt - '0') * 10
`+ cmdCode;
`else
` return FORGET_IT;
` }
` else if (isdigit(*vr_token[0].vr_tags) )
` cmdCode = atoi(vr_token[0].vr_tags);
` if (cmdCode == MD_WEBLEY )
` {
` play_prompt(vp_to_main_menu);
` return FORGET_IT;
` }
` else if (cmdCode == MD_CANCEL )
`{
`play_prompt(v_cancelled);
` return FORGET_IT;
`}
` else if (cmdCode == MD_CHANGE_PNUMBERS) {
` retries = MENU_CHOICE_RETRIES;
` ret_val = change_phone(m, -1);
` }
` else if (cmdCode == MD_CHANGE_SCODE) {
` retries = MENU_CHOICE_RETRIES;
` ret_val = change_seccode(m);
` }
` else if (cmdCode == MD_CHANGE_GREET) {
` retries = MENU_CHOICE_RETRIES;
` ret_val = change_name_pgreet(m, 1);
` }
` else if (cmdCode == MD_CHANGE_SCREEN) {
` retries = MENU_CHOICE_RETRIES;
` ret_val = change_call_screening(m);
` }
` else if (cmdCode == MD_CHANGE_NAME) {
` retries = MENU_CHOICE_RETRIES;
` ret_val = change_name_pgreet(m, 0);
` }
` else if (cmdCode == MD_CHANGE_NOTIF) {
` retries = MENU_CHOICE_RETRIES;
` ret_val = change_notif_type(m, -1, 0);
` }
` else if (cmdCode == MD_CHANGE_VOICE) {
` retries = MENU_CHOICE_RETRIES;
` ret_val = change_voice(m);
` }
`#ifdef PBELL_PERSONAL
` else if (cmdCode == MD_CHANGE_CALLING_CARD) {
` retries = MENU_CHOICE_RETRIES;
`
`21
`
`Parus Exhibit 2025, Page 21 of 295
`
`

`

` ret_val = change_calling_card(m);
` }
`#endif
` else if (cmdCode == MD_OPTIONS) {
` retries = MENU_CHOICE_RETRIES;
` status = R_FALSE;
` }
`
`else if (cmdCode == MD_CURRENT_TIME ) {
` play_current_time(m,0);
`
`}
` else if (cmdCode == MD_WAIT_A_MOMENT) {
` if (waitAminute(m) == TR_LOOP )
`call_exit();
` retries = MENU_CHOICE_RETRIES;
`}
` else if (cmdCode == MD_HOLD ) {
` if (putOnHold(m) == TR_LOOP )
`call_exit();
` retries = MENU_CHOICE_RETRIES;
`}
` else if (cmdCode == MD_GOODBYE ) {
` if ( vr_token[0].confidence >=
`GOOD_BYE_CONFIDENCE ) {
` play_prompt_protected(v_bye);
` call_exit();
` }
`}
`
`}
` }
` return(ret_val);
`
`} /*
`
` ---------------------------------------------------------------
`----------- */
`int setupCallBlast( MAILBOX_S* m, DESTINATION_S* pd )
` int bad = 0, rc = R_FALSE;
` char dests[10] = {0};
` int i = 0, rp = R_FALSE;
` DESTINATION_S *cd;
`#define _( prompt, code )\
` if( i ) play_prompt(vp_and);\
` play_prompt( v_##prompt );\
` rp = R_FALSE;\
` if( vr_yes_no(vp_is_this_ok, 0, &rp) == R_TRUE ) dests[i++] =
`code;\
` if (rp == MD_CANCEL || rp == MD_WEBLEY || i >= MAX_BLAST_NUM )
`break;\
`
`{
`
`22
`
`Parus Exhibit 2025, Page 22 of 295
`
`

`

` else if (rp == TR_LOOP) call_exit();
` play_prompt(vp_i_will_xfer);
` do {
` cd = findDestination(m,MC_PHONE_CLASS, MC_PERSONAL_GROUP,
`MC_OFFICE_TYPE);
` if ( cd && isdigit(*cd->dData) && strlen(cd->dData) >=
`PHONE_NUM_SIZE)
` {
`_( office, 'o' );
`bad = 0;
` }
` else
`bad = 1;
` cd = findDestination(m,MC_PHONE_CLASS, MC_PERSONAL_GROUP,
`MC_CELL_TYPE);
` if ( cd && isdigit(*cd->dData) && strlen(cd->dData) >=
`PHONE_NUM_SIZE)
` {
`_( cell, 'c' );
`bad = 0;
` }
` else
` bad = 1;
` cd = findDestination(m,MC_PHONE_CLASS, MC_PERSONAL_GROUP,
`MC_HOME_TYPE);
` if ( cd && isdigit(*cd->dData) && strlen(cd->dData) >=
`PHONE_NUM_SIZE)
` {
`_( home, 'h' );
`bad = 0;
` }
` else
` bad = 1;
` cd = findDestination(m,MC_PHONE_CLASS, MC_PERSONAL_GROUP,
`MC_MOBILE_TYPE);
` if ( cd && isdigit(*cd->dData) && strlen(cd->dData) >=
`PHONE_NUM_SIZE)
` {
`_( mobile, 'm' );
`bad = 0;
` }
` else
` bad = 1;
` cd = findDestination(m,MC_PHONE_CLASS, MC_PERSONAL_GROUP,
`MC_FOLLOW_TYPE);
` if ( cd && isdigit(*cd->dData) && strlen(cd->dData) >=
`PHONE_NUM_SIZE)
` {
`_( follow, 'f' );
`bad = 0;
` }
` else
`
`23
`
`Parus Exhibit 2025, Page 23 of 295
`
`

`

` bad = 1;
` } while(0);
` if (rp == MD_CANCEL || rp == MD_WEBLEY )
`return rp;
` if( i ) {
` rc = R_TRUE;
` if( m->xgroup ) free( m->xgroup );
` m->xgroup = strdup( dests );
` m->updateMask |= MX_XGROUP;
` }
` else {
` rc = R_FALSE;
` if (bad) {
`play_prompt(vp_call_blast);
`play_prompt(vp_is_navail);
`
` }
` }
` return rc;
`#undef _
`
`} /*
`
` ---------------------------------------------------------------
`----------- */
`int getConfOption(MAILBOX_S *m)
`egister int ret_val = R_FALSE, ret;
`int retries = 2, rp, status;
`int cmdCode = -1;
`char *lexBuf;
` /*--> vp_conf_menu2:
` *--> say:
` *--> add a party,
` *--> return to conference,
` *--> disconnect party,
` *--> end the conference
` */
` lexBuf = "callconf";
` while (retries-- ) {
` *vr_token[0].vr_tokens = 0;
` *vr_token[1].vr_tokens = 0;
` rp = TR_MAXDG;
` ret_val = vrContPSP(vp_conf_menu2,&rp,lexBuf, dFlag,
`vr_token,-1,getVRmode());
` status = ret_val;
` if (ret_val == R_FAILURE)
` return ret_val;
` else if ( ret_val == TR_LOOP ) {
`/*
`Terminate conference ? */
` return ret_val;
` }
`
`{r
`
`24
`
`Parus Exhibit 2025, Page 24 of 295
`
`

`

` else if ( ret_val == R_TRUE ) {
` if ( rp == TR_MAXDG || rp == TR_TERMDG ) {
` if ( *vr_token[0].vr_tokens ==
`FORGET_IT ) {
` return MX_CONF_LEAVE;
` }
` cmdCode = atoi(vr_token[0].vr_tokens);
`

This document is available on Docket Alarm but you must sign up to view it.


Or .

Accessing this document will incur an additional charge of $.

After purchase, you can access this document again without charge.

Accept $ Charge
throbber

Still Working On It

This document is taking longer than usual to download. This can happen if we need to contact the court directly to obtain the document and their servers are running slowly.

Give it another minute or two to complete, and then try the refresh button.

throbber

A few More Minutes ... Still Working

It can take up to 5 minutes for us to download a document if the court servers are running slowly.

Thank you for your continued patience.

This document could not be displayed.

We could not find this document within its docket. Please go back to the docket page and check the link. If that does not work, go back to the docket and refresh it to pull the newest information.

Your account does not support viewing this document.

You need a Paid Account to view this document. Click here to change your account type.

Your account does not support viewing this document.

Set your membership status to view this document.

With a Docket Alarm membership, you'll get a whole lot more, including:

  • Up-to-date information for this case.
  • Email alerts whenever there is an update.
  • Full text search for other cases.
  • Get email alerts whenever a new case matches your search.

Become a Member

One Moment Please

The filing “” is large (MB) and is being downloaded.

Please refresh this page in a few minutes to see if the filing has been downloaded. The filing will also be emailed to you when the download completes.

Your document is on its way!

If you do not receive the document in five minutes, contact support at support@docketalarm.com.

Sealed Document

We are unable to display this document, it may be under a court ordered seal.

If you have proper credentials to access the file, you may proceed directly to the court's system using your government issued username and password.


Access Government Site

We are redirecting you
to a mobile optimized page.





Document Unreadable or Corrupt

Refresh this Document
Go to the Docket

We are unable to display this document.

Refresh this Document
Go to the Docket