John Hughes
2020-Mar-23 10:13 UTC
[asterisk-users] 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 at xxx.xxx.com SIP/2.0 Via: SIP/2.0/UDP 10.27.128.3:5060;branch=z9hG4bK.GRd5yC7Wo;rport From: <sip:john at xxx.xxx.com>;tag=ZtFgBTxUL To: sip:john at 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) <?xml version="1.0" encoding="UTF-8"?> <presence xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model" xmlns:rpid="urn:ietf:params:xml:ns:pidf:rpid" xmlns:pidfonline="http://www.linphone.org/xsds/pidfonline.xsd" entity="sip:john at xxx.xxx.com" xmlns="urn:ietf:params:xml:ns:pidf"> <tuple id="bhhmlg"> <status> <basic>open</basic> <pidfonline:online/> </status> <contact priority="0.8">sip:john at xxx.xxx.com</contact> <timestamp>2020-03-23T09:40:43Z</timestamp> </tuple> </presence> <-------------> --- (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: <sip:john at xxx.xxx.com>;tag=ZtFgBTxUL To: sip:john at 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?
Joshua C. Colp
2020-Mar-23 10:29 UTC
[asterisk-users] SIP/2.0 489 Bad Event in reply to a PUBLISH
On Mon, Mar 23, 2020 at 7:15 AM John Hughes <john at calva.com> wrote:> 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 at xxx.xxx.com SIP/2.0 > Via: SIP/2.0/UDP 10.27.128.3:5060;branch=z9hG4bK.GRd5yC7Wo;rport > From: <sip:john at xxx.xxx.com>;tag=ZtFgBTxUL > To: sip:john at 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) > > <?xml version="1.0" encoding="UTF-8"?> > <presence xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model" > xmlns:rpid="urn:ietf:params:xml:ns:pidf:rpid" > xmlns:pidfonline="http://www.linphone.org/xsds/pidfonline.xsd" > entity="sip:john at xxx.xxx.com" xmlns="urn:ietf:params:xml:ns:pidf"> > <tuple id="bhhmlg"> <status> <basic>open</basic> <pidfonline:online/> > </status> <contact priority="0.8">sip:john at xxx.xxx.com</contact> > <timestamp>2020-03-23T09:40:43Z</timestamp> </tuple> > </presence> > <-------------> > --- (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: <sip:john at xxx.xxx.com>;tag=ZtFgBTxUL > To: sip:john at 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? >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. -- Joshua C. Colp Asterisk Technical Lead Sangoma Technologies Check us out at www.sangoma.com and www.asterisk.org -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20200323/bf65b0f0/attachment.html>
Social Boh
2020-Mar-23 10:32 UTC
[asterisk-users] SIP/2.0 489 Bad Event in reply to a PUBLISH
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 On 3/23/20 05:13, John Hughes wrote:> 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 at xxx.xxx.com SIP/2.0 > Via: SIP/2.0/UDP 10.27.128.3:5060;branch=z9hG4bK.GRd5yC7Wo;rport > From: <sip:john at xxx.xxx.com>;tag=ZtFgBTxUL > To: sip:john at 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) > > <?xml version="1.0" encoding="UTF-8"?> > <presence xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model" > xmlns:rpid="urn:ietf:params:xml:ns:pidf:rpid" > xmlns:pidfonline="http://www.linphone.org/xsds/pidfonline.xsd" > entity="sip:john at xxx.xxx.com" xmlns="urn:ietf:params:xml:ns:pidf"> > <tuple id="bhhmlg"> <status> <basic>open</basic> <pidfonline:online/> > </status> <contact priority="0.8">sip:john at xxx.xxx.com</contact> > <timestamp>2020-03-23T09:40:43Z</timestamp> </tuple> > </presence> > <-------------> > --- (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: <sip:john at xxx.xxx.com>;tag=ZtFgBTxUL > To: sip:john at 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? > >
John Hughes
2020-Mar-23 11:05 UTC
[asterisk-users] SIP/2.0 489 Bad Event in reply to a PUBLISH
On 23/03/2020 11:29, Joshua C. Colp wrote:> On Mon, Mar 23, 2020 at 7:15 AM John Hughes <john at calva.com > <mailto:john at calva.com>> wrote: > > 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: > > > 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. >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: '' -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20200323/87a88a43/attachment.html>