drachtio-server
drachtio-server copied to clipboard
How to set SIP Timer C?
Dear Sir,
I checked current timers configuration, But there no timer for SIP Timer C. How could I set this via drachtio,.conf.xml?
Best Regards, Jihyun Yu
Good question. I am not sure whether the sofia stack exposes a configuration setting for timer C. I will check.
So you are referring to a scenario where drachtio server is acting as a sip proxy, correct?
Good question. I am not sure whether the sofia stack exposes a configuration setting for timer C. I will check.
So you are referring to a scenario where drachtio server is acting as a sip proxy, correct?
Yes. I'm using drachtio server as a sip proxy (gateway) for webrtc. Please let me know the results of setting Timer C.
Is there any update?
Yes, I have looked at the code and recalled that I actually set timer C (good news). It is not currently exposed through a configuration variable, though that could be done.
However, this section of RFC 3261 seems pretty explicit about its duration:
11. Set timer C
In order to handle the case where an INVITE request never
generates a final response, the TU uses a timer which is called
timer C. Timer C MUST be set for each client transaction when
an INVITE request is proxied. The timer MUST be larger than 3
minutes.
I presume you want to set it shorter than 3 minutes, which would violate the spec. Why do you need a shorter duration - i.e. what is your use case?
Yes, I have looked at the code and recalled that I actually set timer C (good news). It is not currently exposed through a configuration variable, though that could be done.
However, this section of RFC 3261 seems pretty explicit about its duration:
11. Set timer C In order to handle the case where an INVITE request never generates a final response, the TU uses a timer which is called timer C. Timer C MUST be set for each client transaction when an INVITE request is proxied. The timer MUST be larger than 3 minutes.I presume you want to set it shorter than 3 minutes, which would violate the spec. Why do you need a shorter duration - i.e. what is your use case?
Thanks for updating me. Actually, I have to increase Timer C value up to 1 hour to meet our customer's requirement. The shorter value is not my focus. Please let me know the way to set Timer C value through the configuration.
Many Thanks.
I will look into making it configurable
Ok. Thanks. I will wait for your update.
Any update here?
I will try to test out this change this week, if possible. I have not prioritized it highly because your use case seems unlikely to be of general interest.
I have pushed a branch called 'timerc-proxy', can you test this there?
You can set a timer C value in the config, command-line or env vars. This will only apply to proxy processing, not B2BUA. The value is in units of seconds, and MUST be greater than 180.
For instance, to set timer c to 5 minutes:
via config file:
<sip>
<proxy-timer-c>300</proxy-timer-c>
</sip>
via command line:
drachtio --proxy-timer-c 300
via env:
DRACHTIO_PROXY_TIMER_C=300 drachtio
Could you please test and let me know the results?
Many thanks for your support. But I use Drachtio sip server within Docker. Please let me know what the image I have to use for test 'timerc-proxy'.
docker pull drachtio/drachtio-server:timerc-proxy
Sorry to late reply. I checked the results of setting timer C as 3600 secs with above docker image, But it does not work. The call is canceled by default value 180 secs. Please double checked it.

You can see that above lines show configured value is set into drachtio,

But sofia does not get that value and then set it 180 sec as a default.
Is there any update?
Is there any update yet?
sorry, will get a fix out today/tomorrow
Thanks. When can I get the fixed docker image?
When can I get the fixed docker image?
I just pushed a commit and docker image is building now. I tested with a timerC value of 300 seconds (5 mins) and it worked for me.
Sorry for the delay on this.
ok docker image is available, please retest and let me know the results.
Thx. The tag name of the image is same?
I tried to rest with the new image at same tag, timerc-proxy. But it is not worked with the timer C value 3600 seconds.
Strange because it worked for me. Can you share a complete drachtio log with loglevel = debug and sofia loglevel 9
Uh, I don't see any call being proxied in that log. I see an outbound INVITE sent as a UAC, which is different.
timer C only applies to proxies
Attached log describes that 1 UAC and 1 UAS with different call id respectively at same drachtio server. So is there no way to resolve this in that case?
timer C specifically and only applies to proxy transactions:
https://tools.ietf.org/html/rfc3261#page-265
And per your request, that is what I have done. This means that it will be triggered when an app uses srf.proxyRequest
So now you are telling me you are not proxying the request ??
I do not use srf.proxyRequest. I use both srf.createUAC and srf.createUAS.
So I want to make the inbound call cannot be canceled by Drachtio itself at the short time, 3mins. And I want to set that ringing timer(i.e. no-answer wait timer) via Draachtio's configuration up to 1 hour. Is it possible?