redirect a call using cisco tcl ivr - tcl

I have this scenario in my mind:
A user call is connected to support line, if the support team will not pick up within 30 seconds, the call will be forwarded to another number which is a voice mail.
I have tried consultation mode with no success, because I get unsupported error. Now I am trying the simple recommended scenario using leg Setup and call info.
In a nutshell, I have placed a call and support team is already ringing, nobody picks up and 30 seconds is passed, now I want to redirect the call using the following commands:
set VoiceMail 7777
set callInfo(alertTime) 40
set callInfo(originationNum) 83382992
set callInfo(mode) "ROTARY"
set callInfo(rerouteMode) "REDIRECT_ROTARY"
leg setup $VoiceMail callInfo leg_incoming
but when run, this returns an error stating "CallSetup already active on leg"
any help on that? if I disconnect the leg using "leg disconnect leg_incoming" the call is closed (I think)
Thanks

Related

ESPv2 with Google Cloud Functions upstream request timeout

I'm having issue getting answers from a Google Coud Function going through ESPv2.
Every time I request it, I get a response 15 seconds later with a status code of 504.
My function take between 30 to 45 seconds.
In the logs the functions correctly and answer back after 35 seconds.
Is there a way to increase the timeout in ESPv2 ?
Thanks
For anyone else having this issue, in the openapi-functions.yaml under the x-google-backend you should had the attribut deadline and set it to whatever value in seconds you want.
Here is the hidden documentation https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#deadline
Issue related: https://github.com/GoogleCloudPlatform/esp-v2/issues/4
Depending on the documentation you used to secure the endpoints of your Cloud Function’s with ESPv2, this should be possible. If you are using Cloud Run to host your ESPv2, a 504 error is sent when a request exceeds its request timeout limit. The request timeout limit is a setting that specifies the time within which a response must be returned before sending a 504 response. You can change this value by going in your “Cloud Run” tab, selecting your ESPv2 service, selecting “Edit & Deploy new Revision”, scrolling down to the capacity section and setting the time in milliseconds. This is some documentation that could prove helpful when working with the topics discussed.

HTTP Communication failure - 500 Native SSL error

We are using Google API to compute mileage for our travel. Everything was working fine for over 1 year, however we started having the below said issue in the last couple of months.
Our program is able to connect to the API, the API returning with the error message http_communication_failure. The exact error is Application Server
Error 500 Native SSL error
Error is logged with Tag: {0001fee7}Thu Jun
21 09:36:49 2018
When I pasted the URL in the browser, it is returning the mileage information. However through the API call (receive data) in the program, we are getting this error message.
No program changes or Certificate changes have been done in the last 1 year. Our Basis team looked in to the possible issues with SSL. Everything seems to be OK from our end. I looked through your troubleshooting page, and tried all the suggested solutions. Nothing seem to fix our problem. Please let us know what else we need to look at.
CONCATENATE 'https://maps.googleapis.com/maps/api/distancematrix/xml?origins=' lv_dep '&destinations=' lv_arr '&units=imperial'
'&key=' lv_key
INTO lv_http_url.
CALL METHOD cl_http_client=>create_by_url
EXPORTING
url = lv_http_url
ssl_id = 'ANONYM'
IMPORTING
client = lo_http_client
EXCEPTIONS
argument_not_found = 1
plugin_not_active = 2
internal_error = 3
others = 4.
IF sy-subrc EQ 0.
lo_http_client->send( EXCEPTIONS http_communication_failure = 1
http_invalid_state = 2 ).
CALL METHOD lo_http_client->receive
EXCEPTIONS
http_communication_failure = 1
http_invalid_state = 2
http_processing_failed = 3
others = 4.
See if port 443 is create in Trns: smicm, if you can't see it, create it.
increase the trace in menu go to->trace level.
call Appi and see log.
if you see a error about SSL, export the certificate from your PC, I supose is "google trust service".
go trns: STRUST in SAP and inport the new certificate.

Run Dial & Say at the same time on Twilio?

When a user calls my number, I wish to have Twilio <Say> something to them while <Dial>ing another number, the issue is, I can only seem to get it to do one or the other (I.E. Say, then dial (Delaying the dial), or, dial, then say (Not saying until the call is over)). What I want is either of the following (First one would be preferable, although answers to do both would be the best (In case I need the opposite one in the future/someone Googling)):-
Initiate the call to the new number AND start saying "Lorem ipsum...", if the say finishes first then silence until the call is picked up, if the phone number picks up first, let the say finish then transfer them/combine the calls.
Initiate the call to the new number AND start saying "Lorem ipsum...", if the say finishes first then silence until the call is picked up, if the phone number picks up first, cut the say command off and instantly transfer/combine the calls.
Thanks!
Twilio evangelist here.
There is no way to do this using just Twiml as Twilio processes Twiml sequentially so its going to finish the <Say> before moving on to the <Dial>.
You could combine Twiml with the REST API to do this however. In the same HTTP request where your generating the TwiML with the in it, you would also make a call out to the REST API to have Twilio start an outbound phone call.
Twilio would <Say> what you want to Caller A while dialing Caller B. When Caller B answers, put them into a conference. Once Caller A finishes listening to the <Say> put them into the same conference.
This way, regardless of who gets their first, Caller A or Caller B, either will wait for the other. You can use the StatusCallback parameter to detect if Caller B never answers and in that scenario redirect Caller A out of the conference.
Hope that helps.

MySQL listen notify equivalent

