[asterisk-users] Subscription-State always active ?
Joshua Colp
jcolp at digium.com
Thu Jul 31 05:13:59 CDT 2014
Jonas Kellens wrote:
> Hello,
Kia ora,
> I notice that Asterisk always sends Subscription-State: active, even
> when the SIP-peer is offline (IP-phone cut from power) :
>
>
> /[Jul 31 11:56:58] NOTICE[32273]: chan_sip.c:26194 sip_poke_noanswer:
> Peer 'testacc77000' is now UNREACHABLE! Last qualify: 49//
> //[Jul 31 11:56:58] Really destroying SIP dialog
> '78b0d1701d3694b1494a0c4b55344d57 at ip-sip-server:5060' Method: OPTIONS//
> //[Jul 31 11:56:58] set_destination: Parsing
> <sip:testacc77003 at 192.168.1.109:1024> for address/port to send to//
> //[Jul 31 11:56:58] set_destination: set destination to 192.168.1.109:1024//
> //[Jul 31 11:56:58] Reliably Transmitting (NAT) to my-public-ip:1024://
> //NOTIFY sip:testacc77003 at 192.168.1.109:1024 SIP/2.0//
> //Via: SIP/2.0/UDP ip-sip-server:5060;branch=z9hG4bK3afa3dd6;rport//
> //Max-Forwards: 70//
> //From: <sip:10 at ip-sip-server;user=phone>;tag=as00df4bee//
> //To: <sip:testacc77003 at ip-sip-server>;tag=9wdraz254n//
> //Contact: <sip:10 at ip-sip-server:5060>//
> //Call-ID: 3c267066aeb1-bv3r703hb93x//
> //CSeq: 109 NOTIFY//
> //User-Agent: myasterisk//
> //Subscription-State: active//
> //Event: dialog//
> //Content-Type: application/dialog-info+xml//
> //Content-Length: 202//
> //
> //<?xml version="1.0"?>//
> //<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="7"
> state="full" entity="sip:10 at ip-sip-server">//
> //<dialog id="10">//
> //<state>terminated</state>//
> //</dialog>//
> //</dialog-info>/
>
>
> It seems to me that this information is not correct. Is this some
> setting I need to tweak ?
It is correct. The subscription setup by the subscribing device remains
active. The body itself (the XML) conveys the information about the
device that has been subscribed to. In the case of the above the
"<state>terminated</state>" means that it is unavailable. There's a few
different body types that implementations use.
Cheers,
--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org
More information about the asterisk-users
mailing list