How To Send SIP_NOTIFY Messages With Variable Content ?

Home » Asterisk Users » How To Send SIP_NOTIFY Messages With Variable Content ?
Asterisk Users 8 Comments

Hello,

One common mean to remotely configure a phone is to send it some XML data using HTTP. Of course, this XML data is vendor specific but thanks to Asterisk multiple tools, it is quite easy to customize your dialplan to both build and send this specific XML data.

I have just discovered one interesting capability from one phone vendor:
getting XML data from incoming SIP NOTIFY messages instead of plain HTTP.

This has an advantage with remote phones as you do not have to keep an HTTP
connection alive to Asterisk box send XML content to registered phones.

I have just tried this capability: it works fine but I am now facing an issue: for the moment, I must regenerate and reload a specific sip_notify config file, each time I need to send some specific content.

If I am not mistaken, there is no Dialplan function or application able to send SIP NOTIFY, right ?

Would you rate it as a welcome addition, either for SIP or PJSIP stack ?

Regards

8 thoughts on - How To Send SIP_NOTIFY Messages With Variable Content ?

  • Thinking over my previous, I wonder if sipsak could be used to send outgoing SIP NOTIFY messages. Would both Asterisk and sipsak be able to share networks resources ?

    Thoughts ?

    2017-01-16 14:10 GMT+01:00 Olivier :

  • I would be very interested in using sipsak for something like this. What have you tried so far?

    -Thufir

    [..]

  • 2017-01-17 15:36 GMT+01:00 Thufir Hawat :

    What do you mean by “using sipsak” in the above sentence ?
    I would much prefer use a PJSIP_NOTIFY dialplan function than use sipsak directly.

    The way I see it is Asterisk already has eveything needed to send “out of band” SIP NOTIFY through SIP or PJSIP. What is currently missing is the dialplan function accessing the same low-level C functions that SIP NOTIFY CLI currently uses.

    On a side note, to my knowledge, SIP NOTIFY is currently used:
    – for MWI,
    – for rebooting/triggering SIP phones
    – for reconfiguring SIP phones (I’ve just discovered this usage).

    Do you know other usages ?

  • For reconfiguring SIP phones? Can you give an example or short explanation?

    Thanks;

    John V.

    From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] Thinking over my previous, I wonder if sipsak could be used to send outgoing SIP NOTIFY messages. Would both Asterisk and sipsak be able to share networks resources ?

    Thoughts ?

    2017-01-16 14:10 GMT+01:00 Olivier :

    [..]

  • One can send a SIP notify with a check-config to the phone and have the phone re-download it’s configuration files from a provisioning server.

    In the CLI, you can do a SIP NOTIFY with one of

    cisco-check-cfg, grandstream-check-cfg, polycom-check-cfg, sipura-check-cfg, snom-check-cfg

    and the extension.

    I’ve done it with Yealink phones too, don’t have the proper syntax in front of me though.

    Mark

  • snom could get lots of configuration options thru sip notify i once tried updateing the display name on hot desking but ran in to his problem of having to add it to sip conf staticly

  • 2017-01-18 15:58 GMT+01:00 Tech Support :

    Yes sure: you can change whatever Yealink configuration setting you like through http/XML or SIP NOTIFY.

    For instance, the following sip_notify.conf extract works for me:

    [hello-yealink]
    Event=Yealink-xml Content-type=application/xml Content=< ?xml version="1.0" encoding="ISO-8859-1"?>
    Content=
    Content=Push test
    Content=This is a test for pushing text to a phone.
    Content=

    Content As you may guess, having to change sip_notify.conf anytime you want to change the displayed message is not very attractive.

  • 2017-01-18 19:35 GMT+01:00 Israel Gottlieb :

    I didn’t know that.

    Here, you mean sip_notify.conf, right ?