Arch x86_64
OS CentOS-6.4 (freepbx)
Asterisk 11.4
FreePBX 2.11.0.4

Snom870 with FW-8.7.4.8


What I am attempting to do is to set a different background colour for
the BLF vkeys when a station is set to DND.  This is supposedly
accomplished through this setting in the phones provisioning file:

<vkey_blue perm="RW">
DND
Blue.on
Blue.pickup
Blue.park
Blue.message
</vkey_blue>

However, this does not work.  What instead works when DND is set is this:

<vkey_blue perm="RW">
CONNECTED
Blue.on
Blue.pickup
Blue.park
Blue.message
</vkey_blue>

Which makes no sense to me.  However, I infer that somewhere in the
bowels of Asterisk something is set for DND which the Snom interprets
as CONNECTED instead.  It is what this something is and how it is set
that I am trying to understand.

To further this I am trying to discover is exactly what is sent to the
other stations by asterisk when DND is enabled for a station.  Short
of installing wireshark is there any other way to see exactly what
asterisk is sending to the phone?

When I look at the SIP trace logs on the handset when switch dnd on
and off on another handset I see this sort of thing:

Received from udp:192.168.6.9:5060 at 16/7/2013 11:56:14:422 (693 bytes):

NOTIFY sip:[email protected]:3072;line=d241fk25 SIP/2.0
Via: SIP/2.0/UDP 192.168.6.9:5060;branch=z9hG4bK56d306e4;rport
Max-Forwards: 70
From: <sip:[email protected];>;tag=as149ada79
To: <sip:[email protected]>;tag=tyybvtkyiy
Contact: <sip:[email protected]:5060>
Call-ID: 455FE451B390010B19F8CAE0BE485B25-ju0bdbwv885i
CSeq: 191 NOTIFY
User-Agent: FPBX-2.11.0(11.4.0)
Subscription-State: active
Event: dialog
Content-Type: application/dialog-info+xml
Content-Length: 206

<?xml version="1.0"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="89"
state="full" entity="sip:[email protected]">
<dialog id="41712">
<state>confirmed</state>
</dialog>
</dialog-info>

Sent to udp:192.168.6.9:5060 at 16/7/2013 11:56:14:426 (300 bytes):

SIP/2.0 200 Ok
Via: SIP/2.0/UDP 192.168.6.9:5060;branch=z9hG4bK56d306e4;rport=5060
From: <sip:[email protected];>;tag=as149ada79
To: <sip:[email protected]>;tag=tyybvtkyiy
Call-ID: 455FE451B390010B19F8CAE0BE485B25-ju0bdbwv885i
CSeq: 191 NOTIFY
User-Agent: snom870/8.7.4.8
Content-Length: 0

Received from udp:192.168.6.9:5060 at 16/7/2013 11:56:16:051 (693 bytes):

NOTIFY sip:[email protected]:3072;line=d241fk25 SIP/2.0
Via: SIP/2.0/UDP 192.168.6.9:5060;branch=z9hG4bK49b47181;rport
Max-Forwards: 70
From: <sip:[email protected];>;tag=as149ada79
To: <sip:[email protected]>;tag=tyybvtkyiy
Contact: <sip:[email protected]:5060>
Call-ID: 455FE451B390010B19F8CAE0BE485B25-ju0bdbwv885i
CSeq: 192 NOTIFY
User-Agent: FPBX-2.11.0(11.4.0)
Subscription-State: active
Event: dialog
Content-Type: application/dialog-info+xml
Content-Length: 206

<?xml version="1.0"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="90"
state="full" entity="sip:[email protected]">
<dialog id="41712">
<state>confirmed</state>
</dialog>
</dialog-info>

Sent to udp:192.168.6.9:5060 at 16/7/2013 11:56:16:055 (300 bytes):

SIP/2.0 200 Ok
Via: SIP/2.0/UDP 192.168.6.9:5060;branch=z9hG4bK49b47181;rport=5060
From: <sip:[email protected];>;tag=as149ada79
To: <sip:[email protected]>;tag=tyybvtkyiy
Call-ID: 455FE451B390010B19F8CAE0BE485B25-ju0bdbwv885i
CSeq: 192 NOTIFY
User-Agent: snom870/8.7.4.8
Content-Length: 0

Sent to udp:192.168.6.9:5060 at 16/7/2013 11:56:16:672 (483 bytes):

SUBSCRIBE sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.6.120:3072;branch=z9hG4bK-f20yldu080fk;rport
From: <sip:[email protected]>;tag=se3w15c5fb
To: <sip:[email protected];>;tag=as6723ebb5
Call-ID: 455FE4519A6B01B916F8CAE0BE485B25-x08c2euu13zz
CSeq: 63 SUBSCRIBE
Max-Forwards: 70
User-Agent: snom870/8.7.4.8
Contact: <sip:[email protected]:3072;line=d241fk25>;reg-id=1
Event: dialog
Accept: application/dialog-info+xml
Expires: 3600
Content-Length: 0

Received from udp:192.168.6.9:5060 at 16/7/2013 11:56:16:674 (529 bytes):

SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP
192.168.6.120:3072;branch=z9hG4bK-f20yldu080fk;received=192.168.6.120;rport=3072
From: <sip:[email protected]>;tag=se3w15c5fb
To: <sip:[email protected];>;tag=as6723ebb5
Call-ID: 455FE4519A6B01B916F8CAE0BE485B25-x08c2euu13zz
CSeq: 63 SUBSCRIBE
Server: FPBX-2.11.0(11.4.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY,
INFO, PUBLISH
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk",
nonce="510db654"
Content-Length: 0

Sent to udp:192.168.6.9:5060 at 16/7/2013 11:56:16:680 (648 bytes):

SUBSCRIBE sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.6.120:3072;branch=z9hG4bK-6lft658u13gn;rport
From: <sip:[email protected]>;tag=se3w15c5fb
To: <sip:[email protected];>;tag=as6723ebb5
Call-ID: 455FE4519A6B01B916F8CAE0BE485B25-x08c2euu13zz
CSeq: 64 SUBSCRIBE
Max-Forwards: 70
User-Agent: snom870/8.7.4.8
Contact: <sip:[email protected]:3072;line=d241fk25>;reg-id=1
Event: dialog
Accept: application/dialog-info+xml
Authorization: Digest
username="41720",realm="asterisk",nonce="510db654",uri="sip:[email protected]:5060",response="802e69ee4fca8e75636fcf72b6167069",algorithm=MD5
Expires: 3600
Content-Length: 0

Received from udp:192.168.6.9:5060 at 16/7/2013 11:56:16:683 (510 bytes):

SIP/2.0 200 OK
Via: SIP/2.0/UDP
192.168.6.120:3072;branch=z9hG4bK-6lft658u13gn;received=192.168.6.120;rport=3072
From: <sip:[email protected]>;tag=se3w15c5fb
To: <sip:[email protected];>;tag=as6723ebb5
Call-ID: 455FE4519A6B01B916F8CAE0BE485B25-x08c2euu13zz
CSeq: 64 SUBSCRIBE
Server: FPBX-2.11.0(11.4.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY,
INFO, PUBLISH
Supported: replaces, timer
Expires: 3600
Contact: <sip:[email protected]:5060>;expires=3600
Content-Length: 0

Received from udp:192.168.6.9:5060 at 16/7/2013 11:56:16:686 (694 bytes):

NOTIFY sip:[email protected]:3072;line=d241fk25 SIP/2.0
Via: SIP/2.0/UDP 192.168.6.9:5060;branch=z9hG4bK6c7fbe14;rport
Max-Forwards: 70
From: <sip:[email protected];>;tag=as6723ebb5
To: <sip:[email protected]>;tag=se3w15c5fb
Contact: <sip:[email protected]:5060>
Call-ID: 455FE4519A6B01B916F8CAE0BE485B25-x08c2euu13zz
CSeq: 187 NOTIFY
User-Agent: FPBX-2.11.0(11.4.0)
Subscription-State: active
Event: dialog
Content-Type: application/dialog-info+xml
Content-Length: 207

<?xml version="1.0"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="85"
state="full" entity="sip:[email protected]">
<dialog id="41710">
<state>terminated</state>
</dialog>
</dialog-info>

Sent to udp:192.168.6.9:5060 at 16/7/2013 11:56:16:690 (300 bytes):

SIP/2.0 200 Ok
Via: SIP/2.0/UDP 192.168.6.9:5060;branch=z9hG4bK6c7fbe14;rport=5060
From: <sip:[email protected];>;tag=as6723ebb5
To: <sip:[email protected]>;tag=se3w15c5fb
Call-ID: 455FE4519A6B01B916F8CAE0BE485B25-x08c2euu13zz
CSeq: 187 NOTIFY
User-Agent: snom870/8.7.4.8
Content-Length: 0


I see neither DND not CONNECTED an any of this.  Either these phone
logs are incomplete or what is passed over the wire differs from what
is displayed in the Asterisk trace.  I lack the knowledge to determine
which is the case.

In Asterisk -rvvvvvvvvvvv I see this (among musch else):

  == Extension Changed 41712[ext-local] new state InUse for Notify
User 41720
    -- Executing [*78@from-internal-original:2]
Wait("SIP/41712-000009e4", "1") in new stack
    -- Executing [*78@from-internal-original:3]
Macro("SIP/41712-000009e4", "user-callerid,") in new stack
    -- Executing [s@macro-user-callerid:1] Set("SIP/41712-000009e4",
"TOUCH_MONITOR=1373990250.7222") in new stack
    -- Executing [s@macro-user-callerid:2] Set("SIP/41712-000009e4",
"AMPUSER=41712") in new stack
. . .

 Set("SIP/41712-000009e4", "DB(DND/41712)=YES") in new stack
    -- Executing [*78@from-internal-original:5]
Set("SIP/41712-000009e4", "STATE=BUSY") in new stack
    -- Executing [*78@from-internal-original:6]


Gosub("SIP/41712-000009e4", "app-dnd-on,sstate,1()") in new stack
    -- Executing [sstate@app-dnd-on:1] Set("SIP/41712-000009e4",
"DEVICE_STATE(Custom:DND41712)=BUSY") in new stack

So, I am guessing that DB(DND/41712)=YES is telling the asterisk
database to change the status but I am not sure where "STATE=BUSY" is
going, perhaps BUSY=CONNECTED; and I cannot see where extension 41720
is being passed anything that resembles what I see in that unit's own
trace log.

Can somebody guide me through what it is I am seeing here?  How do I
pass DND to the other extensions?


-- 
***          E-Mail is NOT a SECURE channel          ***
James B. Byrne                mailto:[email protected]
Harte & Lyne Limited          http://www.harte-lyne.ca
9 Brockley Drive              vox: +1 905 561 1241
Hamilton, Ontario             fax: +1 905 561 0757
Canada  L8E 3C3


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

Reply via email to