bmlt-enabled / yap Goto Github PK
View Code? Open in Web Editor NEWFind meetings or someone to talk to over the phone leveraging a BMLT root server.
Home Page: https://bmlt.app/yap
License: MIT License
Find meetings or someone to talk to over the phone leveraging a BMLT root server.
Home Page: https://bmlt.app/yap
License: MIT License
Trying testing tonight with another user and my yap instance was not receiving messages. Possibly related to: microsoft/botframework-sdk#1465
helpline-search.php?Digits=Mash%2C+
helpline-search.php?Digits=Nash%2C+
helpline-search.php?Digits=Emporia%2C+
Timeout
meeting-search.php?SearchType=1&Latitude=35.1740471&Longitude=-79.3922539
This is an example response that I get from Facebook Messenger when querying a county in Ireland:
Steps To Living Group Wednesday 8:30 PM Resource Centre, Navan, Co. Meath in ,
Is is possible to not get the "in ," at the end of each response? Addresses are formatted differently in Ireland, so not all fields will be populated in the out BMLT.
my helpline keeps dialing 0000000, but in my php log i can see its searching and finding volunteers not sure whats going on there
PHP Log
[11-Mar-2018 13:23:25 CST6CDT] https://www.charlestonna.org/main_server/client_interface/json/?switcher=GetFormats
[11-Mar-2018 13:23:25 CST6CDT] https://www.charlestonna.org/main_server/client_interface/json/?switcher=GetSearchResults&services=1&formats=52&advanced_published=0
[11-Mar-2018 13:23:25 CST6CDT] https://maps.googleapis.com/maps/api/timezone/json?keyAIzaSyCTDVPsTaa1vwieqh1cCR-LfQSHkq01-Ro&location=33.06002,-80.1049492×tamp=1520792605
Twilio error code 13224 warn invalid phone number
000000000If multiple helpline volunteers are listed as same sequence and same time their available, yap will call "blast" all volunteers and first one to pickup gets the call and all other calls end
Today when inputting "thank you", it interprets as North Carolina. Respond with something simple that acknowledges.
would be nice to have an option to read the title when skipping Helpline Call Routing and pointing directly to input-method.php?Digits=2, this is the only other piece of your code i have to change
This is feature is not really making sense the more I use it, and feedback received. This would simplify the call flow, by creating less one option.
I would opt to create an option to list n
more results.
there is the ability to set the order using location_info
field. dialer is respecting this, but the schedule is not.
if two different helpline volunteers are registered at the same time and the first doesn't pickup does it go to the next, or do we need to set like a 20sec timeout or something to then transfer
If nothing is said, or picked up, yap will bomb out. Instead we should loop into a retry.
one thing i noticed in testing which def wouldnt be from this push. when searching upcoming meetings im getting results for today and not tomorrow, it almost seems like its todays results in reverse order but not quite. if i do a search for boston for today i get ... some meeting boston 5:00pm as last result and if i do a search for upcoming that result turns up first now. i also did a today/upcoming search for the vineyard and similar thing happened with no results for monday showing up, only sunday
Let Yap know ahead of time where to send the SMS results of a search.
voice-input-result.php is missing include 'functions.php'; after line 2 which is needed for getProvince function
Working with Australian folks, discovered that postal lookups and city/suburb lookups are not working in a desired fashion.
getting an error on my functions file from twilio after last nights china doll update
error 12100 Document parse failure
Parse error: syntax error, unexpected ':', expecting '{' in
/home/nercna87/wp/yap/functions.php on line
208
and from my php error log
syntax error, unexpected ':', expecting '{' in /home/nercna87/wp/yap/functions.php on line 208
i simply removed ': array' line 202 and seems to be working ok, but i could of screwed other things up still testing
I've been testing out the helpline, supercool. was wondering if there was a way for when a call is made to a helpline volunteer it can be made to look like its coming from the twilio number. I know if your a volunteer you should pick up any number that calls you in that period, but in this day in age with so many spam callers (alot of them probably being automated through twilio haha) I find some helpline volunteers may not pickup strange numbers or hit end automatically without thinking of it. if they just had the twilio number saved in their phone and they saw it call then they would be more likely to pick it up. though i guess they would then manually need to retrieve calling addicts number but still think this may be an option worth having.
the new england region wants to be able to have a prompt to select weather you want listings by voice or txt, reason being is some people may still pay by txt on their phone i guess. has this issue come up with discussions in your region what were the results of it. if it is a deal breaker for them is this something i could add in between the address lookup and meeting search or something
I'd like the ability to add a human recorded "greeting" to what callers hear when first connected to Yap. I realize that what's recited could be customized by changing the text in the configuration, but I think it would be nice for callers to hear a human voice to select how to search, or for additional info (like telling people to check a website for other info).
leverage the sms-gateway to be able to support a chatbot in facebook messenger
When switching days, pagination is not working
Currently the volunteer system uses the existing UI. The idea behind this is to use a UI more tailored for the application.
know you just did this last night and you may know about it, but ive been testing it and works great and super quick. I do get a warning in my twilio debugger.
Warning 12200
Invalid content was found starting with element 'Say'. One of '{Sms, Message, Redirect}' is expected
get: http://www.mvana.org/sca/chsyapnew/meeting-search.php
<?xml version="1.0" encoding="UTF-8"?> <Response> <Say voice="woman" language="en">Meeting information found, listing the top 5 results.</Say> <Sms>Hollywood Group of Hope Group Monday 7:30 PM 114 Walker Ln. in Goose Creek, SC</Sms> <Sms>All Kidding Aside Group Monday 7:00 PM 3250 Ladson Road in Ladson, SC</Sms> <Sms>Step Working Study Guide Group Monday 6:00 PM 2010 Hawthorne Dr in North Charleston, SC</Sms> <Sms>Primary Purpose Monday 9:00 AM 2010 Hawthorne Ave in North Charleston, SC</Sms> <Sms>Back to Basics Monday 12:00 PM 2010 Hawthorne Ave. in Bldg in back in North Charleston, SC</Sms> <Say voice="woman" language="en">Thank you for calling, goodbye.</Say> </Response>
I temporary fixed this by creating a meating-searchsms.php and removing those say parts then directing my sms gateway to that, but I but you have some tricks up your sleave. maybe making those parts conditional to only voice calls
Could we have the "hints" option for the Gather in city-or-county-voice-input.php set as a configuration item in config.php? Twilio voice recognition is a having a hard time keeping up with Irish city and county name pronunciations.
https://www.twilio.com/docs/api/twiml/gather#attributes-hints
Noticed a bunch requests from Sweden were not working correctly.
when you call in, there is currently no way for the server to know what time you are in to distinguish what meetings are coming up.
@jbraswell discovered that if you paginate enough, eventually the well runs dry.
This is because we are limiting the result set to the BMLT to the first 50 results. The BMLT root server does not support pagination, so we would have to continue increasing the result size. This would cause increasing load on the Tomato server potentially.
There are a couple of approaches I think could be taken:
Bump up the results area incrementally on demand (by a small amount per additional query), basically infinite scroll. There could potentially be a case when every single meeting in the world would be returned by https://github.com/jbraswell/tomato.git.
Show a message indicated you've reached the end of the result set and to run another query.
Any other alternatives?
what happens if a root server is just down?
fallback to another phone number, to talk to someone.
Greetings, fire here!
@radius314 recently invited @fire-bot to this repository. Before fire is enabled, @radius314 needs to complete a few steps:
Only @radius314 will be able to enable fire using the above link. If someone added fire by mistake, feel free to remove @fire-bot from your repo's collaborators.
Ideas:
= quick action
= help
= show distance
= quick directions
https://developers.facebook.com/docs/messenger-platform/introduction/conversation-components
Since Yap only provides results for meetings that haven't started yet, even at 2 minutes after the meeting started it would not be part of the results. Can a grace period (?) be built in so that meetings that started within the last 15? 20? minute be included in the results? Or maybe a custom configurable grace period?
currently when waiting for a call to connect using "yap" mode on the helpline section, you get dead air. the point of this would be able to use a stock MOH mp3 for playback.
This is meant as a replacement for a Grasshopper type system.
-1) use the start and duration fields to determine blocks of when someone can be available-
2) allow for a fallback to an HVC (helpline volunteer chair)
-3) have a way to view the schedule as a feed or calendar to view the coverage (and possible gaps)-
-4) actually use scheduled routing for calls -
it may only be a thing since my bmlt isnt fully populated, but i noticed when i do a meeting search either by city or zip the 5th meeting that is listed is the closest one it would be nice if it was listed first and the one farthest away listed 5th (last).
i may have found a workaround to make this work.
maybe put this down the road or on horizen. thinking that I may be asked this at some point either by port city/south coastal or new england. could be nice if for some reason it cycles through and no helpline volunteer picks up it gos to a voicemail, that would then notify the helpline volunteer chair either by txt, email or both. with a link to were the voicemail file resides. maybe a super basic web interface.
Right now the "search for upcoming meetings" only looks at meetings today. But if you are wanting to fill all the slots (say 5), and less than 5 come back, fill the rest with stuff from tomorrow.
cc: @pjaudiomv
it may be nice for the sms search to automatically search for meetings the next day if no meetings are found for current day, then if no meetings are still found post the There are no other meetings found sms. as its just a quick search this may make sense. though not sure how much sms function would be used anyway
to have a feature that after your meeting search is done you could loop and do another search without having to hang up and call back
note radius not diameter
Use something like Firebase to create shortened URLs.
ive been getting server timeouts, that i havent had before. maybe ill try a different server and see if it continues there.
Twilio Error - 11205
HTTP Connection Failure - Read timed out
Msg
HTTP Connection Failure - Read timed out
msg
HTTP Connection Failure - Read timed out
sourceComponent
13700
ErrorCode
11205
LogLevel
ERROR
url
meeting-search.php?SearchType=1&Latitude=41.363871&Longitude=-70.5502916
PHP LOG
[Sun Feb 18 21:15:36.057637 2018] [:warn] [pid 50540] [client 184.72.115.45:35602] Timeout waiting for output from CGI script /home/nercna87/wp/yap/meeting-search.php, referer: https://wp.nerna.org/yap/address-lookup.php?Address=02539&msg=Gather+End&Called=%2B16176487329&Digits=1&ToState=MA&CallerCountry=US&Direction=inbound&CallerState=MA&ToZip=02476&CallSid=CAe852c69f9e4853af3c21f06266018427&To=%2B16176487329&CallerZip=02539&ToCountry=US&ApiVersion=2010-04-01&CalledZip=02476&CalledCity=BOSTON&CallStatus=in-progress&From=%2B15089391663&AccountSid=AC34340e47ff9bcc2aa50165a7dde3ac68&CalledCountry=US&CallerCity=EDGARTOWN&Caller=%2B15089391663&FromCountry=US&ToCity=BOSTON&FromCity=EDGARTOWN&CalledState=MA&FromZip=02539&FromState=MA
SERVER LOG
52.91.155.70 - - [18/Feb/2018:21:15:36 -0600] "GET /yap/index.php?Called=%2B16176487329&ToState=MA&CallerCountry=US&Direction=inbound&CallerState=MA&ToZip=02476&CallSid=CAd6c707e5780c8654dcd9e95d4d468189&To=%2B16176487329&CallerZip=02539&ToCountry=US&ApiVersion=2010-04-01&CalledZip=02476&CalledCity=BOSTON&CallStatus=ringing&From=%2B15089391663&AccountSid=AC34340e47ff9bcc2aa50165a7dde3ac68&CalledCountry=US&CallerCity=EDGARTOWN&Caller=%2B15089391663&FromCountry=US&ToCity=BOSTON&FromCity=EDGARTOWN&CalledState=MA&FromZip=02539&FromState=MA HTTP/1.0" 200 418 "-" "TwilioProxy/1.1"
52.202.3.1 - - [18/Feb/2018:21:15:47 -0600] "GET /yap/input-method.php?msg=Gather+End&Called=%2B16176487329&Digits=2&ToState=MA&CallerCountry=US&Direction=inbound&CallerState=MA&ToZip=02476&CallSid=CAd6c707e5780c8654dcd9e95d4d468189&To=%2B16176487329&CallerZip=02539&ToCountry=US&ApiVersion=2010-04-01&CalledZip=02476&CalledCity=BOSTON&CallStatus=in-progress&From=%2B15089391663&AccountSid=AC34340e47ff9bcc2aa50165a7dde3ac68&CalledCountry=US&CallerCity=EDGARTOWN&Caller=%2B15089391663&FromCountry=US&ToCity=BOSTON&FromCity=EDGARTOWN&CalledState=MA&FromZip=02539&FromState=MA HTTP/1.0" 200 369 "https://wp.nerna.org/yap/index.php?Called=%2B16176487329&ToState=MA&CallerCountry=US&Direction=inbound&CallerState=MA&ToZip=02476&CallSid=CAd6c707e5780c8654dcd9e95d4d468189&To=%2B16176487329&CallerZip=02539&ToCountry=US&ApiVersion=2010-04-01&CalledZip=02476&CalledCity=BOSTON&CallStatus=ringing&From=%2B15089391663&AccountSid=AC34340e47ff9bcc2aa50165a7dde3ac68&CalledCountry=US&CallerCity=EDGARTOWN&Caller=%2B15089391663&FromCountry=US&ToCity=BOSTON&FromCity=EDGARTOWN&CalledState=MA&FromZip=02539&FromState=MA" "TwilioProxy/1.1"
Martha's Vineyard area is doing something very interesting. They have a small number of meetings (an isolated area), and only want to surface these meetings.
The idea is to make a small entry point with minimal functionality. Here is the prototype:
<?php
// set time zone
date_default_timezone_set("America/New_York");
header("content-type: text/xml");
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
// BML Search parameters, can easily be altered by going to semantic workshop and selecting json as output
// semantic workshop url wp.nerna.org/main_server/semantic
$bmlt_search_endpoint = file_get_contents($root . "/client_interface/json/?switcher=GetSearchResults&services=8&weekdays[]=1&weekdays[]=2&weekdays[]=3&weekdays[]=4&weekdays[]=5&weekdays[]=6&weekdays[]=7");
// change days from numbers to text name
$bmlt_search_endpoint = str_replace('weekday_tinyint":"1"', 'weekday_tinyint":"Sunday"', $bmlt_search_endpoint);
$bmlt_search_endpoint = str_replace('weekday_tinyint":"2"', 'weekday_tinyint":"Monday"', $bmlt_search_endpoint);
$bmlt_search_endpoint = str_replace('weekday_tinyint":"3"', 'weekday_tinyint":"Tuesday"', $bmlt_search_endpoint);
$bmlt_search_endpoint = str_replace('weekday_tinyint":"4"', 'weekday_tinyint":"Wednesday"', $bmlt_search_endpoint);
$bmlt_search_endpoint = str_replace('weekday_tinyint":"5"', 'weekday_tinyint":"Thursday"', $bmlt_search_endpoint);
$bmlt_search_endpoint = str_replace('weekday_tinyint":"6"', 'weekday_tinyint":"Friday"', $bmlt_search_endpoint);
$bmlt_search_endpoint = str_replace('weekday_tinyint":"7"', 'weekday_tinyint":"Saturday"', $bmlt_search_endpoint);
// decodes the json results into object
$search_results = json_decode($bmlt_search_endpoint);
// sort starting with current day
usort($search_results, function($a, $b){
return strtotime($a->weekday_tinyint) - strtotime($b->weekday_tinyint);
});
$results_count = 7; //how many results to return
$text_space = "\r\n";
$message = "";
?>
<Response>
<?php
if (count($search_results) == 0) {
echo "<Say voice=\"woman\">There are no other meetings for today. Thank you for calling, goodbye.</Say>";
} else {
?>
<Say voice="woman">Marthas Vineyard Meeting information found, listing the top <?php echo $results_count ?> results.</Say>
<?php
$results_counter = 0;
for ($i = 0; $i < count($search_results); $i++) {
$result_day = $search_results[$i]->weekday_tinyint;
$result_time = $search_results[$i]->start_time;
$part_1 = str_replace("&", "&", $search_results[$i]->meeting_name);
$part_2 = str_replace("&", "&", $result_day
. ' ' . (new DateTime($result_time))->format('g:i A'));
$part_3 = str_replace("&", "&", $search_results[$i]->location_street
. " in " . $search_results[$i]->location_municipality
. ", " . $search_results[$i]->location_province);
echo "<Pause length=\"1\"/>";
echo "<Say voice=\"woman\">Result number " . ($results_counter + 1) . "</Say>";
echo "<Say voice=\"woman\">" . $part_1 . "</Say>";
echo "<Pause length=\"1\"/>";
echo "<Say voice=\"woman\">Starts at " . $part_2 . "</Say>";
echo "<Pause length=\"1\"/>";
echo "<Say voice=\"woman\">" . $part_3 . "</Say>";
$message = $part_1 . $text_space . $part_2 . $text_space . $part_3;
echo "<Sms>" . $message . "</Sms>";
$results_counter++;
if ($results_counter == $results_count) break;
}
echo "<Say voice=\"woman\">Thank you for calling, goodbye.</Say>";
}
?>
</Response>
Send an SMS to a Yap number and get a volunteer to respond.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.