Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] Subscription-State always active ?


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
jonas.kellens at telen...
Guest





PostPosted: Thu Jul 31, 2014 5:07 am    Post subject: [asterisk-users] Subscription-State always active ? Reply with quote

Hello,

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@ip-sip-server:5060' Method: OPTIONS
[Jul 31 11:56:58] set_destination: Parsing <sip:testacc77003@192.168.1.109:1024> ([email]sip:testacc77003@192.168.1.109:1024[/email]) 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@192.168.1.109:1024 ([email]sip:testacc77003@192.168.1.109:1024[/email]) SIP/2.0
Via: SIP/2.0/UDP ip-sip-server:5060;branch=z9hG4bK3afa3dd6;rport
Max-Forwards: 70
From: <sip:10@ip-sip-server;user=phone>;tag=as00df4bee
To: <sip:testacc77003@ip-sip-server>;tag=9wdraz254n
Contact: <sip:10@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@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 ?



Kind regards,

Jonas.
Back to top
jcolp at digium.com
Guest





PostPosted: Thu Jul 31, 2014 5:14 am    Post subject: [asterisk-users] Subscription-State always active ? Reply with quote

Jonas Kellens wrote:
Quote:
Hello,

Kia ora,

Quote:
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@ip-sip-server:5060' Method: OPTIONS//
//[Jul 31 11:56:58] set_destination: Parsing
<sip:testacc77003@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@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@ip-sip-server;user=phone>;tag=as00df4bee//
//To: <sip:testacc77003@ip-sip-server>;tag=9wdraz254n//
//Contact: <sip:10@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@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

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
jonas.kellens at telen...
Guest





PostPosted: Thu Jul 31, 2014 7:22 am    Post subject: [asterisk-users] Subscription-State always active ? Reply with quote

On 31-07-14 12:13, Joshua Colp wrote:

Quote:
Jonas Kellens wrote:

Quote:
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@ip-sip-server:5060' Method: OPTIONS//
//[Jul 31 11:56:58] set_destination: Parsing
<sip:testacc77003@192.168.1.109:1024> ([email]sip:testacc77003@192.168.1.109:1024[/email]) 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@192.168.1.109:1024 ([email]sip:testacc77003@192.168.1.109:1024[/email]) SIP/2.0//
//Via: SIP/2.0/UDP ip-sip-server:5060;branch=z9hG4bK3afa3dd6;rport//
//Max-Forwards: 70//
//From: <sip:10@ip-sip-server;user=phone>;tag=as00df4bee//
//To: <sip:testacc77003@ip-sip-server>;tag=9wdraz254n//
//Contact: <sip:10@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@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.

Hello,

I read on Yealink support that Yealink IP-phones expect "Subscription-State:terminated" for there Presence/BLF-functionality.

So how can I get "Subscription-State:terminated" on Asterisk ?


Kind regards,

Jonas.
Back to top
jcolp at digium.com
Guest





PostPosted: Thu Jul 31, 2014 7:28 am    Post subject: [asterisk-users] Subscription-State always active ? Reply with quote

Jonas Kellens wrote:
Quote:

Hello,

I read on Yealink support that Yealink IP-phones expect
"Subscription-State:terminated" for there Presence/BLF-functionality.

So how can I get "Subscription-State:terminated" on Asterisk ?

That would be a bit strange as the subscription would then be
terminated, no more NOTIFY messages would go to it which would defeat
the purpose of subscribing to something. The only way to achieve that
would be to have the phone unsubscribe or to change the code to force it
to terminate the subscription under certain circumstances. This would
require knowing the exact specifications and details of what they expect
and when. Is there currently a problem you are facing with subscription
support?

--
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

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
jonas.kellens at telen...
Guest





PostPosted: Thu Jul 31, 2014 7:59 am    Post subject: [asterisk-users] Subscription-State always active ? Reply with quote

