0

I have written a service for handling sip call. I want to make some additional feature to restrict a call time by configuring a fix time or handling the call time value by sending with some parameter. Once a sip call got established generally it will be terminate with the end users response as CANCEL or BYE but before that if i want to restrict it to some fixed time, is it possible ? Once a sip call got established if i've fixed a time as 5 minutes so even if the end user doesn't will to end the call, the call should be terminate automatically after 5 minutes. I've gone through expires header which doesn't seems to be helpful on this.

abhisek
  • 337
  • 1
  • 3
  • 11

2 Answers2

0

One option is this can be done at client. In the client we can have configurable timer. Once the call starts start the same and when it fires terminated the call.

Other option is to do at the server side where server does the same.

Anantha Krishnan
  • 501
  • 1
  • 4
  • 7
  • hi Krishnan, can you elaborate some what more regarding configurable timer on client side ? i dont have access to server side so while receiving response from server in what response i can send what parameter which will handle the timer ? – abhisek Feb 04 '16 at 11:39
  • @abhisek You can set timer "t" in the SDP packet. You can explore more about this in RFC4566 – r2_d2 Feb 19 '16 at 11:58
0

Yes, it's possible. It's usually better to do that on the server side as it's usually tied to charging. Like if user runs out of money terminate the call.

You need your call to go through a Back to Back User Agent Application which will handle that. The B2BUA which will start a timer which after it expires, will be responsible for sending the BYE to both legs to terminate the call. You can do this on Restcomm SIP Servlets, there is an example of a B2BUA at https://github.com/RestComm/sip-servlets/tree/master/sip-servlets-examples/call-forwarding.

If you want to do this on the client, you will need to have control over the client code and implement a similar logic, ie starts a timer that will send the BYE when it expires.

jeand
  • 2,325
  • 14
  • 12