Hello!
I’m trying to establish a connection and presence state eyeBeam softphone and asterisk.
asterisk 13.1
pjsip:
[my_list]
type=resource_list
list_item=231@softphones
list_item=226@softphones
event=presence
full_state=yes
[226]
type=aor
max_contacts=3
[231]
type=aor
max_contacts=3
[226]
type=endpoint
disallow=all
allow=alaw
transport=udp-transport
auth=auth226
aors=226
allow_subscribe=yes
context=softphones
mwi_from_user=226
[231]
disallow=all
allow=alaw
transport=udp-transport
type=endpoint
auth=auth231
aors=231
allow_subscribe=yes
mwi_from_user=231
context=softphones
[auth226]
type=auth
auth_type=userpass
password=234323
username=226
[auth231]
type=auth
auth_type=userpass
password=234324234
username=231
extensions.conf:
[softphones]
exten => 226,hint,PJSIP/226
exten => 231,hint,PJSIP/231
Modules loaded:
res_pjsip.so: Core of PJSIP code in Asterisk.
res_pjsip_pubsub.so: The code that implements SUBSCRIBE/NOTIFY logic, on which individual event handlers are built.
res_pjsip_exten_state.so: Handles the “presence” and “dialog” events.
res_pjsip_pidf_body_generator.so: This module generates application/pidf+xml message bodies. Required for most subscriptions to the “presence” event.
res_pjsip_xpidf_body_generator.so: This module generates application/xpidf+xml message bodies. Required for some subscriptions to the “presence” event.
res_pjsip_dialog_info_body_generator.so: Required for subscriptions to the “dialog” event. This module generates application/dialog-info message bodies.
res_pjsip_pidf_eyebeam_body_supplement.so
Hints:
Change status log:
<— Received SIP request (1020 bytes) from UDP:192.168.1.47:5026 —>
PUBLISH sip:231@192.168.1.125 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.47:5026;branch=z9hG4bK-d8754z-15650978b0332a67-1—d8754z-;rport
Max-Forwards: 70
Contact: sip:231@192.168.1.47:5026
To: "231"sip:231@192.168.1.125
From: "231"sip:231@192.168.1.125 ;tag=1c3e9d7a
Call-ID: NTk1MjgzZGRjZWMyNjVjMDExYWViMDNjZTQzZDMxMmE.
CSeq: 1 PUBLISH
Expires: 3600
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
Content-Type: application/pidf+xml
User-Agent: eyeBeam release 1102u stamp 52345
Event: presence
Content-Length: 456
<?xml version='1.0' encoding='UTF-8'?>openOn the Phone
<— Transmitting SIP response (520 bytes) to UDP:192.168.1.47:5026 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.47:5026;rport=5026;received=192.168.1.47;branch=z9hG4bK-d8754z-15650978b0332a67-1—d8754z-
Call-ID: NTk1MjgzZGRjZWMyNjVjMDExYWViMDNjZTQzZDMxMmE.
From: “231” sip:231@192.168.1.125 ;tag=1c3e9d7a
To: “231” sip:231@192.168.1.125 ;tag=z9hG4bK-d8754z-15650978b0332a67-1—d8754z-
CSeq: 1 PUBLISH
WWW-Authenticate: Digest realm=“asterisk”,nonce=“1434024844/c22e68a5865a8bc87580fe47232a3b59”,opaque=“30fdf3a00396cd1c”,algorithm=md5,qop=“auth”
Content-Length: 0
<— Received SIP request (1302 bytes) from UDP:192.168.1.47:5026 —>
PUBLISH sip:231@192.168.1.125 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.47:5026;branch=z9hG4bK-d8754z-7928885f41481b1d-1—d8754z-;rport
Max-Forwards: 70
Contact: sip:231@192.168.1.47:5026
To: "231"sip:231@192.168.1.125
From: “231"sip:231@192.168.1.125 ;tag=1c3e9d7a
Call-ID: NTk1MjgzZGRjZWMyNjVjMDExYWViMDNjZTQzZDMxMmE.
CSeq: 2 PUBLISH
Expires: 3600
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
Content-Type: application/pidf+xml
User-Agent: eyeBeam release 1102u stamp 52345
Authorization: Digest username=“231”,realm=“asterisk”,nonce=“1434024844/c22e68a5865a8bc87580fe47232a3b59”,uri="sip:231@192.168.1.125 ”,response=“bef012f65a83ff61e36136bd84b1da73”,cnonce=“d07a4f880f7443fd656a46fe25ccee11”,nc=00000001,qop=auth,algorithm=md5,opaque=“30fdf3a00396cd1c”
Event: presence
Content-Length: 456
<?xml version='1.0' encoding='UTF-8'?>openOn the Phone
[Jun 11 15:14:04] WARNING[28851]: res_pjsip_pubsub.c:2858 pubsub_on_rx_publish_request: No registered publish handler for event presence
<— Transmitting SIP response (370 bytes) to UDP:192.168.1.47:5026 —>
SIP/2.0 489 Bad Event
Via: SIP/2.0/UDP 192.168.1.47:5026;rport=5026;received=192.168.1.47;branch=z9hG4bK-d8754z-7928885f41481b1d-1—d8754z-
Call-ID: NTk1MjgzZGRjZWMyNjVjMDExYWViMDNjZTQzZDMxMmE.
From: “231” sip:231@192.168.1.125 ;tag=1c3e9d7a
To: “231” sip:231@192.168.1.125 ;tag=z9hG4bK-d8754z-7928885f41481b1d-1—d8754z-
CSeq: 2 PUBLISH
Content-Length: 0
All I did the right thing?
Please help to realization this functionality.
(Placing on the asterisk 11 is also considered)
jcolp
June 11, 2015, 7:14pm
2
Asterisk does not support handling PUBLISH requests of the presence type. The information provided to subscribers is calculated and determined by Asterisk itself. In order to use resource lists the client must subscribe to it.