On Sat, Mar 23, 2019, at 9:53 PM, Ian McMaster wrote:> I am currently not using qualify, but it seems like a nice way to know
> if the phones are online. I attempted to set it up, but am running into
> a 404 on the subscription.
>
> 1. From the manager, Action: PJSIPNotify (with an endpoint). This
> caused the following OPTIONS packet to be sent to the phone.
>
> OPTIONS sip:64167f3a7955 at 192.168.2.206
> <mailto:sip%3A64167f3a7955 at 192.168.2.206> SIP/2.0
> Via: SIP/2.0/UDP
>
192.168.2.22:5060;rport;branch=z9hG4bKPj232f200b-90a0-4c2b-8171-164f9961175d
> From: <sip:64167f3a7955 at 192.168.2.22
> <mailto:sip%3A64167f3a7955 at
192.168.2.22>>;tag=100c883f-a844-4a7a-9ab3-085b16825b30
> To: <sip:64167f3a7955 at 192.168.2.206
> <mailto:sip%3A64167f3a7955 at 192.168.2.206>>
> Contact: <sip:64167f3a7955 at 192.168.2.22:5060>
> Call-ID: 68897833-b4d3-4a75-9ad1-939b752d5a5e
> CSeq: 47099 OPTIONS
> Max-Forwards: 70
> User-Agent: Asterisk PBX 16.1.0
> Content-Length: 0
>
> 2. The phone acknowledges the OPTIONS
>
> SIP/2.0 200 OK
> Via: SIP/2.0/UDP
>
192.168.2.22:5060;rport;branch=z9hG4bKPj232f200b-90a0-4c2b-8171-164f9961175d
> From: <sip:64167f3a7955 at 192.168.2.22
> <mailto:sip%3A64167f3a7955 at
192.168.2.22>>;tag=100c883f-a844-4a7a-9ab3-085b16825b30
> To: "64167f3a7955" <sip:64167f3a7955 at 192.168.2.206
> <mailto:sip%3A64167f3a7955 at
192.168.2.206>>;tag=B9366B50-E4C6248D
> CSeq: 47099 OPTIONS
> Call-ID: 68897833-b4d3-4a75-9ad1-939b752d5a5e
> Contact: <sip:64167f3a7955 at 192.168.2.206
> <mailto:sip%3A64167f3a7955 at 192.168.2.206>>
> Allow:
>
INVITE,ACK,BYE,CANCEL,OPTIONS,INFO,MESSAGE,SUBSCRIBE,NOTIFY,PRACK,UPDATE,REFER
> Supported: replaces,100rel
> User-Agent: PolycomVVX-VVX_450-UA/5.8.0.12848
> Accept-Language: en
> Accept:
> application/sdp,text/plain,message/sipfrag,application/dialog-info+xml
> Accept-Encoding: identity
> Supported: 100rel,replaces,norefersub,sdp-anat
> Content-Length: 0
>
> 3. The phone sends the SUBSCRIBE
>
> SUBSCRIBE sip:64167f3a7955 at 192.168.2.22:5060 SIP/2.0
> Via: SIP/2.0/UDP 192.168.2.206;branch=z9hG4bK392bc0f56C717732
> From: "64167f3a7955" <sip:64167f3a7955 at 192.168.2.22
> <mailto:sip%3A64167f3a7955 at 192.168.2.22>>;tag=A23DD37B-4BFEDFB8
> To: <sip:64167f3a7955 at 192.168.2.22
> <mailto:sip%3A64167f3a7955 at 192.168.2.22>>
> CSeq: 1 SUBSCRIBE
> Call-ID: 40b12c267977075518c68280933a7955
> Contact: <sip:64167f3a7955 at 192.168.2.206
> <mailto:sip%3A64167f3a7955 at 192.168.2.206>>
> Allow:
>
INVITE,ACK,BYE,CANCEL,OPTIONS,INFO,MESSAGE,SUBSCRIBE,NOTIFY,PRACK,UPDATE,REFER
> Event: message-summary
> User-Agent: PolycomVVX-VVX_450-UA/5.8.0.12848
> Accept-Language: en
> Accept: application/simple-message-summary
> Max-Forwards: 70
> Expires: 3600
> Content-Length: 0
>
> 4. However, I am getting a 404 back.
>
> SIP/2.0 404 Not Found
> Via: SIP/2.0/UDP
>
192.168.2.205;rport=5060;received=192.168.2.205;branch=z9hG4bKd563e8de3F0F438D
> Call-ID: adf2f90a0788a47d709d3b21dc39a92f
> From: "sip:64167f39a92f" <sip:64167f39a92f at 192.168.2.22
> <mailto:sip%3A64167f39a92f at 192.168.2.22>>;tag=D55C2C08-654F3C47
> To: <sip:64167f39a92f at 192.168.2.22
> <mailto:sip%3A64167f39a92f at
192.168.2.22>>;tag=z9hG4bKd563e8de3F0F438D
> CSeq: 1 SUBSCRIBE
> Server: Asterisk PBX 16.1.0
> Content-Length: 0
>
> The phones are otherwise registered, and have working subscriptions to
> hints (i.e. for activity on DAHDI channels, or parking lots).
>
> What other configuration is required to get Qualify working? Thank you
> in advance.
The OPTIONS and the SUBSCRIBE are unrelated. If an OPTIONS goes out and gets a
response, then it's working.
The SUBSCRIBE is the phone attempting to subscribe to receive MWI information.
There are two ways to do this: unsolicited - which is Asterisk sending a NOTIFY
without the phone having asked for it, and solicited which is this case where
the phone does a SUBSCRIBE to receive it. To allow this case the mailboxes have
to be configured on the AOR instead of the endpoint.
--
Joshua C. Colp
Digium - A Sangoma Company | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org