Twilio.recieveSms("twilio-number",callback) vs Twilio.recieveSms("twilio-number","human-number",callback)
jonl: the 2nd is pretty much neccesary due to how twilio handles calls
jonl
Wait, I don't think it is, I've implemented it without that before?
I am out now
Will answer tmr?
thethirdone
jonl: there are some weird things about the call api due to the facts that 1) An old callback should not block a new one from being activated, 2) only one callback can be activated per call, 3) Deciding which callback to take must be done server-side
I can hop on a call with you to discuss it if you want
JacobEdelman has quit
Guest62 joined the channel
Guest62 joined the channel
JacobEdelman joined the channel
jonl
thethirdone: I'll be in the office in 3ish hours, a brief call sounds good
Maxw I'll be in the office in 3ish hours, primarily going to be doing reflection work first
thethirdone: sorry, can you clarify "rather than work only once and separate call so it wont interefere"
thethirdone
currently each callback lives for one call
and by "separate call so it wont interefere" I meant to make Twilio.call use a separate webhook so normal callbacks aren't messed with.
ie. Twilio.listenCall() uses /baton/Twilio/call/inbound and Twilio.call() uses /baton/call/outbound
jonl: ping
jonl
thethirdone: yeah, separate callbacks seem like a good idea
thethirdone: mutexes seem like the best currently but
mutexes > overriding > single use callbacks
thethirdone
jonl: mutexes are probably unimportant if multiple users dont try to use the same number
jonl
thethirdone: good call
OOH
gotcha
thethirdone: I think that blocking a new callback from being established should be the precedent "you already have another place in the code where you are listening for this, you have to close that one before listening for it somewhre else"
thethirdone: thoughts?
thethirdone: convert "should" to "potentially could"
thethirdone
jonl: the idea of closing a callback is somewhat tricky, I might be able to make something on the client that would check to see if a callback has already been made that would console.warn("This number already has a callback, check yourself")
jonl
thethirdone: sounds good
thethirdone: even beyond console, I'd throw an error
I did not know console.warn was a thing, tanks!
thethirdone
jonl: I would not throw an error
jonl
thethirdone: sry, I'm terrible at communication
thethirdone: "what are your thoughts on throwing an error?"
is what I meant to say
thethirdone
jonl: it would be potentially annoying to refresh the page to be able to overwrite a callback for testing