SIP/2.0 489 Bad Event In Reply To A PUBLISH
Hi, in these dark days of COVID-19 lockdown I’m using linphone to connect to my office asterisk system for working from home.
It’s going pretty well but the presence/BLF functions don’t appear to work.
In the linphone logs and asterisk debug I find that asterisk is rejecting linphone’s PUBLISH message:
<--- SIP read from UDP:10.27.128.3:5060 --->
PUBLISH sip:john@xxx.xxx.com SIP/2.0
Via: SIP/2.0/UDP 10.27.128.3:5060;branch=z9hG4bK.GRd5yC7Wo;rport From:
To: sip:john@xxx.xxx.com CSeq: 20 PUBLISH
Call-ID: SMHLUSLJD6
Max-Forwards: 70
Supported: replaces, outbound Event: presence Accept: application/pidf+xml Content-Length: 511
Content-Type: application/pidf+xml Expires: 3600
User-Agent: Linphone/3.12.0 (belle-sip/1.6.3)
— (14 headers 3 lines) —
Sending to 10.27.128.3:5060 (no NAT)
<--- Transmitting (no NAT) to 10.27.128.3:5060 --->
SIP/2.0 489 Bad Event Via: SIP/2.0/UDP
10.27.128.3:5060;branch=z9hG4bK.GRd5yC7Wo;received=10.27.128.3;rport=5060
From:
To: sip:john@xxx.xxx.com;tag=as674d428f Call-ID: SMHLUSLJD6
CSeq: 20 PUBLISH
Server: Asterisk PBX 13.14.1~dfsg-2+deb9u4
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer Content-Length: 0
I can find nothing in the asterisk logs that says *why* it doesn’t like the publish.
Help?
—
3 thoughts on - SIP/2.0 489 Bad Event In Reply To A PUBLISH
Asterisk has no support for receiving/storing/using such a PUBLISH message. Asterisk instead generates state itself based on whether something is on the phone, busy, etc. This is received using a SUBSCRIBE and NOTIFY.
Because Asterisk do not support PUBLISH.
For BLF Configuration:
https://wiki.asterisk.org/wiki/display/AST/Configuring+chan_sip+for+Presence+Subscriptions
or
https://wiki.asterisk.org/wiki/display/AST/Configuring+res_pjsip+for+Presence+Subscriptions
—
I’m SoCIaL, MayBe
—
Aha! Thanks a bunch. Now I just have to fix linphone’s broken SUBSCRIBE…
Mar 23 11:48:37] WARNING[2128]: chan_sip.c:28198 handle_request_subscribe: SUBSCRIBE failure:*no Accept header*: pvt: stateid: -1, laststate: 0, dialogver: 0, subscribecont: ”, subscribeuri: ”