I’m trying create simple call between two peers(blink) via Asterisk. Asterisk running on:
both clients are on : 192.168.0.106
both clients are correctly registered, but when I’m trying to call each other a I got SIP/2.0 489 Bad Event.
debian*CLI> sip show peers
Name/username Host Dyn Forcerport Comedia ACL Port Status Description
202/202 192.168.0.106 D Yes Yes 62981 Unmonitored
203/203 192.168.0.106 D Yes Yes 62981 Unmonitored
2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline]
exten => 202,1,Dial(SIP/202)
exten => 203,1,Dial(SIP/202)
transport=udp, ws, wss
Thank you for your help!
Which version of Asterisk? What is generating the 489? What SIP request is it responding to when it produces that status?
Asterisk only generates 489 in response to SUBSCRIBE requests, so this response should have nothing to do with failed call setups.
(Incidentally, how did you select your nat= settings? Why do you have allowguest set to yes?)
Version: Asterisk PBX 12.1.0-rc3
here is message:
<--- Transmitting (NAT) to 192.168.0.106:62981 --->
SIP/2.0 489 Bad Event
Via: SIP/2.0/UDP 192.168.0.106:62981;branch=z9hG4bKPj20dda23d329b4b3a8c45e1f1bf224d5f;received=192.168.0.106;rport=62981
From: "Patrik" <sip:email@example.com>;tag=d4482dab15644d53a5c435dbc2b766c2
To: "Patrik" <sip:firstname.lastname@example.org>;tag=as75ee35b4
CSeq: 1 PUBLISH
Server: Asterisk PBX 12.1.0-rc3
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
but now i Found in log following error:
nat options I just found out in some tutorial, but I don’t think that may be problem…
The PUBLISH error is irrelevant to the call setup failure.
You either need to enable SRTP in the phones or disable it in Asterisk.
You should not copy settings from tutorials without understanding them. They are often chosen because they don’t produce obvious problem symptoms rather than because they are good choices. In this case, people used to put nat=yes in their tutorials. This was deprecated in favour of indidual sub-options, probably to make people think about what they really wanted, but the tutorial writes just translated yes into the full set of options! Generally phones on the same LAN do not require any nat= settings.
It is common to see insecure=port, invite, which used to be insecure=very. When it was either not needed, or only insecure=invite was needed. The name of that option was supposed to warn you that excessively permissive values were undesirable, but, because being insecure tends not to produce error messages, tutorial writers ignored that.