Hi there
I'm a complete newbie to both sip and Asterisk and I'm trying to set up a proof of concept for video/audio calls between two webpages, using Asterisk 13.8-cert4 and sipjs but I keep getting “Retransmission timeout reached on transmission” in the Asterisk logs.
I've followed the guide on the website (http://sipjs.com/guides/) but the call seems to just time-out and not connect. Is there a common cause for this error?
Webpage 1 (Bob)
This page has a button that runs the following function to log in to Asterisk as Bob and accept incoming calls:
<script>
function login(){
var configuration = {
uri: 'b...@192.168.0.186',
ws_servers: 'ws://192.168.0.186:8088/ws',
authorizationUser: 'bob',
password: 'pwd_bob',
hackIpInContact: true,
hackWssInTransport: true,
traceSip: true
};
var userAgent = new SIP.UA(configuration);
window.userAgent = userAgent
userAgent.on('invite', function (session) {
session.accept({
media: {
render: {
remote: document.getElementById('remoteVideo'),
local: document.getElementById('localVideo')
}
}
});
});
}
</script>
When this is run Asterisk logs “registered SIP bob at <ip address>”
Webpage 2 (Ben)
On another machine, I have a button on a webpage calling the following function to call Bob:
<script>
function callExtension() {
var session;
var endButton = document.getElementById('endCall');
endButton.addEventListener("click", function () {
document.getElementById("message").innerHTML = "End call";
session.bye();
alert("Call Ended");
}, false);
var config = {
uri: 'b...@192.168.0.186',
ws_servers: 'ws://192.168.0.186:8088/ws',
authorizationUser: 'ben',
password: 'pwd_ben',
hackIpInContact: true,
hackWssInTransport: true,
traceSip: true
};
var ua = new SIP.UA(config);
ua.invite('sip:b...@192.168.0.186',{
media: {
constraints: {
audio: true,
video: true
}
}
});
var userAgent = new SIP.UA(config);
window.userAgent = userAgent
var options = {
media: {
constraints: {
audio: true,
video: true
},
render: {
remote: document.getElementById('remoteVideo'),
local: document.getElementById('localVideo')
}
}
};
session = userAgent.invite('sip:b...@192.168.0.186', options);
}
</script>
Here are the excerpts from the conf files:
extensions.conf
[from-internal]
exten => bob,1,Dial(SIP/bob)
same => n,Hangup()
exten => ben,1,Dial(SIP/ben)
same => n,Hangup()
sip.conf
[ben]
type=friend
username=ben
secret=pwd_ben
host=dynamic
encryption=yes
avpf=yes
icesupport=yes
context=from-internal
directmedia=no
transport=udp,ws
force_avp=yes
dtlsenable=yes
dtlsverify=no
dtlscertfile=/etc/asterisk/keys/asterisk.pem
dtlsprivatekey=/etc/asterisk/keys/asterisk.pem
dtlssetup=actpass
[bob]
type=friend
username=bob
secret=pwd_bob
host=dynamic
context=from-internal
transport=udp,ws
At this point I'd expect a video call start between the two pages, or a “permission to use camera and microphone” alert to pop-up on Bob's chrome. Nothing seems to happen though. Asterisk gives the following output:
Asterisk output:
== WebSocket connection from '192.168.0.173:48576' for protocol 'sip' accepted using version '13'
-- Registered SIP 'bob' at 192.168.0.173:48576
== WebSocket connection from '192.168.0.170:58636' for protocol 'sip' accepted using version '13'
== WebSocket connection from '192.168.0.170:58637' for protocol 'sip' accepted using version '13'
-- Registered SIP 'ben' at 192.168.0.170:58636
-- Registered SIP 'ben' at 192.168.0.170:58637
== Using SIP RTP CoS mark 5
-- Executing [ben@from-internal:1] Dial("SIP/ben-00000000", "SIP/ben") in new stack
== Using SIP RTP CoS mark 5
-- Executing [bob@from-internal:1] Dial("SIP/ben-00000001", "SIP/bob") in new stack
== Using SIP RTP CoS mark 5
-- Called SIP/ben
== Using SIP RTP CoS mark 5
-- Called SIP/bob
[Jan 10 16:53:11] WARNING[13321]: chan_sip.c:4060 retrans_pkt: Retransmission timeout reached on transmission 5fc621d251796096...@192.168.0.186:5060 for seqno 102 (Critical Request) -- See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions
Packet timed out after 32000ms with no response
[Jan 10 16:53:11] WARNING[13321]: chan_sip.c:4084 retrans_pkt: Hanging up call 5fc621d251796096...@192.168.0.186:5060 - no reply to our critical packet (see https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions).
== Everyone is busy/congested at this time (1:0/0/1)
-- Executing [ben@from-internal:2] Hangup("SIP/ben-00000000", "") in new stack
== Spawn extension (from-internal, ben, 2) exited non-zero on 'SIP/ben-00000000'
[Jan 10 16:53:11] WARNING[13321]: chan_sip.c:4060 retrans_pkt: Retransmission timeout reached on transmission 26d276327367fae2...@192.168.0.186:5060 for seqno 102 (Critical Request) -- See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions
Packet timed out after 32000ms with no response
[Jan 10 16:53:11] WARNING[13321]: chan_sip.c:4084 retrans_pkt: Hanging up call 26d276327367fae2...@192.168.0.186:5060 - no reply to our critical packet (see https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions).
== Everyone is busy/congested at this time (1:0/0/1)
-- Executing [bob@from-internal:2] Hangup("SIP/ben-00000001", "") in new stack
== Spawn extension (from-internal, bob, 2) exited non-zero on 'SIP/ben-00000001'
Its seems like asterisk attempts to connect, but gets no reply and times out. Since I've registered both users with a sipjs UserAgent, I'm not sure why a connection can't be established. Is there any obvious mistake I'm making here? I feel like I've made some kind of beginners error, because it shouldn't be too difficult to get his working, but I'm not sure what area to look in to in order to get this to function.
Any help is hugely appreciated.
Many thanks
Ben
session = userAgent.invite('sip:bob@192.168.0.186', options);
[Jan 10 16:53:11] WARNING[13321]: chan_sip.c:4060 retrans_pkt: Retransmission timeout reached on transmission 5fc621d2517960962af96b926da37a2...@192.168.0.186:5060 for seqno 102 (Critical Request) -- See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions
Packet timed out after 32000ms with no response
[Jan 10 16:53:11] WARNING[13321]: chan_sip.c:4084 retrans_pkt: Hanging up call 5fc621d2517960962af96b926da37a2...@192.168.0.186:5060 - no reply to our critical packet (see https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions).
== Everyone is busy/congested at this time (1:0/0/1)
-- Executing [ben@from-internal:2] Hangup("SIP/ben-00000000", "") in new stack
== Spawn extension (from-internal, ben, 2) exited non-zero on 'SIP/ben-00000000'
[Jan 10 16:53:11] WARNING[13321]: chan_sip.c:4060 retrans_pkt: Retransmission timeout reached on transmission 26d276327367fae23c11dba9758bfc0...@192.168.0.186:5060 for seqno 102 (Critical Request) -- See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions
Packet timed out after 32000ms with no response
[Jan 10 16:53:11] WARNING[13321]: chan_sip.c:4084 retrans_pkt: Hanging up call 26d276327367fae23c11dba9758bfc0...@192.168.0.186:5060 - no reply to our critical packet (see https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions).
ua.invite('sip...@192.168.0.186',{
media: {
constraints: {
audio: true,
video: true
}
}
});
var userAgent = new SIP.UA(config);
window.userAgent = userAgent
var options = {
media: {
constraints: {
audio: true,
video: true
},
render: {
remote: document.getElementById('remoteVideo'),
local: document.getElementById('localVideo')
}
}
};
session = userAgent.invite('sip...@192.168.0.186', options);