When outbound PRACK is challanged, SEMS is regenerating
the PRACK to proxy duplicating the proxy socket in the
Route header, with the result of:
Route: <sip:127.0.0.1:5062;lr>,
<sip:127.0.0.1:5062;lr=on;ftag=xyz;leg_b=1;did=f85.d281>,
<sip:127.0.0.1;r2=on;lr=on;ftag=xyz;ngcplb=yes>,
<sip:192.168.178.104;r2=on;lr=on;ftag=xyz;ngcplb=yes>
the duplicate "127.0.0.1:5062" is causing routing
issue on proxy, cause loose_route() function removes
only the first element. Then proxy sends PRACK to
itself.
To avoid that, we make sure is SEMS to do not add
the 'outbound_socket' value in the Route header
if that value already exist in the first position.
Change-Id: Id310144d8e77a99111e199358462496c9dd0495c
For the PRACK transcations (e.g. PRACK/401) update the
remote tag as well as route set.
Scope: `AmSipDialog::onRxReplyStatus()`
Additionally: do not reset remote tag during the authentication
process for PRACK methods, in: `UACAuth::onSipReply()`.
Change-Id: Ibd4e4ee737287bab3883b74a32ded6a966ec62ab
During refreshing of the media for the call leg in the
`CallLeg::adjustOffer()`, when the resume is required,
but the `on_hold` wasn't set before (so is false),
then additionally check, whether the SDP body
(media sessions of `MT_AUDIO` type) has state like:
- sendonly
- recvonly
- inactive
This will properly fix the attributes (like: `a=sendonly`)
in the re-INVITE, which is supposed to resume the session.
Change-Id: I1c45b7db55d2a5174f3fd96f3fcd0201b48345f2
This is a partial rework of b67428d.
The patch was always saving the Allow header
from the initial INVITE and replacing the Allow
header in the 200 OK with that.
This fixed an issue with AA, where Allow
header in the 200 OK, generated by the AA, was
empty. But it causes an issue in case of normal
calls between A and B.
In general we want to keep the Allow header in
the 200 OK, if exist.
Instead, we want to add the Allow header in the 200 OK
response in case the 200 OK does not contain
the Allow header. In this case we won't set the
original Allow from the INVITE but instead we will
set a default Allow header (SIP_REPLY_DEFAULT_ALLOW)
containing all the major SIP method.
Change-Id: I6bf5a2cc7e0228f7b99d28963d16c14c463be695
Backport from the upstream to add `lock(mutex)` calls
in order to avoid crash.
Upstream commit: 0af0c924a8fc9638c5b18a4d5799a085ea8132bc
Change-Id: I022b09d2827b41f0785a9c0568c334b8a2af108f
Backport from the upstream to fix parsing of sip uri,
when display name contains uri scheme characters:
's', 'i', 'p', and ':'
Upstream commit: fe760b5afdb455707ad2ed3ada7f7fbda6b2fd0e
Change-Id: Idf0236ae9ef2be958693d589894d52ea1ed70848
Backport from the upstream to support looking up aliased
interface names.
Upstream commit: a84509091031331159abb199e21701cb6d7e79b1
Change-Id: I557dee742351268737fe69df8991aede531bb57b
Backport from the upstream to handle responses to SIP_METH_CANCEL
in Cancelling state, preventing dialog and session leaks i.e. on timeouts.
Upstream commit: 54025209301bd111d56ffcb6540473c4f5057779
Change-Id: Iab1d5797f1f5bcd70a27c805d96dab7e67bb1749
Backport from the upstream to add support for body content type
application/csta+xml in INVITE and INFO requests/responses.
Upstream commit: 6f67d15c3857c1f8ed5b33615b7f5ff0e12d3a92
Change-Id: I085eda4a10e73139bd4dce4d75def82bf6da1e8d
Fix instances of make rules not being parallel execution safe, where the
targets declare a list of dependencies which depend on the order they
have been declared to be executed serially, otherwise these can cause
race conditions.
Either move some of the dependencies down into their transitive
dependencies, or rearrange them to call $(MAKE) to force a serial
point. In other instances add missing dependencies to make sure the
objects to install have previously been built.
Change-Id: I21b499557ac5e9faa603841fa1882b58239ee650
Fix for:
fft.c: In function 'WebRtcIsac_Fftradix':
fft.c:338:22: warning: the comparison will always evaluate as 'false' for the address of 'Tmp0' will never be NULL [-Waddress]
338 | if (fftstate->Tmp0 == NULL || fftstate->Tmp1 == NULL || fftstate->Tmp2 == NULL || fftstate->Tmp3 == NULL
| ^~
In file included from fft.h:34,
from fft.c:126:
structs.h:250:10: note: 'Tmp0' declared here
250 | double Tmp0[MAXFFTSIZE];
| ^~~~
fft.c:338:48: warning: the comparison will always evaluate as 'false' for the address of 'Tmp1' will never be NULL [-Waddress]
338 | if (fftstate->Tmp0 == NULL || fftstate->Tmp1 == NULL || fftstate->Tmp2 == NULL || fftstate->Tmp3 == NULL
| ^~
structs.h:251:10: note: 'Tmp1' declared here
251 | double Tmp1[MAXFFTSIZE];
| ^~~~
fft.c:338:74: warning: the comparison will always evaluate as 'false' for the address of 'Tmp2' will never be NULL [-Waddress]
338 | if (fftstate->Tmp0 == NULL || fftstate->Tmp1 == NULL || fftstate->Tmp2 == NULL || fftstate->Tmp3 == NULL
| ^~
structs.h:252:10: note: 'Tmp2' declared here
252 | double Tmp2[MAXFFTSIZE];
| ^~~~
fft.c:338:100: warning: the comparison will always evaluate as 'false' for the address of 'Tmp3' will never be NULL [-Waddress]
338 | if (fftstate->Tmp0 == NULL || fftstate->Tmp1 == NULL || fftstate->Tmp2 == NULL || fftstate->Tmp3 == NULL
| ^~
structs.h:253:10: note: 'Tmp3' declared here
253 | double Tmp3[MAXFFTSIZE];
| ^~~~
fft.c:339:25: warning: the comparison will always evaluate as 'false' for the address of 'Perm' will never be NULL [-Waddress]
339 | || fftstate->Perm == NULL) {
| ^~
structs.h:254:7: note: 'Perm' declared here
254 | int Perm[MAXFFTSIZE];
| ^~~~
Change-Id: I7060e20d532e80f2ec78c04999676c86136ae34a
This was a workaround for Solaris specific issues in the install program
there. The problem is that this can end up generating empty files, that
will not be detected by the packaging system as it will find the file is
present on destination and thus does not need to be installed.
Change-Id: Ib6107957cbf03c4e7da6cf2998d9103224f674d3
We have to explicitly set the `SdpPayload.type`,
when calling the constructor of it, which only initializes the `SdpPayload.payload_type`.
Just simply set the `SdpPayload.type` to -1.
This fixes the following:
In file included from ../../core/AmRtpStream.h:32,
from ../../core/AmSession.h:31,
from ../../core/AmB2BSession.h:31,
from CallLeg.h:29,
from CallLeg.cpp:27:
../../core/AmSdp.h: In member function 'void CallLeg::acceptPendingInvite(AmSipRequest*)':
../../core/AmSdp.h:130:18: warning: '<anonymous>.SdpPayload::type' may be used uninitialized in this function [-Wmaybe-uninitialized]
130 | : type(other.type), payload_type(other.payload_type),
| ~~~~~~^~~~
Change-Id: I08a9e75396f043dc88d411b9c84296a704d67057
It's been noticed that we have an improper implementation,
which attempts to move the pointer to the char array like this:
`input = param_size + 1;`
It's not right, it should be like that:
`input += (param_size + 1);`
Change-Id: Ia924a398cb37a64a06dfa385db6a0409f1e93e82
This commit takes car of the following mistake in the code:
opus.c: In function 'read_param':
opus.c:178:5: warning: statement with no effect [-Wunused-value]
178 | input;
| ^~~~~
opus.c:186:8: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
186 | input=param_size+1;
| ^
opus.c:191:5: warning: statement with no effect [-Wunused-value]
191 | input;
| ^~~~~
opus.c:197:2: warning: statement with no effect [-Wunused-value]
197 | input;
| ^~~~~
opus.c: In function 'decode_format_parameters':
opus.c:257:4: warning: statement with no effect [-Wunused-value]
257 | buffer;
| ^~~~~~
Change-Id: I469d9cc433eaebe5e3ffbe32b963363dd29a2aac
We should deprecate unused variables and functions:
entropy_coding.c:95:14: warning: 'log2_Q10_B' defined but not used [-Wunused-function]
95 | static short log2_Q10_B( int x )
| ^~~~~~~~~~
entropy_coding.c:78:23: warning: 'stepwise' defined but not used [-Wunused-function]
78 | static WebRtc_UWord32 stepwise(WebRtc_Word32 dinQ10) {
| ^~~~~~~~
entropy_coding.c:72:28: warning: 'lbcnQ10' defined but not used [-Wunused-const-variable=]
72 | static const WebRtc_Word32 lbcnQ10 = -402874;
| ^~~~~~~
entropy_coding.c:71:28: warning: 'ccnQ10' defined but not used [-Wunused-const-variable=]
71 | static const WebRtc_Word32 ccnQ10 = 722631;
| ^~~~~~
entropy_coding.c:70:28: warning: 'bcnQ10' defined but not used [-Wunused-const-variable=]
70 | static const WebRtc_Word32 bcnQ10 = -581224;
| ^~~~~~
entropy_coding.c:69:28: warning: 'acnQ10' defined but not used [-Wunused-const-variable=]
69 | static const WebRtc_Word32 acnQ10 = 426;
| ^~~~~~
Change-Id: Ie45a2685c445eb5c7c5bfc75d7bda9ba2ba26a50
This is a fix for the following warning:
entropy_coding.c:101:11: warning: 'WebRtcSpl_NormU32' is static but used in inline function 'log2_Q10_B' which is not static
101 | zeros = WebRtcSpl_NormU32( x );
| ^~~~~~~~~~~~~~~~~
entropy_coding.c:92:10: warning: 'kRPointsQ10' is static but used in inline function 'stepwise' which is not static
92 | return kRPointsQ10[ind];
| ^~~~~~~~~~~
This happens because the inline function has inside it a call
to the static function.
To fix the warning, we just make the `log2_Q10_B()` and `stepwise()` functions
static. It's quite safe, since they are not even in use by anything.
Change-Id: Id6588d85c7d347d5669d6495188e798fe7c70b05
It's been noticed that we are using `memcpy` for copying of the data,
where the source and destination overlaps.
This begets the following warning:
In function 'memcpy',
inlined from 'Decode' at iLBC_decode.c:254:16:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:34:10: warning: '__builtin_memcpy' accessing 428 bytes at offsets 0 and 160 overlaps 268 bytes at offset 160 [-Wrestrict]
34 | return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'memcpy',
inlined from 'Decode' at iLBC_decode.c:302:16:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:34:10: warning: '__builtin_memcpy' accessing 428 bytes at offsets 0 and 160 overlaps 268 bytes at offset 160 [-Wrestrict]
34 | return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/string.h:495,
from iLBC_encode.c:15:
In function 'memcpy',
inlined from 'iLBC_encode' at iLBC_encode.c:311:16:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:34:10: warning: '__builtin_memcpy' accessing 428 bytes at offsets 0 and 160 overlaps 268 bytes at offset 160 [-Wrestrict]
34 | return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'memcpy',
inlined from 'iLBC_encode' at iLBC_encode.c:389:16:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:34:10: warning: '__builtin_memcpy' accessing 428 bytes at offsets 0 and 160 overlaps 268 bytes at offset 160 [-Wrestrict]
34 | return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The problem is that `memcpy` should not be used, when dst memory overlaps with src memory.
We should update such usage of `memcpy` and swap it with `memmove`
From the manpage of the `memcpy`:
>> The memory areas should not overlap. Use memmove(3) if the memory areas do overlap.
Change-Id: I5e3e65587fad92c91bb298e4e5415db1fd0c0371
This commit fixes this warning:
tcp_trsp.cpp: In member function 'virtual void tcp_server_worker::run()':
tcp_trsp.cpp:573:7: warning: ignoring return value of 'int pipe(int*)' declared with attribute 'warn_unused_result' [-Wunused-result]
573 | pipe(fake_fds);
| ~~~~^~~~~~~~~~
Change-Id: I159153c7bad287b9ca9fe25cd775fc79c4de6cf7
This commit fixes the following issue:
In file included from AmConfig.h:31,
from AmSdp.cpp:12:
AmSdp.h: In member function 'void AmSdp::clear()':
AmSdp.h:61:8: warning: '<anonymous>' may be used uninitialized in this function [-Wmaybe-uninitialized]
61 | struct SdpConnection
| ^~~~~~~~~~~~~
AmSdp.h:61:8: warning: '<anonymous>.SdpConnection::ipv4' may be used uninitialized in this function [-Wmaybe-uninitialized]
AmSdp.h:61:8: warning: '<anonymous>.SdpConnection::ipv6' may be used uninitialized in this function [-Wmaybe-uninitialized]
When calling the SdpConnection's constructor in the AmSdp::clear(),
we initialize the `address` member, but not the `ipv4` and `ipv6` members.
Therefore, when the `AmSdp::clear()` is called,
it's possible that the `ipv4` and `ipv6` members of the `SdpConnection` object may contain garbage values.
To fix the issue, we should explicitly initialize
the `ipv4` and `ipv6` members in the default constructor of `SdpConnection`.
With this change, we explicitely initialize the `ipv4` and `ipv6` members to their
default-constructed values, which in this case will be all zeroes.
Additionally: explicitely initialize the `network` and `addrType` to zeroes.
Change-Id: Iaabb4aa2f2fafd0eb83e3f79becc3bd8d54de32e
This commit fixes this:
In file included from sip_parser_async.cpp:1:
sip_parser_async.h: In member function 'void parser_state::reset_hdr_parser()':
sip_parser_async.h:32:37: warning: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'struct sip_header'; use assignment or value-initialization instead [-Wclass-memaccess]
32 | memset(&hdr,0,sizeof(sip_header));
| ^
In file included from sip_parser_async.h:4,
from sip_parser_async.cpp:1:
parse_header.h:44:8: note: 'struct sip_header' declared here
44 | struct sip_header
| ^~~~~~~~~~
sip_parser_async.cpp: In function 'int parse_headers_async(parser_state*, char*)':
sip_parser_async.cpp:215:36: warning: 'void* memset(void*, int, size_t)' clearing an object of non-trivial type 'struct sip_header'; use assignment or value-initialization instead [-Wclass-memaccess]
215 | memset(hdr,0,sizeof(sip_header));
| ^
In file included from sip_parser_async.h:4,
from sip_parser_async.cpp:1:
parse_header.h:44:8: note: 'struct sip_header' declared here
44 | struct sip_header
| ^~~~~~~~~~
In general, using `var1 = {};` approach to initialize/clear a struct is
equivalent to using `memset(var1, 0, sizeof(MyOwnStruct1));`.
So there shouldn't be any big risks associated with swapping one for the other.
The `memset()` may be slightly more efficient in terms of performance,
especially when dealing with array of structures, but in this situation
we are dealing with quite a small struct, which represents: a type, a name and a value.
As long as `var1 = {};` approach is supported by our compiler and
we don't need to initialize a large array of structures (in our case it isn't),
there shouldn't be any big risks associated with swapping one for the other.
Change-Id: I10570b628d3e5a634d764b83f7558d38ecc6a757
This commit fixes that:
AmSdp.cpp: In function 'void parse_sdp_media(AmSdp*, char*)':
AmSdp.cpp:858:9: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
858 | if (next > media_line)
| ^~
AmSdp.cpp:860:11: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
860 | m.type = media_type(media);
| ^
Change-Id: Ie5b7760d3e11ec825ea68138d06eaeb150da202c
This fixes that:
AmRtpReceiver.cpp: In member function 'virtual void AmRtpReceiverThread::run()':
AmRtpReceiver.cpp:92:7: warning: ignoring return value of 'int pipe(int*)' declared with attribute 'warn_unused_result' [-Wunused-result]
92 | pipe(fake_fds);
| ~~~~^~~~~~~~~~
Change-Id: I7a9488ce07f59955e94efa1812fb74cb86e2387d
This fixes that:
AmOfferAnswer.cpp: In member function 'int AmOfferAnswer::onReplyOut(AmSipReply&)':
log.h:143:30: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 4 has type 'unsigned int' [-Wformat=]
143 | _LOG(L_DBG, error_category " " fmt, ##args)
log.h:121:45: note: in definition of macro '_LOG'
121 | int n_ = snprintf(msg_, sizeof(msg_), fmt, ##args); \
| ^~~
log.h:166:29: note: in expansion of macro 'CAT_DBG'
166 | #define DBG(fmt, args...) CAT_DBG(ERROR_CATEGORY_DGENERAL, fmt, ##args)
| ^~~~~~~
AmOfferAnswer.cpp:367:9: note: in expansion of macro 'DBG'
367 | DBG("Forcing no OA state update (no SDP changes, same session version: was <%llu>, now is <%llu>).\n",
| ^~~
AmOfferAnswer.cpp:367:88: note: format string is defined here
367 | DBG("Forcing no OA state update (no SDP changes, same session version: was <%llu>, now is <%llu>).\n",
| ~~~^
| |
| long long unsigned int
| %u
In file included from AmArg.h:43,
from AmSipMsg.h:3,
from AmOfferAnswer.h:32,
from AmOfferAnswer.cpp:29:
log.h:143:30: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 5 has type 'unsigned int' [-Wformat=]
143 | _LOG(L_DBG, error_category " " fmt, ##args)
log.h:121:45: note: in definition of macro '_LOG'
121 | int n_ = snprintf(msg_, sizeof(msg_), fmt, ##args); \
| ^~~
log.h:166:29: note: in expansion of macro 'CAT_DBG'
166 | #define DBG(fmt, args...) CAT_DBG(ERROR_CATEGORY_DGENERAL, fmt, ##args)
| ^~~~~~~
AmOfferAnswer.cpp:367:9: note: in expansion of macro 'DBG'
367 | DBG("Forcing no OA state update (no SDP changes, same session version: was <%llu>, now is <%llu>).\n",
| ^~~
AmOfferAnswer.cpp:367:103: note: format string is defined here
367 | DBG("Forcing no OA state update (no SDP changes, same session version: was <%llu>, now is <%llu>).\n",
| ~~~^
| |
| long long unsigned int
| %u
Change-Id: I15c6e37756a55ea5c917b123030b30e0ddc55724
The fix for:
AmMimeBody.cpp: In member function 'void AmContentType::resetBoundary()':
AmMimeBody.cpp:122:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
122 | if ((*l_it)->type == Param::BOUNDARY)
| ^~
AmMimeBody.cpp:124:7: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
124 | params.erase(l_it);
| ^~~~~~
Change-Id: I96ff98ff20c83949f294fd863e5d6d3880ece9d8
Fix for the following warning:
In function 'char* strncpy(char*, const char*, size_t)',
inlined from 'bool fillSysIntfList()' at AmConfig.cpp:1014:14,
inlined from 'static int AmConfig::finalizeIPConfig()' at AmConfig.cpp:1137:18:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:34: warning: 'char* __builtin_strncpy(char*, const char*, long unsigned int)'
specified bound 16 equals destination size [-Wstringop-truncation]
| return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
Change-Id: If1610c7ac408ce596b02d95a43558475b87d061b
Eliminate the `auto_ptr` usage for core/* ,
since this pointer type has been deprecated in C++11.
Use, as recommended, `unique_ptr` instead.
Change-Id: I352e03bd0c8401d9a4890d8a1845913e4c22dab3
We don't have to change the SDP OA state, in case
the 183 response has exactly the same SDP content
(same SDP session version) as we already have seen
before in previous 183 message.
Change-Id: Ica008104c31e979cdcb352cefea39db4d1ff3c56
We have to treat 18X replies coming from DSM (usually it's 183)
in `Proceeding` state on the same manner as we do for the `Early` state.
This is because it affects entirely the following call flow after that,
and has to do with a proper clearing of the dialog, when receiving
4XX class of messages (which stop playback and have to terminate this
session: 4XX -> BYE conversion).
Additionally: set the status to the `Disconnected` for the 4XX class
response, which ends up the DSM playback.
Original ticket's number: 56806
Change-Id: I3b0f3ff360cd774fcc7862d34e75747454660d9a
OPUS requires own Hz frequency for telephone-event (48000Hz),
without which DTMF events using it would be not spotted.
Such an example is Auto-Attendant, which is dependent on the
supported payloads of the sems-b2b. When the caller uses
the OPUS (48kHz) then DTMFs are not spotted.
Original ticket's number: 56278
Change-Id: Ic6f4d9632e4f35e460ed7f9df03f77e829a7bd5f
Because of messy organizing of the code in the function,
it's hard to read that and work with that.
Original ticket's number: 56278
Change-Id: I50f20b034f997214e01ff7810b33c225c6ff26e4
Because of messy organizing of the code in the function,
it's not possible to read that and work with that.
Original ticket number: 0055878
Change-Id: I6c093ccc09015c9d4745af6b3c21365220b81386
The new parameter of the 'P-DSM-App:' header is introduced:
- ';reset-to-tag=''
It affects the processing of 18X (especially it relates to 183).
If this is set to '1', then the To-tag stored as the remote tag in
the 'dlg' object, must be updated to the latest one provided by this 183.
This fixes the case as the following one:
- A calls B (B is an owner of the callqueue)
- B starts ringing, and provides the To-tag with 180
- this in its turn, will initiate generation of own "internally"
generated To-tags in all the internal legs between Proxy <-> B2B,
which are crossed by this 180
- B responds with 486 Busy and a processing gets inside the route[ROUTE_EARLY_REJECT]
- the brand-new INVITE is generated and sent to the DSM early_dbprompt app
- A brand-new 183 is provided by the DSM app, which has another (new) To-tag
- this will mismatch in the very original leg with Proxy and B2B
and 183 will be not sent towards the caller, which makes impossible
to provide an early reject playback to it
Original ticket number: 0055878
Change-Id: I96abbe0b8427d40752967607d2fdd0e11145a06a
Strip doublequotes on SDP boundary when the Content-Type header
contains them.
for example:
Content-Type: multipart/mixed;boundary="unique-boundary-1"
will now produce something like that
--unique-boundary-1
Content-Type: application/sdp
v=0
o=user1 53655765 2353687637 IN IP4 10.0.0.179
s=-
c=IN IP4 10.0.0.179
t=0 0
m=audio 30000 RTP/AVP 8
a=rtpmap:8 PCMA/8000
a=sendrecv
a=rtcp:30001
a=ptime:50
--unique-boundary-1
Content-Type: application/vnd.cirpack.isdn-ext
Content-Disposition: signal;handling=required
...
and not
--"unique-boundary-1"
Change-Id: I2efb749c6ff9be4e8ccde62bcf544c72cdb5ad6e
We have to add more SIP response codes, which will be checked against
the isDSMPlaybackFinished(). So that when the DSM playback is finished,
the call is properly released on the caller's side.
Exceptionally 487 is added, for cases like:
a call to HG, where nobody answers and the timeout triggers
a cancelation of all the legs.
Change-Id: I1f7cf81dd5966843713fc41c21ea0249174c13ab
We have to optimize our code:
- substitute all repeating (DSM related) code with a helper static functions
- remove all excessive stuff, which plays no role
Change-Id: I27170509d84a634dc4a9a865ea8395e4e8cc2f3d
Introduce a new header file "global_defs.h" in order to use that
for global definitions or macroses, which are not particularly
related to the SIP headers. Such as DSM applications names.
This will simplify handling and decrease hardcoding all around
the project.
With this commit additionally:
- stop hardcoding values related to DSM applications specific names
- move all the DSM definitions into the global_defs.h or defs.h
Change-Id: I389f632434f0ae1e62540e8df584fdc5e1e07e39
We need to add the 'early-dbprompt' DSM application into
the processing of the 480 replies, which have
'P-DSM-App: <app-name>;playback=finished' parameter set.
Change-Id: I3e561f510d8e56ca7d0cece714c0330f3bfa9ecd
Since the P-Early-Announce has gotten deprecated, it's required
to stop using it. And instead start using the P-DSM-App header, which
now carries the same information as parameter ';early-annonce='.
Change-Id: I7f0f378143d0b6600a239084cd51935a31df3d08
B2BSipReply
We have to update the media session with the caller, if the 183 response
with the 'P-Early-Announce: force' has been received.
Change-Id: Iec67c6b6cc5284afbcfb492fc53108439a427b1d
Because of messy organizing of the code in the function,
it's not possible to read that and work with that.
Change-Id: Iab28ba34ba0cc970e3f100f8cc61bcbbdabee2bb
B2BSipReply
We have to update the media session with the caller, if the 183 response
with the 'P-Early-Announce: force' has been received.
Change-Id: Ib39dc124ef5e8934ff617d562b222bd07dfcacc1
If we get the 480 reply from the office-hours DSM application,
and there is a header 'P-DSM-App: office-hours' added, with
a parameter ';playback=finished', then it means the following:
- there was either AA or transfer involved into the call, before
the call got to the DSM office-hours
- caller remains in the hold state (so there was 200/ACK)
- the office-hours playback has been finished, and now we mustn't
forward 480 to the caller's leg, but just terminate it with BYE
Change-Id: I389c6993185008c51c61bacd8eb23ac1562871b8
We have to take care of keeping the actual 'Allow:' header in the
request, if the incoming request has had it.
One of the use cases for that is for example the INVITE coming
to the AA, when we must respond with the 200OK,
but there is no 'Allow:' header inside the 200OK.
Certain systems can be confused by that, even though the RFCs are
not forcing us to do so. Which can even lead to an impossibility to use
a normal call clearing with the BYE method, from behalf of the caller.
Change-Id: I9bafb89e4aa5e53077450068f847c07a497b43f1