[asterisk-users] Asterisk 13 - publish handler

Sunny no7find at gmail.com
Fri Feb 13 07:02:53 CST 2015


Hi list,

How do I make Asterisk 13 (using PJSIP channel) to handle PUBLISH sent from
the phones?

The trace looks like:

## PHONE -> ASTERISK ##

PUBLISH sip:1001 at example.com SIP/2.0
Via: SIP/2.0/UDP 172.31.19.250:2048;branch=z9hG4bK-w2orn21sre9u;rport
From: "1001" <sip:1001 at example.com>;tag=98slbhbn16
To: "1001" <sip:1001 at example.com>
Call-ID: 54ddf28f87c7-ak5cx3jtjc8c
CSeq: 12480 PUBLISH
Max-Forwards: 70
Event: presence
Authorization: Digest
username="1001",realm="newsip",nonce="1423831696/f03cd493c485d56261cbcc0648f97e54",uri="
sip:1001 at example.com
",qop=auth,nc=00000001,cnonce="6e4402d8",response="34dcaab743eb5f0837529fbb54105f5a",opaque="20c8892f17d503b0",algorithm=MD5
Expires: 3600
Content-Type: application/pidf+xml
Content-Length: 480

<?xml version="1.0" encoding="UTF-8"?>
<presence xmlns="urn:ietf:params:xml:ns:pidf"
xmlns:im="urn:ietf:params:xml:ns:pidf:im"
entity="pres:1001 at example.com">
<tuple id="snom300-0004133D6914">
<status>
<basic>open</basic>
<im:im>Available</im:im>
</status>
<contact priority="1.00">sip:1001 at example.com</contact>
<note xml:lang="en">Available</note>
</tuple>
</presence>

## ASTERISK -> PHONE ##

SIP/2.0 489 Bad Event
To: "1001"<sip:1001 at example.com
>;tag=z9hG4bK-d87543-ff0f99061907dd6eaa3b-1--d87543-
From: "1001"<sip:1001 at example.com>;tag=98slbhbn16
Via: SIP/2.0/UDP 172.31.19.250:2048;branch=z9hG4bK-w2orn21sre9u
Call-ID: 54ddf28f87c7-ak5cx3jtjc8c
CSeq: 12480 PUBLISH
Server: Asterisk PBX 13.2.0
Content-Length: 0


And the debug logging is reporting:
[2015-02-11 12:28:26] DEBUG[32693] res_pjsip_pubsub.c: Event presence does
not match asterisk-devicestate
[2015-02-11 12:28:26] DEBUG[32693] res_pjsip_pubsub.c: Event presence does
not match asterisk-mwi
[2015-02-11 12:28:26] WARNING[32693] res_pjsip_pubsub.c: No registered
publish handler for event presence
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20150213/f02c0719/attachment.html>


More information about the asterisk-users mailing list