@@ -98,12 +98,17 @@ func (Server) HandleErrorForTwilio(rw http.ResponseWriter, rq *http.Request, err
98
98
// Prompts the user to enter a phone number (which may be on the list of
99
99
// resident phone numbers). The user is still moved onto the next step if
100
100
// they enter nothing.
101
- func (Server ) getPhoneInit (w http.ResponseWriter , r * http.Request ) (err error ) {
101
+ func (s * Server ) getPhoneInit (w http.ResponseWriter , r * http.Request ) (err error ) {
102
102
salutation , err := Salutation ()
103
103
if err != nil {
104
104
return
105
105
}
106
106
107
+ fmt .Println (
108
+ "Rcv call" ,
109
+ r .FormValue ("From" ),
110
+ )
111
+
107
112
doc , response := twiml .CreateDocument ()
108
113
gather := response .CreateElement ("Gather" )
109
114
gather .CreateAttr ("action" , "/phone/handleEntry" )
@@ -124,7 +129,7 @@ func (Server) getPhoneInit(w http.ResponseWriter, r *http.Request) (err error) {
124
129
return
125
130
}
126
131
127
- func (s Server ) GetPhoneInit (rw http.ResponseWriter , rq * http.Request ) {
132
+ func (s * Server ) GetPhoneInit (rw http.ResponseWriter , rq * http.Request ) {
128
133
err := s .getPhoneInit (rw , rq )
129
134
if err != nil {
130
135
s .HandleErrorForTwilio (rw , rq , err )
@@ -152,11 +157,14 @@ func (s *Server) handleEntryViaCode(w http.ResponseWriter, rq *http.Request, par
152
157
}
153
158
154
159
if ! success {
160
+ s .log .Printf ("Denied access via code entry: %+q is not a valid entry code." , digits )
155
161
return
156
162
}
157
163
164
+ s .log .Printf ("Allowed access via code entry: %+q" , digits )
165
+
158
166
doc , response := twiml .CreateDocument ()
159
- response .CreateElement ("Play" ).CreateAttr ("digits" , "9www9www9 " )
167
+ response .CreateElement ("Play" ).CreateAttr ("digits" , "9w9w9w9 " )
160
168
twiml , err := twiml .ToXML (doc )
161
169
if err != nil {
162
170
return
0 commit comments