rtpengine readme tells:
via-branch=... - Include the “branch” value of one of the “Via” headers in the request to the RTP proxy. Possible values are: “1” - use the first “Via” header; “2” - use the second “Via” header; “auto” - use the first “Via” header if this is a request, or the second one if this is a reply; “extra” - don't take the value from a header, but instead use the value of the “extra_id_pv” variable. This can be used to create one media session per branch on the RTP proxy. When sending a subsequent “delete” command to the RTP proxy, you can then stop just the session for a specific branch when passing the flag '1' or '2' in the “rtpengine_delete”, or stop all sessions for a call when not passing one of those two flags there.
if via-branch=extra is used in offers of branched, should it also be used in answers and deletes?
-- juha
Juha Heinanen writes:
via-branch=... - Include the “branch” value of one of the “Via” headers in the request to the RTP proxy. Possible values are: “1” - use the first “Via” header; “2” - use the second “Via” header; “auto” - use the first “Via” header if this is a request, or the second one if this is a reply; “extra” - don't take the value from a header, but instead use the value of the “extra_id_pv” variable. This can be used to create one media session per branch on the RTP proxy. When sending a subsequent “delete” command to the RTP proxy, you can then stop just the session for a specific branch when passing the flag '1' or '2' in the “rtpengine_delete”, or stop all sessions for a call when not passing one of those two flags there.
if via-branch=extra is used in offers of branched, should it also be used in answers and deletes?
i made some experiments on this. i used "extra" in both offer and answer. when i delete a branch of a two branch call using "extra", i get to syslog:
Nov 19 04:39:53 lohi /usr/bin/sip-proxy[17427]: INFO: ===== rtpengine_delete(via-branch=extra) branch <z9hG4bK8c24c4009181072c1> Nov 19 04:39:53 lohi rtpengine[13555]: [aced513d17fc9ff5] Received command 'delete' from 192.98.102.10:41009 Nov 19 04:39:53 lohi rtpengine[13555]: [aced513d17fc9ff5] Dump for 'delete' from 192.98.102.10:41009: { "call-id": "aced513d17fc9ff5", "via-branch": "z9hG4bK8c24c4009181072c1", "received-from": [ "IP4", "192.98.102.10" ], "from-tag": "be4468b7fa8902f6", "command": "delete" } Nov 19 04:39:53 lohi rtpengine[13555]: [aced513d17fc9ff5] Scheduling deletion of call branch 'be4468b7fa8902f6' in 30 seconds
why is it telling that the branch to be deleted is that of the from tag, i.e., the whole call?
i then made another test, using "1" in delete and got:
Nov 19 04:42:18 lohi /usr/bin/sip-proxy[30711]: INFO: ===== rtpengine_delete(via-branch=1) branch <z9hG4bKa0c011f1e570422e1> Nov 19 04:42:18 lohi rtpengine[13555]: [4b4b6950709a0353] Received command 'delete' from 192.98.102.10:59697 Nov 19 04:42:18 lohi rtpengine[13555]: [4b4b6950709a0353] Dump for 'delete' from 192.98.102.10:59697: { "call-id": "4b4b6950709a0353", "via-branch": "z9hG4bKa0c011f1e570422e", "received-from": [ "IP4", "192.98.102.10" ], "from-tag": "70283a0a11af785c", "command": "delete" } Nov 19 04:42:18 lohi rtpengine[13555]: [4b4b6950709a0353] Scheduling deletion of call branch '70283a0a11af785c' in 30 seconds
again the same thing, i.e., from tag branch is to be deleted.
after answering, i kept the call up for a couple of minutes and in both cases the whole call was not deleted.
also, in either case i didn't get any notice to syslog when the scheduled deletion of the call branch actually happened.
what is the proper via-branch value in rtpengine_delete? based on above, it does not seem to matter if i use "extra" or "1".
also, does rtpengine_delete need to be called at all on a failed branch, i.e., would the offer timeout anyhow, since matching answer never game?
-- juha
On 11/18/2015 08:47 AM, Juha Heinanen wrote:
rtpengine readme tells:
via-branch=... - Include the “branch” value of one of the “Via” headers in the request to the RTP proxy. Possible values are: “1” - use the first “Via” header; “2” - use the second “Via” header; “auto” - use the first “Via” header if this is a request, or the second one if this is a reply; “extra” - don't take the value from a header, but instead use the value of the “extra_id_pv” variable. This can be used to create one media session per branch on the RTP proxy. When sending a subsequent “delete” command to the RTP proxy, you can then stop just the session for a specific branch when passing the flag '1' or '2' in the “rtpengine_delete”, or stop all sessions for a call when not passing one of those two flags there.
if via-branch=extra is used in offers of branched, should it also be used in answers and deletes?
Yes it should, as rtpengine uses the via-branch to match the answers to the offers which didn't have a to-tag. Looking at the sources, the same logic appears to be missing in the code handling the deletes. I'll fix this oversight soon.
Cheers
Richard Fuchs writes:
if via-branch=extra is used in offers of branched, should it also be used in answers and deletes?
Yes it should, as rtpengine uses the via-branch to match the answers to the offers which didn't have a to-tag. Looking at the sources, the same logic appears to be missing in the code handling the deletes. I'll fix this oversight soon.
richard,
thanks for your answer. it explained the behavior that i saw.
how about the other question: what happens if delete is not called at all on a failed branch or failed whole call? will offers without matching answers or deletes be cleaned up automatically by a timer?
-- juha
On 11/19/2015 05:58 PM, Juha Heinanen wrote:
Richard Fuchs writes:
if via-branch=extra is used in offers of branched, should it also be used in answers and deletes?
Yes it should, as rtpengine uses the via-branch to match the answers to the offers which didn't have a to-tag. Looking at the sources, the same logic appears to be missing in the code handling the deletes. I'll fix this oversight soon.
richard,
thanks for your answer. it explained the behavior that i saw.
how about the other question: what happens if delete is not called at all on a failed branch or failed whole call? will offers without matching answers or deletes be cleaned up automatically by a timer?
Yes, one of the two usual call timers. Off the top of my head I believe the longer ("silenced") timer is the relevant one here.
Cheers
Richard Fuchs writes:
Yes, one of the two usual call timers. Off the top of my head I believe the longer ("silenced") timer is the relevant one here.
Just for curiosity, I tried to find out from the sources, how long that SILENT timer is, but didn't succeed.
-- Juha
On 11/22/2015 05:50 AM, Juha Heinanen wrote:
Richard Fuchs writes:
Yes, one of the two usual call timers. Off the top of my head I believe the longer ("silenced") timer is the relevant one here.
Just for curiosity, I tried to find out from the sources, how long that SILENT timer is, but didn't succeed.
It's configurable via CLI, the default is
if (silent_timeout <= 0) silent_timeout = 3600;
Cheers