Is there an equivalent of PostgresQL's notify and listen in MySQL? Basically, I need to listen to triggers in my Java application server.
Ok, so what I found is that you can make UDF functions in mysql that can do anything but need to be written in C/C++. They can be then called from triggers on updates in database and notify your application when update happened. I saw that there are some security concerns. I did not use it myself but from what I can see it looks like something that could accomplish what you want to do and more.
http://dev.mysql.com/doc/refman/5.6/en/adding-udf.html
The github project mysql-notification provides a MySQL user defined function MySQLNotification() as a plugin to MySQL that will send notification events via a socket interface. This project includes a sample NodeJS test server that receives the notification events that could be adapted for Java or any other socket service.
Example use:
$ DELIMITER ##
$ CREATE TRIGGER <triggerName> AFTER INSERT ON <table>
FOR EACH ROW
BEGIN
SELECT MySQLNotification(NEW.id, 2) INTO #x;
END##
Project includes full source code and installation instructions for OSX and Linux. License is GNU v3.
No, there aren't any built-in functions like these yet.
You need to "ping" (every 1-5 seconds) database with selecting with premade flag like "read" 0/1. After
SELECT * FROM mytable WHERE read = 0
update it with read = 1
I needed to do this, so I designed my application to send the update notices itself.
E.g.
--Scenario--
User A is looking at record 1
User B saves an update to record 1 while User A has it open.
Process:
I wrote my own socket server as a Windows Service. I designed a que like system which is basically,
EntityType EntityID NoticeType
Where the EntityType is the type of Poco in my data layer that needs to send out notices, EntityID is the primary key value of the row that changed in sql (the values of the poco), and NoticeType is 1 Updated, 2 Inserted, and 3 Deleted.
The socket server accepts connections from the server side application code on a secure connection "meaning client side code cannot make requests designed to be sent by the server side application code"
The socket server accepts a message like
900 1 1023 1
Which would mean the server needs to notify concerned client connections that Entity Type 1 "Person" with ID 1023 was Updated.
The server knows what users need to be notified because when User's look at a record, they are registered in the socket server as having an interest in the record and the record's ID which is done by the web socket code in the client side javascript.
Record 1 is a POCO in my app code that has an IsNew and IsDirty field. "Using EntityFrameWork6 and MySql" If UserB's save caused an actual change (and not just saving existing data) IsDirty will be true on the postback on UserB's POCO.
The application code see's the record is dirty then notifies the socket server with a server side sent socket "which will be allowed" that says Entity 1 with ID 1023 was Updated.
The socket server sees it, and puts it in the que.
Being .Net, I have a class for concerned users that uses the same pocos from the data layer running in the Socket Server window service. I use linq to select users who are working with an entity matching the entity type and primary key id of the entity in the que.
It then loops through those users and sends them a socket like
901 1 1023 1 letting them know the entity was updated.
The javascript in the client side receives it causing users B's page to do an ajax postback on Record 1, But what happens with UserA's is different.
If user A was in the process of making a change, they will get a pop up to show them what changed, and what their new value will be if they click save and asks them which change they want to keep. If UserA doesn't have a change it does an ajax postback with a notification bar at the top that says "Record Change: Refreshed Automatically" that expires after a few seconds.
The Cons to this,
1. It's very complex
2. It won't catch insert/update/delete operations from outside of the application.
In my case, 2 won't happen and if 2 does happen it's by myself or another dev who knows how to manually create the notify que requests "building an admin page for that".
You can use https://maxwells-daemon.io to do so.
It is based on mysql bin logs, when changes in database is occurred it will send json message with updates to kafka, rabbitmq or other streaming platforms

mysql time out with cakephp acl create utility

The app I'm working with is well established and uses a pretty standard CakePHP ACL set up with the usual ACO/ARO tables. I usually use the cakephp console (./cake acl ....) to add acos when I create a new action in a controller, and as recently as last week I was doing this just fine for a new controller I'd created.
This morning however when running the console utility I get a very lengthy delay and eventually get (my company DB URL removed):
./cake acl create aco Statistics data
Warning: mysql_connect(): [2002] Operation timed out (trying to
connect via tcp://[db url]:3306) in
/dev/docs/cake/libs/model/datasources/dbo/dbo_mysql.php on line 552
Warning: mysql_connect(): Operation timed out in
/dev/docs/cake/libs/model/datasources/dbo/dbo_mysql.php on line 552
Warning: mysql_select_db() expects parameter 2 to be resource, boolean
given in /dev/docs/cake/libs/model/datasources/dbo/dbo_mysql.php on
line 558
Warning: mysql_get_server_info() expects parameter 1 to be resource,
boolean given in
/dev/docs/cake/libs/model/datasources/dbo/dbo_mysql.php on line 566
Warning: mysql_query() expects parameter 2 to be resource, boolean
given in /dev/docs/cake/libs/model/datasources/dbo/dbo_mysql.php on
line 600 Error: Missing database table 'aros' for model 'Aro'
There is no isse with load time when using the app from the browser, nor with using any of the other DB-intensive actions I created last week. This dev copy of the app does not use Cake's cacheing, so that's not the problem. Really just seems to be choking somewhere specifically in adding the new aco.
I'd think it were an issue with the DB server if not for the fact that it is otherwise responding fine in the app. Any ideas where in Cake's guts this sort of a misstep could occur?
For the one in a million chance that someone is in my position, remember that when working in a large instiution there are these little things called firewalls, and if you're going to run a cake console, you'd better be SSH'd on to the webserver to run your ACO commands or anything involving a connection to your database server, instead of being mapped on to a shared drive as I decided to do this week.