On 31-07-14 14:28, Joshua Colp wrote:
Quote:
Jonas Kellens wrote:
Quote:

Hello,

I read on Yealink support that Yealink IP-phones expect
"Subscription-State:terminated" for there Presence/BLF-functionality.

So how can I get "Subscription-State:terminated" on Asterisk ?

That would be a bit strange as the subscription would then be terminated, no more NOTIFY messages would go to it which would defeat the purpose of subscribing to something. The only way to achieve that would be to have the phone unsubscribe or to change the code to force it to terminate the subscription under certain circumstances. This would require knowing the exact specifications and details of what they expect and when. Is there currently a problem you are facing with subscription support?


Hello,

this "Subscription-State:terminated" is expected when the IP-phone goes offline (Unregister or cut off from power).

At that moment indeed the IP-phone no longer sends NOTIFY messages. Also, Asterisk knows very well the SIP peer becomes unreachable (see my first post). But still Asterisk replies "Subscription-State: active" to the IP-phones that request the state of the offline SIP peer.


Yealink expects "Subscription-State:terminated" so the Yealink IP-phone can put out the BLF light (in stead of staying in a green mode, which indicates that the SIP peer is still online but not in a call).

So I can follow the Yealink logic. Can you ?



Kind regards,

Jonas.
Back to top
jcolp at digium.com
Guest





PostPosted: Thu Jul 31, 2014 8:07 am    Post subject: [asterisk-users] Subscription-State always active ? Reply with quote

Jonas Kellens wrote:
Quote:
On 31-07-14 14:28, Joshua Colp wrote:
Quote:
Jonas Kellens wrote:
Quote:

Hello,

I read on Yealink support that Yealink IP-phones expect
"Subscription-State:terminated" for there Presence/BLF-functionality.

So how can I get "Subscription-State:terminated" on Asterisk ?

That would be a bit strange as the subscription would then be
terminated, no more NOTIFY messages would go to it which would defeat
the purpose of subscribing to something. The only way to achieve that
would be to have the phone unsubscribe or to change the code to force
it to terminate the subscription under certain circumstances. This
would require knowing the exact specifications and details of what
they expect and when. Is there currently a problem you are facing with
subscription support?


Hello,

this "Subscription-State:terminated" is expected when the IP-phone goes
offline (Unregister or cut off from power).

I would expect that if the phone that went offline was subscribed to
stuff and the subscription expired.

Quote:
At that moment indeed the IP-phone no longer sends NOTIFY messages.
Also, Asterisk knows very well the SIP peer becomes unreachable (see my
first post). But still Asterisk replies "Subscription-State: active" to
the IP-phones that request the state of the offline SIP peer.

Generally IP phones don't send NOTIFY messages. They are sent NOTIFY
messages to inform them of the state of things they have subscribed to
(such as devices or mailboxes).

Quote:


Yealink expects "Subscription-State:terminated" so the Yealink IP-phone
can put out the BLF light (in stead of staying in a green mode, which
indicates that the SIP peer is still online but not in a call).

Sending Subscription-State:terminated terminates the subscription. If
the device in question comes back online you can't send any new NOTIFY
messages because the subscription is gone. The state of what you are
subscribed to and the underlying state of the subscription itself are
different things.

Quote:

So I can follow the Yealink logic. Can you ?

Not really as it doesn't make sense to me. Do you have a link to the
documentation for this?

I've also done a search on the issue tracker and there have been no
issues filed ever about subscriptions and specifically Yealink.

--
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

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
jcolp at digium.com
Guest





PostPosted: Thu Jul 31, 2014 9:16 am    Post subject: [asterisk-users] Subscription-State always active ? Reply with quote

Jonas Kellens wrote:
Quote:

Hello,


I was reading this post :
http://forum.yealink.com/forum/showthread.php?tid=894


http://forum.yealink.com/forum/showthread.php?tid=894&pid=4794#pid4794

Has the explanation.

