If I understand the RFC correctly an Accept header is optional and if not set, the default format is application/pidf+xml. By insisting on an Accept header, Asterisk seems to be stupid here.
I fixed the problem with a work around: On the Kamailio proxy sitting infront of Asterisk I manipulate the SUBSCRIBE coming from Linphone. I add "Accept: application/pidf+xml" and now Asterisk is happy with the SUSBCRIBE and response to Linphone telling it the online/offline status of the requested buddy -> yeah!
But now there is another problem: If the buddy is in a call Asterisk notifies Linphone correctly, but Linphone doesn't change the status from Online to On the Phone.
This is the NOTIFY that is sent to LInphone
U
1.1.1.1:5060 ->
2.2.2.2:5060NOTIFY
sip:address@hidden:5060 SIP/2.0.
Via: SIP/2.0/UDP 1.1.1.1;branch=z9hG4bK661a.66bcdf18558204cb09fc5bae843c4261.0.
Via: SIP/2.0/UDP 3.3.3.3:5060;rport=5060;branch=z9hG4bK0242b3e4.
Max-Forwards: 69.
From: "Phone 1" <
sip:address@hidden>;tag=as2e6575b5.
To: <
sip:address@hidden>;tag=ruWFRcIJN.
Contact: <
sip:address@hidden:5060>.
Call-ID: 9~afV87WWN.
CSeq: 103 NOTIFY.
User-Agent: my-provider.
Subscription-State: active.
Event: presence.
Content-Type: application/pidf+xml.
Content-Length: 539.
.
<?xml version="1.0" encoding="ISO-8859-1"?>
<presence xmlns="urn:ietf:params:xml:ns:pidf"
xmlns:pp="urn:ietf:params:xml:ns:pidf:person"
xmlns:es="urn:ietf:params:xml:ns:pidf:rpid:status:rpid-status"
xmlns:ep="urn:ietf:params:xml:ns:pidf:rpid:rpid-person"
entity="
sip:address@hidden">
<pp:person><status>
<ep:activities><ep:busy/></ep:activities>
</status></pp:person>
<note>On the phone</note>
<tuple id="1">
<contact priority="1">
sip:address@hidden</contact>
<status><basic>open</basic></status>
</tuple>
</presence>
I changed IPs and domain.
Could you please tell me what Linphone expects in order change the status of the buddy from "Online" to "On the phone"?
Thanks,
Tom