- Details
- Category: Technology
So, let's pretend you are running a medical center, maybe a pizza place or any business that requires attending customers by the phone and walk-ins at the same time. You need at least one person not talking on the phone. It is also obvious that you need a call center queue for those customers on the phone.
Read more: Forcing at least One Free Agent in a Call Center with FreeSWITCH and FusionPBX
- Details
- Category: Technology
Developer note:
Crops out a 93-pixel lower band:
ffmpeg -i 4.mp4 -filter_complex "[0:v]crop=in_w:in_h-93:0:0[cropped]" -map "[cropped]" 4a.mp4
Crops out a 34-pixel lower band:
convert 5.jpg -gravity South -chop 0x34 5a.jpg
Cuts out the last N seconds. -t needs to be the total length of the video, you must have to know the video length (in seconds) and specify the t parameter with the right value.
ffmpeg -i setup.mp4 -t 233 -c copy output.mp4
- Details
- Category: Technology
So, after a while of writing a few Telegram bots, I realized that multiple-language support is always appreciated if the public doesn't speak the original language. To work around this, I got inspired by the Laravel approach, a big associative array.
The code is published at https://github.com/daniel-lucio/multilingual-support after you download you have to create the language files, for example, es.php, en.php, fr.php and so on. The following example is just for the /start command utilizing the Longman PHP library.
- Details
- Category: Technology
When coding telegram bots, one of the things you will find is that each HTTP query that the system does to your code is independent and sessionless. The Telegram API does not provide a way to remember things or to differentiate the HTTP hits; it is up to you to do that.
Why remember? Useful bots are not those where you answer one question and they give you an answer, and then you ask the same question and they give the same answer. Bots have to evolve and remember your last actions; you may want to have a bot that chats with you, it needs to remember your name and so on.
Fortunately for us, PHP has sessions, an easy way to have a memory of what happens. PHP sessions out of the box won't work with the Telegram bot; when a browser interacts with a PHP script that uses sessions, the browser uses a cookie to name the session and PHP automatically gets it. In this case, you are attending a headless client that doesn't support the cookies. Here is what I did.
This article assumes knowledge of the Longman PHP Telegram Bot library. Which in my opinion is the best PHP library to write Telegram bots. Also note that this is a short-term memory solution, it is not meant to be long-term.
- Details
- Category: Technology
So, I have this customer whose cluster was behaving very well until one day I got a report that it was very slow, it was not answering any SIP signals right away. If you put a sngrep, you may get something similar to the following behaviour.

The SIP signalling arrives, but the server delays a lot in answering it. Sometimes it is very long that the endpoints start timing out.