Since they are using dialog-info+xml there's nothing different between
"not in use" and "unavailable".

--
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

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
jonas.kellens at telen...
Guest





PostPosted: Thu Jul 31, 2014 9:19 am    Post subject: [asterisk-users] Subscription-State always active ? Reply with quote

On 31-07-14 15:06, Joshua Colp wrote:
Quote:
Jonas Kellens wrote:
Quote:
On 31-07-14 14:28, Joshua Colp wrote:
Quote:
Jonas Kellens wrote:
Quote:

Hello,

I read on Yealink support that Yealink IP-phones expect
"Subscription-State:terminated" for there Presence/BLF-functionality.

So how can I get "Subscription-State:terminated" on Asterisk ?

That would be a bit strange as the subscription would then be
terminated, no more NOTIFY messages would go to it which would defeat
the purpose of subscribing to something. The only way to achieve that
would be to have the phone unsubscribe or to change the code to force
it to terminate the subscription under certain circumstances. This
would require knowing the exact specifications and details of what
they expect and when. Is there currently a problem you are facing with
subscription support?


Hello,

this "Subscription-State:terminated" is expected when the IP-phone goes
offline (Unregister or cut off from power).

I would expect that if the phone that went offline was subscribed to stuff and the subscription expired.

Quote:
At that moment indeed the IP-phone no longer sends NOTIFY messages.
Also, Asterisk knows very well the SIP peer becomes unreachable (see my
first post). But still Asterisk replies "Subscription-State: active" to
the IP-phones that request the state of the offline SIP peer.

Generally IP phones don't send NOTIFY messages. They are sent NOTIFY messages to inform them of the state of things they have subscribed to (such as devices or mailboxes).

Quote:


Yealink expects "Subscription-State:terminated" so the Yealink IP-phone
can put out the BLF light (in stead of staying in a green mode, which
indicates that the SIP peer is still online but not in a call).

Sending Subscription-State:terminated terminates the subscription. If the device in question comes back online you can't send any new NOTIFY messages because the subscription is gone. The state of what you are subscribed to and the underlying state of the subscription itself are different things.

Quote:

So I can follow the Yealink logic. Can you ?

Not really as it doesn't make sense to me. Do you have a link to the documentation for this?

I've also done a search on the issue tracker and there have been no issues filed ever about subscriptions and specifically Yealink.

Hello,


I was reading this post : http://forum.yealink.com/forum/showthread.php?tid=894


Jonas.
Back to top
jonas.kellens at telen...
Guest





PostPosted: Thu Jul 31, 2014 11:05 am    Post subject: [asterisk-users] Subscription-State always active ? Reply with quote

On 31-07-14 16:14, Joshua Colp wrote:

Quote:
Jonas Kellens wrote:
Quote:

Hello,


I was reading this post :
http://forum.yealink.com/forum/showthread.php?tid=894


http://forum.yealink.com/forum/showthread.php?tid=894&pid=4794#pid4794

Has the explanation.

Since they are using dialog-info+xml there's nothing different between "not in use" and "unavailable".


Hello,

the explanation is that is does not work with Asterisk ? I don't understand. Asterisk sends dialog-info+xml, right ?! You can see it in my first post :


<?xml version="1.0"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="7" state="full" entity="sip:10@ip-sip-server">
<dialog id="10">
<state>terminated</state>
</dialog>
</dialog-info>


Kind regards,

Jonas.
Back to top
jcolp at digium.com
Guest





PostPosted: Thu Jul 31, 2014 11:10 am    Post subject: [asterisk-users] Subscription-State always active ? Reply with quote

Jonas Kellens wrote:
Quote:

Hello,

the explanation is that is does not work with Asterisk ? I don't
understand. Asterisk sends dialog-info+xml, right ?! You can see it in
my first post :

It does not work because the specification for dialog-info+xml has no
difference between "not on the phone" and "offline".

--
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

--
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services