how to delay sip 183 in asterisk - asterisk

my calls did not receive ringback tones but went to the IVR system in less than 4 seconds. When reviewed the SIP captures on my end and noticed that the SIP 180 Ringing message is followed instantly by SIP 183 Session Progress with SDP. The SIP 183 with SDP is indicating that my asterisk server is ready to send through audio and since there is no ringing within audio streams so, no ringback is observed. So, please tell me how to put delay in SIP 183.
I am using asterisk 1.4 in centos 5

You can't put any delay in progress messages.
Actualy you can, but that require rewrite of chan_sip.c(posible, but costly)
You can remove 183 compleatly. See this article:
http://www.voip-info.org/wiki/view/Asterisk+sip+progressinband

Related

TCP connections terminate after some time on 4G hotspot

I am using ubuntu 20 and I am connected with wifi to the hotspot of a Galaxy A20e running android 12 which is receiving 4G. I have a connection problem that is not occuring when using my ADSL connection.
Test description : I opened a dozen of shells and established ssh connections to a dozen of servers and I just wait without interacting with the shells.
After some time (usually 5 to 10 minutes), I observe a "client_loop: send disconnect: Broken pipe ssh" message on some of the shells, then after a longer time, I observe the same message on some other shells, until after maybe one hour, all connections are gone.
Using wireshark, I have filtered on packets exchanged with one of the servers and I notice no packets exchanged except the "keep alive" signal that is send from my computer every 5 minutes, (which is conform to my ssh client configuration). At some point, in response to one of those signal, the server returns RST ACK which means that the connection has been interrupted.
I tried to find the root cause of the connection cut by using pings but I did not find anything special during the 5 minutes window when the connection cut happens. Only thing I noticed is that some pings are sometimes not received.
Any idea ?
Thanks
This question belongs to https://serverfault.com/
Try adding this to your .ssh/config:
Host *
ServerAliveInterval 60
ServerAliveCountMax 5
Most probably your 4G router or your 4G operator terminate idle connections.

TCP avoid delayed acknowledge

I'm having an application on a micro controller with a small TCP/IP stack. This application waits for a connection on a specific TCP port. As soon as the TCP connection is established the micro controller need to send 8 KB of data. Because the TX buffer of the TCP socket is only 1 KB tall I will need to send 8 segments of data. The TX buffer size can't be changed!
But now I have the problem, that after every segment a delay of 200 ms occurs. I know that this is caused by the delayed ack (which is on Windows 200 ms). But in my use case this means the whole process includes 1400 ms of delay time, which is just wasted time.
Is there any possibility that I can force the PC to acknowledge the data instantly (maybe a bit in the TCP header)? I can't change anything on the PC side.
Or should I instead sent two 512 byte tall segments instead of the 1 KB segment? Would this fix / trick out the issue? I have read that the PC will acknowledge the data if a second segement arrives.
What is the right way to solve such a usecase?

RTP audio stream works only in one direction in a SIP call

I'm developing software feature for a Session Boarder Controller(SBC).
I'm trying to establish a SIP call using two SIP clients and a Session Boarder Controller(SBC). Asterisk is used as the soft-switch.
When I call, the SIP signalling is working fine. But I am getting audio only in one direction. I captured rtp packets on all interfaces using wireshark. I observed that rtp packets in one direction is being dropped by asterisk.
Note: There is no send only attribute in any of the SIP/SDP messages.
I would like to know if there is any settings in asterisk that may cause this issue?
One more thing that I would like to know is that, from where a SIP client gets the RTP connection information. The port information is present in the media attribute
m=audio 16388 RTP/AVP 8 0 101
From where does the client get the transport IP address? is it from the "o=" field or "c=" field in the SDP or any other fields in the SDP or SIP?
You should troubleshoot the problem by capturing the complete call with Wireshark. Then look carefully at:
Client A initial INVITE: which port is it expecting media on (m= line) which address is it expecting media on (c= line)
SBC for Client A initial INVITE: If the SBC is anchoring the media (I assume so) check m / c lines
SBC for Client B initial INVITE: Which port / ip (m/c lines) is SBC for Client A expecting media on
Client B initial INVITE: Which port / ip (m/c lines) is SBC for Client B expecting media on
Are all nodes in this direction sending media on to the correct ports / ips (look at the RTP streams in wireshark)?
Then check the other direction (based on the SDP in the 183 or 200 (depending on your signaling flow)).
Note: In wireshark there is a nice feature which helps alot: Telephony --> VoIP Calls, which shows you the call flow more graphically

Is it possible to receive eCall by Asterisk (PSAP)?

I found an interesting documeent about realisation of eCall (Emergency Call) in EU: http://www.heero-pilot.eu/ressource/static/files/heero_wp3_d3-3_final-operational-results_v2.3_final.pdf
Germany somehow did it on Asterisk. Whatever, I don't understand how they process MSD (minimal set of data) using Asterisk. In the call session for the first step caller sends DTMF signals to send MSD packet. As I understood, Asterisk must redirect this call to In-band modem on COM port or to another machine with such modem. After PSAP successfully received MSD for the second step caller switches to voice channel that must be redirected to some sip-client of PSAP operator. How they do it? Is there a way to receive DTMF signals w/o modem by using internal capabilities of Asterisk? How the same call to redirect to another SIP on the same time?
I suspect that you are referring to emergency services, rendered by emergency dialers - eg. for senior citizens. These are fairly common where I live, and I've created in the past a solution to handle the calls from these, based on Asterisk. The solution involved a way to intercept the various DTMF signals that the device generates, then making Asterisk do stuff with it. Back then, I used Asterisk 1.6 and it is pain staking, because I had to do everything from within a MeetMe bridge, and interact with Manager alot. Today, doing the same with Asterisk 12/13 and ARI is a breeze. Just remember one thing, most of these dialers will utilize the A,B,C,D DTMF signals, which are somewhat unknown to most people - they exist and Asterisk is very much capable of handling those.
The only snag is - make sure you are connected via a PRI, as most SIP carriers aren't aware of these signals, and their SIP trunks won't support this type of signalling.
Asterisk can send dtmf(natively,via command SendDTMF in dialplan or D option in Dial command) or any other sound(custom c/c++ app needed)
No, you not need special modem.
However there are no realisation acordinly to that document, you need do that yourself or hire someone

Not able to detect hangup for indian numbers in asterisk 10

I am not able to detect hangup event when I am using Indian numbers but for USA numbers the the hangup is detected. If an indian number is connected and he is in a conference (confbridge) then if he hangup his phone then the hangup event is not fired.
Please help.
Assuming this is a SIP channel... You could try to detect the hangup based on the RTP timeout.
The setting in your [device] or globally, is:
rtptimeout=60
Which is the default, 60 seconds. You could crank this down a lot lower if it helps you out.
That depend of provider used. Change sip provider/or choose more costly plan. Hangup detection in this case have be handled by provider's equipment.

Resources