[Freeswitch-dev] Phone Feature Synchronization

Kevin Wormington kworm at missouri-telecom.com
Thu Oct 16 22:38:21 MSD 2014


Hi,

I'm trying out the "feature synchronization" functionality of the new 
.73 beta firmware for the T46G that allows the phone to notify 
FreeSWITCH of DND and Forwarding status.  The phone is using SUBSCRIBE 
messages to do this (example below) and FS processes them in 
sofia_presence.c and generates a SWITCH_EVENT_PHONE_FEATURE_SUBSCRIBE 
event.  I don't see that this event is handled anywhere in mod_sofia.  I 
would like to add a configurable feature at let FS emulate key system 
behavior and in the case of DND update the presence to be DND/Busy so 
the BLF lights on other UA would indicate busy.  I know this is not 
necessarily what BLF means but most old key systems have this behaviour.

I have not made an extensive review of mod_sofia but I would think this 
would be implemented there where the csta stuff is.  I can play around 
with it, but wanted to see if anyone else had an opinion on it or if I'm 
completely missing some other way to do it other than using ESL to catch 
events and send new ones.

Here is an example of DND being activated:
    ------------------------------------------------------------------------
    SUBSCRIBE sip:1000 at 192.168.1.175:5060 SIP/2.0
    Via: SIP/2.0/UDP 192.168.1.106:5062;branch=z9hG4bK2975756387
    From: <sip:1000 at 192.168.1.175>;tag=2420321046
    To: <sip:1000 at 192.168.1.175>;tag=YKBD9deNLnnN
    Call-ID: 3592119465 at 192.168.1.106
    CSeq: 5 SUBSCRIBE
    Contact: <sip:1000 at 192.168.1.106:5062>
    Authorization: Digest username="1000", realm="192.168.1.175", 
nonce="71a73470-5561-11e4-9781-81e6a6ef6342", 
uri="sip:1000 at 192.168.1.175:5060", 
response="78e97ccca503de4e7490b0bbbf2f35ef", algorithm=MD5, 
cnonce="0a4f113b", qop=auth, nc=00000004
    Content-Type: application/x-as-feature-event+xml
    Max-Forwards: 70
    User-Agent: Yealink SIP-T46G 28.73.0.16
    Expires: 3630
    Event: as-feature-event
    Content-Length: 185

    <?xml version="1.0" encoding="ISO-8859-1"?><SetDoNotDisturb 
xmlns="http://www.ecma-international.org/standards/ecma-323/csta/ed3"><doNotDisturbOn>true</doNotDisturbOn></SetDoNotDisturb>



And turning off:
    ------------------------------------------------------------------------
    SUBSCRIBE sip:1000 at 192.168.1.175:5060 SIP/2.0
    Via: SIP/2.0/UDP 192.168.1.106:5062;branch=z9hG4bK264963740
    From: <sip:1000 at 192.168.1.175>;tag=2420321046
    To: <sip:1000 at 192.168.1.175>;tag=YKBD9deNLnnN
    Call-ID: 3592119465 at 192.168.1.106
    CSeq: 6 SUBSCRIBE
    Contact: <sip:1000 at 192.168.1.106:5062>
    Authorization: Digest username="1000", realm="192.168.1.175", 
nonce="71a73470-5561-11e4-9781-81e6a6ef6342", 
uri="sip:1000 at 192.168.1.175:5060", 
response="4042dfcf7590c1d5187aa4b260275991", algorithm=MD5, 
cnonce="0a4f113b", qop=auth, nc=00000005
    Content-Type: application/x-as-feature-event+xml
    Max-Forwards: 70
    User-Agent: Yealink SIP-T46G 28.73.0.16
    Expires: 3630
    Event: as-feature-event
    Content-Length: 186

    <?xml version="1.0" encoding="ISO-8859-1"?><SetDoNotDisturb 
xmlns="http://www.ecma-international.org/standards/ecma-323/csta/ed3"><doNotDisturbOn>false</doNotDisturbOn></SetDoNotDisturb>




Join us at ClueCon 2014 Aug 4-7, 2014
More information about the FreeSWITCH-dev mailing list