sip "ping" / options method to determine the operational status of a sip trunk RRS feed

  • Question

  • Hi

    I am looking for a method to monitor the sip trunk aka the connection between our mediation server and the ISPs sip trunk gw. I found this rfc ( and the use of the sip options method might be a good option. The question is if the mediation server has this functionality built in or if not someone knows an app or a script that does the trick. Other than the sip options communication it is offcorse a "must" that its able to alert me when the communication is down by ex email.
    Or if anyone has another suggestion please let me know of it :)

    Thanks in advance!

    Friday, September 24, 2010 12:47 PM

All replies

  • Hello Jonatan,

    Interesting question!

    The Lync mediation server supports the sending of and answering to SIP OPTIONS ping, as you can see of my logs below.

    You could possibly write a script in SIPp for example to send OPTIONS pings to the mediation server.

    However, I think you would need to configure your mediation server with a "next hop" / "sip trunk" pointing to the IP of the computer you are going to use to do the pinging. Or possibly the Lync mediation server could be set up to accept SIP messages from any incoming IP address?

    Example of Lync sending a SIP options ping:

    OPTIONS sip: SIP/2.0
    FROM: <;transport=Tcp;ms-opaque=ecf1ab4a34dd4f06>;epid=A30F2498B7;tag=6a78177e1
    TO: <sip:>
    CSEQ: 4351 OPTIONS
    CALL-ID: d4e0df91996b43d087e11706fb7c3dae
    VIA: SIP/2.0/TCP;branch=z9hG4bKda4bc549
    CONTACT: <sip:stolync.lab.lcl:5060;transport=Tcp;maddr=>
    USER-AGENT: RTCC/ MediationServer


    SIP/2.0 200 OK
    FROM: <;transport=Tcp;ms-opaque=ecf1ab4a34dd4f06>;epid=A30F2498B7;tag=6a78177e1
    TO: <sip:>;tag=SD50i1399-5c2eff7ee20883dc6fcfd8e6637f3308.42c7
    CSEQ: 4351 OPTIONS
    CALL-ID: d4e0df91996b43d087e11706fb7c3dae
    VIA: SIP/2.0/TCP;branch=z9hG4bKda4bc549
    Accept: */*
    Accept-Language: en
    Server: OpenSIPS (1.4.3-notls (i686/linux))
    Content-Length: 0

    Example of Acme sending a SIP options ping to Lync:

    OPTIONS;transport=tcp SIP/2.0
    Via: SIP/2.0/TCP;branch=z9hG4bK1dftos00203hllce83c1
    Call-ID: fb018378727650901dffb4be0eba91720000090@
    From: <sip:ping@>;tag=3a658ae239d0f88a98319696327c3e070000090
    Max-Forwards: 70
    CSeq: 18 OPTIONS
    Route: <sip:;lr>
    Content-Length: 0


    SIP/2.0 200 OK
    FROM: <sip:ping@>;tag=3a658ae239d0f88a98319696327c3e070000090
    TO: <>;tag=b891de15b
    CALL-ID: fb018378727650901dffb4be0eba91720000090@
    VIA: SIP/2.0/TCP;branch=z9hG4bK1dftos00203hllce83c1
    ACCEPT: application/sdp
    SERVER: RTCC/ MediationServer


    Tuesday, September 28, 2010 9:28 AM
  • Hi

    Thanks for your reply Kressmark.
    I have now set up my own Lync lab, so could you please elaborate on how you configured it? And if you have any good ideas on how to monitor the response, do tell :)
    What i would like is to get a warning of some sort, preferably in a monitoring system like Orion/Solarwinds. But email notifications would also be acceptable.


    Tuesday, November 23, 2010 3:49 PM
  • If you examine the traffic between Lync Mediation and the SIP Trunk GTW, you will notice that Mediation sends OPTIONS request every few seconds. This not so much to become aware if the options have changed, but rather be aware of the trunk's availability/reachability. In case (I am not sure if the number is three or five) failures, a warning will be generated in a Log event that the gateway is marked as ‘down” will be registered.   This, however is informational, since if a call is placed at this time, it is not rejected, but rather an attempt to send the call to the GTW is made and it is successful, another event – “The gateway is or operational” or so is generated.


    In conclusion, SCOM could do exactly what you need.



   | MVP Snom OCS Edition
    Wednesday, November 24, 2010 4:08 AM