[asterisk-dev] Synchronize DND with as-feature-event

Kai Hoerner kai at ciphron.de
Wed Oct 28 10:06:02 CDT 2009


Hi Benny,

you're right, directly synchronizing snom BLFs from dialplan is not part 
of the asterisk feature list.
(and will probably never become a part of it, since its not a standard i 
believe)


if you want to do it that way, please try the following snippet:

exten => s,1,SIPAddHeader(Content-Type: application/x-buttons)
exten => s,n,SendText(${YOUR_BLF_VALUES})

i'm not 100% sure if it works, since i have not tested it. hopefully 
this will generate a SIP MESSAGE with your desired content and Content-Type.


another approach worth a suggestion is using the "Custom" hints for the 
BLF state:

your snom phone SUBSCRIBES to extension "*DND*77" for example, where 77 
is your SIP peer name.
In the matching extension ("*DND*XX) you toggle DND internally for XX 
and use DEVICE_STATE() to set the Custom Hint to the matching state.
Dont forget to properly define the matching hints for these custom states.


That way round IMHO is the more sane solution, since all logic should be 
in dialplan.
Fact is, this wont work only for snom and polycom, but a lot of other 
vendors as well. (including the cheap grandstream phones)



Benny Amorsen schrieb:
> Snom (with v8 firmware) and Polycom phones have a neat feature where
> they can synchronize the state of DND and call forwarding with the SIP
> server. This is rather neat, since Asterisk can then avoid sending calls
> to a phone which is going to reject them anyway.
>
> As far as I can tell, Asterisk has no way to handle such messages in the
> dial plan, and no application to send them to the phone...
>
> Alternatively Snom phones accept having their DND "light" turned on/off
> by a BLF message, which gets me halfway there. However, I can't find a
> way to send SIP MESSAGE events with Content-Type: application/x-buttons.
> Well, strictly speaking that is not true, I could use SIPSAK to send the
> message, but that seems rather crude.
>
>
> /Benny
>
>
>
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev
>
>   




More information about the asterisk-dev mailing list