Asterisk: Call dropped after 15mn - asterisk

I'm getting a weird behavior on my Asterisk.
Calls are dropped after 15mn.
I'm getting the following error on the log file:
NOTICE[6301] chan_sip.c: Failed to authenticate on INVITE to '<sip:41907736445#188.32.64.1>;tag=ef7143klc9'
I'm using Asterisk Realtime. Calls a received from an operator and forwarded to external numbers throught an outbound trunk provided by anther operator.
Thanks in advance

In your sip.conf, try setting qualify=yes or keepalive=yes globally or for the trunk. Make sure to reload or just restart the service.
What version of Asterisk are you running?

Some carriers may send "confirmation" invite every X minutes.
You can see more by enable sip debug

Also if exactly at 15 min calls get dropped, then i would check the firewall to see whether there is timer set there that closes the connection after 15 min. I am speaking from experience.

Related

Asterisk Sip Reachable timeout

Sometime in my sip accounts occurs network problem and generates "UnReachable" event.
[2020-04-27 16:57:56] NOTICE[2949] chan_sip.c: Peer '323' is now UNREACHABLE! Last qualify: 6
I also see it in log files. I have 2 question about this situation.
After how many second Asterisk generate this event when can not access to sip account?
Exist some parametr change this reachable timeout second?
You can look at:
qualifyfreq=60 = default value is 60 sec
qualifygap=100
this works if:
qualify=yes|4000 = 4000 ms

Unable to locate Registered client Asterisk - Kamailio

Problem: My main issue is that when I “REGISTER” a client via Kamailio, and I attempt to “Dial” a different endpoint within an Asterisk Dial Plan, Asterisk throws an error stating that the endpoint (the number I am dialing via “Dial”) is not registered or reachable. However, commands like “Playback” do work correctly for the client I “REGISTERED” via Kamailio.
E.g. I register client 10001 in Kamailio, I then register another client 10002 in Kamalio; both 10001 and 10002 can exercise an Asterisk Dial Plan which will play videos/audio (No Problem). But, now I want 10001 to Call (Dial) 10002; it is at this point that Asterisk throws the error “10002 is not registered or reachable”.
I have tried many of the suggestion on many different help boards (several times) but I am still unable to forward a registration from Kamailio to Asterisk.
With my current Kamailio configuration (I do use dispatching), I see , via tcpdump, Asterisk receiving a “REGISTER” request, and Asterisk sends back the “unauthorized” as expected, however, Kamailio does not re-send the “REGISTER” as is customary. I am not sure of the next step to take, but I feel I have a couple of options.
- I can continue to try and figure out why Kamailio is not sending the second “REGISTER” (I have not yet been able to figure this out).
- Tell Asterisk to not require authentication. (I am using pjsip and do not know how to not require authentication in Asterisk when the request is from Kamailio).
I have put a lot of time into this one, and I am at a sticking point. Any help or suggestions would be very much appreciated.
Thank you,
Kamailio is proxy. It SHOULD NOT do send second register unless you EXPLICTLY ask it do that in dialplan.
Dispatcher module is fast processing module. It should not do for you all staff, it just give you suggestion for dispatch.
You should not do check on asterisk for registration, you have send request to kamailio, and kamailio SHOULD do that work(it do much faster and HAVE info).
Main issue is:
asterisk main goal - give easy to understand platform for begginers. So anyone can get working pbx for free. It work on top level, with calls.
kamailio main goal is PERFOMANCE. It is not for begginer, you need have solid understanding of sip protocol, not just know that you want call. You have define what to do on packets level.

No ring back tone on outbound calls. [FreePBX]

I have a FreePBX 13 server set up with a SIP Trunk connection, however for some reason we are not getting the ring back tone for calls going out of the trunk connection.
I was able to implement a work around for this by placing the "Tr" options under "Asterisk Trunk Dial Options" to force Asterisk to produce the ring back tone for outbound calls.
However this only works while manually dialing from a soft-phone / VoIP Phone, when I try to launch a call via the Asterisk AMI "Originate" command we are not getting the ring back tone, even when the "r" option is set on the trunk. This is how the command I'm sending looks:
Action: Originate,
Channel: SIP/{extension},
Context: from-internal,
Exten: {phoneNumber},
Priority: 1,
Callerid: {callerId},
Timeout: 30000,
Async: yes
Any idea about what can I do to force the ring back tone?
This could be due to inband progress.
Try to add the following to your sip.conf
under [general] section,
prematuremedia=no
progressinband=yes
if you are using freepbx, then navigate to your trunk settings in the user interface and add the above 2 configs under the peer settings.
restart asterisk and try after that.
Launch Originate via Local/ channel call, if still not work, launch via custom context which answer first.
This is not an uncommon problem. Your ITSP is being lazy and either not providing or not forwarding RFC-complaince SIP 180/183 responses.
My usual solution is to put the local caller into an MOH state where the MOH is a ring tone, and then when the other end picks up, bridge the two calls.
This is kind of jarring, however, if the remote end is busy or is congested, since you go from "fake ring" to "real error tone". The other option is to reverse your dialing process ... call the remote end and then hook the local end, so that the local end doesn't need to hear ringing.
Of course, you can also reach out to your ITSP and tell them you need them to be RFC SIP 180/183 complaint.

Asterisk who is calling every minute?

I know the basics of Asterisk . When I go into the console by running the command asterisk -rvvv I see the following:
If you notice I first get a notice:
[Aug 24 19:14:43] NOTICE[5097][C-00000036]: chan_sip.c:25877
handle_request_invite: Call from '' (62.210.26.82:5079) to extension
'011972599166454' rejected because extension not found in context
'default'.
and then I get a warning and this happens every minute.
So my question is who is dailing extension 011972599166454 ? If I add:
[default]
exten => _X.66454,1,NoOp(Hanging up call)
same => n, Hangup
to my extensions.conf file this solves the problem. But why is someone making a call every minute? to open the NAT? Should I stop this?
I'd just ban the IP address with your firewall and forget it.
If you are curious, you can set sip set debug ip <ip> and check SIP headers, maybe you could find some info about callee in the headers.
Also you can trace the IP with whois and try to find admins' contact to discuss the issue.
This is scanning bot looking for free calls.
Just disable guest calling sip.conf: allowguest=no. Then any not authenticated connections will be ignored. It will help with new IPs also.
http://www.voip-info.org/wiki/view/Asterisk+sip+allowguest
It seems that this is an attempt of hacking...
Use Fail2Ban for blocking any suspected attempts to call.

When to reload sip

I have faced this issue many times, when I call on my sip line the server responds that the line is busy, though no call is going on when I see with asterisk -vvvr command. When I reload it, it starts working.
Is there a way to troubleshoot this problem or at least get a trigger form some command that sip needs to be reloaded.
Thanks in Advance
Asterisk work for years without reload.
Try update it to latest system or find bug in your config(like no dns, nat settings changed, bad router etc).
Asterisk have no any triggers for such case. You can use external monitoring system(like nagios) which will check sip channel and reload if needed. But better find issue and fix it.
Watch the CLI with a high debug/verbosity to see what's going wrong.
Set verbosity to a high value:
core set verbose 10
Set Debug to a high value:
core set debug 10
You can also check the status of the SIP endpoint with:
sip show peer <extension> (Replace with the number you'd use to dial the endpoint).
If you add verbose CLI output and the output of sip show peer to your question we'll be able to tell you how to fix the issue. Use pastebin or a similar site if the output is very long.

Resources