Hello every one, Iām new to Asterisk but I read a lot of documentation and setup my own asterisk server.
Iām french so I hope you can understand my english
below, italic value are replaced with real values of course but as itās password or login I donāt show them here :
*number1* : the call number of the SIP line (provider : OVH)
*password1* : the password of the line
*domain.ovh1* : the OVH domain
*PORT* : port number
*userpassword* : the password for the user
First : my settings :
SIP.CONF
[general]
nat=comedia
;defaultexpiry=1800
;rtautoclear=no
context=atmos-default-context
bindport=*PORT*
bindaddr=0.0.0.0
srvlookup=no
register => *number1*:*password1*@*domain.ovh1*:5060~1800
disallow=all
allow=ulaw
allow=alaw
qualify=yes
[atmos-default-context]
type=friend
host=*domain.ovh1*
context=atmos
language=fr
insecure=invite,port
username=*number1*
secret=*password1*
[Guillaume]
secret=*userpassword*
callerid="Guillaume" <200>
context=local
mailbox=200@default
type=peer
host=dynamic
USERS.CONF
Just the default one, provided when Asterisk is installed. I added my users in sip.conf (only 1 user : [Guillaume])
EXTENSIONS.CONF
[general]
static=yes
writeprotect=no
autofallthrough=yes
clearglobalvars=no
priorityjumping=no
[atmos-outgoing-calls]
exten => _0[1-5]XXXXXXXX,1,Dial(SIP/${EXTEN}@atmos-default-context)
exten => _09XXXXXXXX,1,Dial(SIP/${EXTEN}@atmos-default-context)
[atmos]
exten => s,1,Set(ATMOS_CONTEXT=START)
same => n,Set(ATMOS_INPUT=-)
same => n,Goto(atmos-server-query,s,1)
and other extensions that are working fine usually.
And of course the extension that redirect the call to a user (always Guillaume of course since itās the only one now) :
[atmos-pick-up]
exten => s,1,Verbose("PickUp avec ${AQR_DIALSIP} pour une durƩe de ${AQR_DELAY}")
same => n,Dial(${AQR_DIALSIP},${AQR_DELAY})
same => n,Goto(atmos-server-query,s,1)
exten => h,1,Goto(atmos-caller-hangup,s,1)
**Devices : **
The Asterisk Server is hosted on a VPS hosted by IONOS, directly connected to the internet (no nat and the firewall is only blocking port 22 for ssh access).
Only Asterisk is installed on this server, no other server or applications.
User Guillaume is receiving the calls on an android softphone : PortSIP UC
Sometimes eveything is working fine, but very often :
**The problem **
Someone is calling the SIP number
the softphone is ringing
Guillaume answer and can chat, the sound is working well for both sides
After few seconds, between 7 and 30 seconds usually, the call hang up by itself
When it hangup, the call for the caller hangups, and for the softphone, it continues running but no sound of course since it stopped on the caller side.
Here the log when the call is transmitted to the softphone :
I put in bold what is the problem according to me :
Executing [s@atmos-pick-up:2] Dial("SIP/atmos-default-context-0000018c", "SIP/Guillaume,60") in new stack
== Using SIP RTP CoS mark 5
-- Called SIP/Guillaume
-- SIP/Guillaume-0000018d is ringing
-- SIP/Guillaume-0000018d is ringing
> 0x7fddc0007570 -- Strict RTP learning after remote address set to: 82.66.71.140:10196
-- SIP/Guillaume-0000018d answered SIP/atmos-default-context-0000018c
-- Channel SIP/Guillaume-0000018d joined 'simple_bridge' basic-bridge <d746d666-9be8-4f2e-9c17-40086b82f7c2>
-- Channel SIP/atmos-default-context-0000018c joined 'simple_bridge' basic-bridge <d746d666-9be8-4f2e-9c17-40086b82f7c2>
> Bridge d746d666-9be8-4f2e-9c17-40086b82f7c2: switching from simple_bridge technology to native_rtp
> Remotely bridged 'SIP/atmos-default-context-0000018c' and 'SIP/Guillaume-0000018d' - media will flow directly between them
> 0x7fddc0007570 -- Strict RTP qualifying stream type: audio
> 0x7fddc0007570 -- Strict RTP switching source address to 82.66.71.140:35251
> 0x7fddc0007570 -- Strict RTP learning complete - Locking on source address 82.66.71.140:35251
**[Dec 30 11:14:51] WARNING[102621]: chan_sip.c:4119 retrans_pkt: Retransmission timeout reached on transmission 21e57c21411ca1f84ab8847365025d45@82.165.120.235:16060 for seqno 103 (Critical Request) -- See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions**
**Packet timed out after 6400ms with no response**
**[Dec 30 11:14:51] WARNING[102621]: chan_sip.c:4143 retrans_pkt: Hanging up call 21e57c21411ca1f84ab8847365025d45@82.165.120.235:16060 - no reply to our critical packet (see https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions).**
-- Channel SIP/Guillaume-0000018d left 'native_rtp' basic-bridge <d746d666-9be8-4f2e-9c17-40086b82f7c2>
-- Channel SIP/atmos-default-context-0000018c left 'native_rtp' basic-bridge <d746d666-9be8-4f2e-9c17-40086b82f7c2>
== Spawn extension (atmos-pick-up, s, 2) exited non-zero on 'SIP/atmos-default-context-0000018c'
-- Executing [h@atmos-pick-up:1] Goto("SIP/atmos-default-context-0000018c", "atmos-caller-hangup,s,1") in new stack
-- Goto (atmos-caller-hangup,s,1)
-- Executing [s@atmos-caller-hangup:1] AGI("SIP/atmos-default-context-0000018c", "atmos-request.agi,https://atmos-app.clangen.com:5218/asterisk-call/q/5f4158f90327605b58e922aa/060f7191f0fc4d0eae4c164221c46d1e/hangup/START/0671760272/s/1640862873.683/-") in new stack
-- Launched AGI Script /usr/share/asterisk/agi-bin/atmos-request.agi
atmos-request.agi,https://atmos-app.clangen.com:5218/asterisk-call/q/5f4158f90327605b58e922aa/060f7191f0fc4d0eae4c164221c46d1e/hangup/START/0671760272/s/1640862873.683/-: MEUHHHHHH
atmos-request.agi,https://atmos-app.clangen.com:5218/asterisk-call/q/5f4158f90327605b58e922aa/060f7191f0fc4d0eae4c164221c46d1e/hangup/START/0671760272/s/1640862873.683/-: https://atmos-app.clangen.com:5218/asterisk-call/q/5f4158f90327605b58e922aa/060f7191f0fc4d0eae4c164221c46d1e/hangup/START/0671760272/s/1640862873.683/-
atmos-request.agi,https://atmos-app.clangen.com:5218/asterisk-call/q/5f4158f90327605b58e922aa/060f7191f0fc4d0eae4c164221c46d1e/hangup/START/0671760272/s/1640862873.683/-:
-- <SIP/atmos-default-context-0000018c>AGI Script atmos-request.agi completed, returning 0
Of course I read the documentation on the url provided in the log, but I donāt understand what to do now.
The serveur is hosted on a dedicated server, there is nothing blocking RTP port.
the softphone can be either connected via Wifi (behind an internet box, so behind a nat), or via 4G, and the problem can occur in both situation (the provided log was generated by a test when the softphone is on Wifi).
Do someone see something bad in my sip.conf or extensions.conf that could create this issue ?
Did I forget something important ?
Can my softphone be the problem ?
Is there a recommanded softphone for Android ?
Any help would be welcome iām lost.
Thank you so much and thank you for reading !