Commit Graph

16109 Commits

Author SHA1 Message Date
Travis Cross a5f982fd1c mod_fifo: Replace duplicate code with node_caller_count() 2014-05-28 01:32:06 +00:00
Travis Cross 597a5c1208 mod_fifo: Remove empty declaration 2014-05-28 01:32:06 +00:00
Travis Cross edecd151a5 mod_fifo: Document the read_frame_callbacks 2014-05-28 01:32:06 +00:00
Travis Cross 42ebfbfc59 mod_fifo: Document the fifo_queue_t structure 2014-05-28 01:32:06 +00:00
Travis Cross 5f4ed9c123 mod_fifo: Document fifo_chime_data::list 2014-05-28 01:32:05 +00:00
Travis Cross 2c7c15261d mod_fifo: Document caller DTMF handler 2014-05-28 01:32:05 +00:00
Travis Cross 3e6199eace mod_fifo: Remove reimplementation of strchr() 2014-05-28 01:32:05 +00:00
Travis Cross 27b3ddcc9f mod_fifo: Document the consumer DTMF callback 2014-05-28 01:32:04 +00:00
Travis Cross 7920630c8f mod_fifo: Refactor DTMF exit key matching 2014-05-28 01:32:04 +00:00
Travis Cross c34ad2c0ec mod_fifo: Avoid getting a var when we won't use it 2014-05-28 01:32:04 +00:00
Travis Cross 077579b131 mod_fifo: Document fifo_queue_popfly() 2014-05-28 01:32:03 +00:00
Travis Cross b914c2374d mod_fifo: Document fifo_queue_pop_nameval() 2014-05-28 01:32:03 +00:00
Travis Cross 1eaf4b50ca mod_fifo: Document remove parameter of fifo_queue_pop() 2014-05-28 01:32:03 +00:00
Travis Cross e241477860 mod_fifo: Tighten up some whitespace 2014-05-28 01:32:03 +00:00
Travis Cross e677da5870 mod_fifo: Refactor in create_node() 2014-05-28 01:32:02 +00:00
Travis Cross 628b6c19ab mod_fifo: Remove dead code
We were making a copy of the fifo name and stripping any domain name,
but then not using the value.
2014-05-28 01:32:02 +00:00
Travis Cross 6105e9783c mod_fifo: Refactor load_config()
Reduce number of local variables where possible; consolidate lines.
2014-05-28 01:32:02 +00:00
Travis Cross 353c3b19fa mod_fifo: Document fifo_node::outbound_name 2014-05-28 01:32:01 +00:00
Travis Cross 17070e9dac mod_fifo: Improve strategy thread function names 2014-05-28 01:32:01 +00:00
Travis Cross 1f7589d6fa mod_fifo: Refactor 2014-05-28 01:32:01 +00:00
Travis Cross 0526e00457 mod_fifo: Replace global var with local static
This marker value is only used in one place.
2014-05-28 01:32:01 +00:00
Travis Cross 2068b284cc mod_fifo: Fix memory leak of xml structure
If getting the DB handle failed during the load or reload of the
configuration, we would leak the XML structure we just allocated for
the configuration.
2014-05-28 01:32:00 +00:00
Travis Cross c6e90e0111 mod_fifo: Refactor out config file reading 2014-05-28 01:32:00 +00:00
Travis Cross a3a62d2481 mod_fifo: Convert macro to fn and improve name 2014-05-28 01:32:00 +00:00
Travis Cross 06d94d2c17 mod_fifo: Move straggling vars to global struct 2014-05-28 01:31:59 +00:00
Travis Cross 31ae5b4655 mod_fifo: Cleanup whitespace 2014-05-28 01:31:59 +00:00
Travis Cross f80e869fe0 mod_fifo: Cleanup whitespace in load_config() 2014-05-28 01:31:59 +00:00
Travis Cross a15058406e mod_fifo: Cleanup config parsing 2014-05-28 01:31:58 +00:00
Travis Cross 20f35e4591 mod_fifo: Improve function names 2014-05-28 01:31:58 +00:00
Travis Cross 84d6b2e351 mod_fifo: Consolidate code 2014-05-28 01:31:58 +00:00
Travis Cross 8ccd13bd9a mod_fifo: Document load_config() 2014-05-28 01:31:58 +00:00
Travis Cross 83f69a41e8 Add in-code documentation for mod_fifo
The goal here is to describe theory.  We want to illuminate what the
code is trying to do and what the core concepts are.
2014-05-28 01:31:57 +00:00
Anthony Minessale 7c2b4381cf FS-6446 --resolve 2014-05-27 20:40:00 +05:00
Chris Rienzo 48483452d2 mod_rayo: remove code that is no longer needed 2014-05-27 10:22:18 -04:00
Chris Rienzo ed2351e048 mod_rayo: http_put of received fax was broken 2014-05-27 09:15:22 -04:00
Travis Cross 333aff8a05 Document that switch_core_alloc returns zeroed memory 2014-05-27 11:24:09 +00:00
Travis Cross 1fe6fb6d46 Use CPPFLAGS for mod_java includes 2014-05-24 09:14:21 +00:00
Travis Cross e8ba8ed5a5 Avoid useless NAT log message
If FS is not behind NAT, then every call generates at least three
INFO-level log messages:

  [INFO] switch_nat.c:589 NAT port mapping disabled

This is useless noise.  The message is only interesting if you do have
NAT enabled but mapping disabled, which might indicate a configuration
issue.

With this change, we just skip the entire nat_add_mapping function if
the NAT system isn't initialized or we're not behind NAT.
2014-05-24 08:57:03 +00:00
Travis Cross 054c645818 Show initial channel values with `show channels`
Store some initial details about the channel separately so we can
preserve them across e.g. transfers and display them with show
channels.

With this commit, we store the original caller ID (name and number)
and IP address, and the call destination, dialplan, and context.

FS-4296 --resolve

Thanks-to: Mariusz Czułada <manieq.net@gmail.com>
2014-05-24 08:42:54 +00:00
Travis Cross 0274991732 Revert commit that breaks build on gcc-4.8
Revert "FS-4296 --resolve initial calling/called nums in 'show channels'"

This reverts commit b08138d058.
2014-05-24 07:18:48 +00:00
Chris Rienzo b5816d3477 mod_graylog2: native GELF logging 2014-05-23 16:53:42 -04:00
Ken Rice b08138d058 FS-4296 --resolve initial calling/called nums in 'show channels'
Store initial caller and destination numbers in 'channels' table,
so `show channels` can display it.

Patch provided by Mariusz Czułada <manieq.net@gmail.com>
2014-05-23 15:03:47 -05:00
Anthony Minessale 042b162bc4 back off locking contention on sql queues when they are nearly full to allow the system to recover from an attack 2014-05-23 23:13:38 +05:00
Anthony Minessale af4380d938 fix linker on mod_cepstral to work in newer environments 2014-05-23 21:11:25 +05:00
Marc Olivier Chouinard ed6dd184f7 FS-6482 Commit 7e15c938e2 broke MWI for device having no transport parameters (plain UDP connection) 2014-05-23 08:42:16 -04:00
Michael Jerris c768e4b6e6 CID:1215198 don't set variables that are not used, and clean up the bail out usage condition to be more sane 2014-05-22 14:52:56 +00:00
Travis Cross dcf633b1dd Revert workaround of gcc-4.6.3-14+rpi1 ARM bug
The correct fix is to use gcc-4.7 or newer.  If the compiler borked
this, one should trust nothing else it produces.

Revert "FS-6524,FS-6494: the compiler for rpi seems to be strangely
mis-optimizing this if/else block. Yes, its already set to this value,
but without the else block, it 'magically' hits the if blocks above,
unless you sleep, print a log, or add the else"

This reverts commit 1ca1d63795.
2014-05-22 01:03:24 +00:00
William King 11f373d4f2 CID: 1215198 Fix an assignment so that the variable only handles malloc'd data. 2014-05-21 16:28:03 -07:00
Anthony Minessale bedf8327b6 FS-6418 FS-6427 add profile param NDLB-proxy-never-patch-reinvites to solve both issues 2014-05-21 03:31:50 +05:00
root 1ca1d63795 FS-6524,FS-6494: the compiler for rpi seems to be strangely mis-optimizing this if/else block. Yes, its already set to this value, but without the else block, it 'magically' hits the if blocks above, unless you sleep, print a log, or add the else 2014-05-20 16:20:36 -05:00
Brian West b3555b91e9 FS-6539 fix typo 2014-05-20 16:20:36 -05:00
Tamas Cseke e6e0deba54 Fix erlang deadlock
Release session R/W Lock
2014-05-20 10:13:38 +02:00
Anthony Minessale bf84e9d414 missed file from a94f0a3fa6 2014-05-20 04:42:23 +05:00
Anthony Minessale 55f8f556fa add heartbeat_fire_on_set variable to fire heartbeat instantly when its first enabled (legacy behavior) 2014-05-20 04:07:47 +05:00
Anthony Minessale a94f0a3fa6 compute timeout based on fake sample count not real life one 2014-05-20 04:02:03 +05:00
Tamas Cseke ea78f4d0e8 Fix race in erlang process spawning
We received the reply and signaled the condition
earlier then started to wait for it
2014-05-19 14:47:39 +02:00
Steve Underwood 34807208c6 Chinese say now say "one" before "ten" for numbers >99 2014-05-17 14:28:58 +08:00
Travis Cross e4888349e1 Prevent opus lib from re-configuring on every make
We were using the libopus directory itself rather than a file within
it as a makefile target.  This is a bad idea as make will see the
target as updated whenever files are created in or removed from the
directory.  Since running configure creates and removes files, the
target will always appear dirty.

The effect was that when mod_opus was enabled in FS make would always
cause libopus to be reconfigured.

We'll target instead the configure file in libopus as that's the first
thing we need anyway.
2014-05-17 00:03:26 +00:00
William King c19aa584cc CID: 1214222
sofia_glue_get_url_from_contact to strdup the value so before
overwriting the value signal to sofia that we have finished with the
raw header.
2014-05-16 17:01:03 -07:00
William King 388e119e55 CID: 1214221,1214222
sip_header_as_string returns new memory alloc'd on the nua_handle's memory pool. This memory would not be freed until
the handle was destroyed. Since there is no usage of the call-info header after it is added to the event as a header value,
we should make sure to both su_free the sofia returned string, but also more cleanly create the event header value to reduce a strdup.
2014-05-16 16:35:49 -07:00
William King dc83348b71 Fix build for 31b8b55d0b 2014-05-16 15:36:25 -07:00
Marc Olivier Chouinard 29e2263442 CID:1210789 Make return value of a function available from the another calling function. Also add a small status check. 2014-05-16 17:18:17 -04:00
Michael Jerris b58bbd18b0 CID:1214233 Pointer to local outside scope 2014-05-16 21:08:53 +00:00
Marc Olivier Chouinard 8fa7398760 CID:1025868 Simplified a function arguments never called. 2014-05-16 17:03:59 -04:00
Michael Jerris e1f8e199f0 CID:1087632 Resource leak 2014-05-16 21:01:13 +00:00
Michael Jerris 31b8b55d0b CID:1214216 Resource leak 2014-05-16 20:46:00 +00:00
Michael Jerris 386000d877 CID:1024418 Unintentional integer overflow 2014-05-16 20:07:58 +00:00
Michael Jerris 4238339176 CID:1023970 Unused pointer value 2014-05-16 19:53:23 +00:00
Michael Jerris 6a8002db79 CID:1024582 Logically dead code 2014-05-16 19:27:25 +00:00
Michael Jerris 21a5d166c6 CID:1024581 Logically dead code 2014-05-16 19:22:37 +00:00
Michael Jerris c1f7887039 CID:1024580 Logically dead code, x will always be > 1 2014-05-16 19:19:31 +00:00
Michael Jerris 73c1e09269 CID:1024579 Logically dead code 2014-05-16 19:09:18 +00:00
Russell Treleaven 3666029ff0 add auth-subscriptions flag. sofia ua can now optionally challenge subscrition requests 2014-05-16 19:05:35 +00:00
Michael Jerris 9b1ebff8de CID:1024270 Dereference before null check 2014-05-16 18:54:50 +00:00
William King 7d5434f57c CID: 1214223-1214230 If sent an invalid registration authentication header with multiple params of the same name, then only use the first of the params instead of leaking memory 2014-05-16 11:50:18 -07:00
Michael Jerris 54fc2f5e39 CID:1023975 Unused pointer value 2014-05-16 18:49:23 +00:00
Michael Jerris a67389ad5c CID:1025879 Logically dead code 2014-05-16 18:20:25 +00:00
Michael Jerris ecde431730 CID:1025850 Dereference before null check 2014-05-16 18:15:34 +00:00
Michael Jerris b10c865c25 CID:1025849 Dereference before null check 2014-05-16 18:12:28 +00:00
Marc Olivier Chouinard a997331577 CID:1214125 https://scan6.coverity.com:8443/docs/en/cov_checker_ref.html#static_checker_BUFFER_SIZE 2014-05-16 13:30:27 -04:00
Michael Jerris 269db09015 don't leak on xferext ivr event, CID:1214232 Resource leak 2014-05-16 14:50:18 +00:00
Michael Jerris 65d9cf62c9 CID:1214237 String not null terminated 2014-05-16 14:41:42 +00:00
Michael Jerris 455ed10e40 CID:1214130 Buffer not null terminated 2014-05-16 14:37:43 +00:00
Michael Jerris ebc0a99f1c CID:1024250 Dereference before null check. CID:1024251 Dereference before null check, we don't need tto check these, as they are already used above in all cases 2014-05-15 18:34:25 +00:00
Michael Jerris 4653d78154 CID:1087387 Unused pointer value 2014-05-15 18:30:03 +00:00
Michael Jerris 44401e842a CID:1023936 Unused pointer value 2014-05-15 17:00:32 +00:00
Chris Rienzo b7b14209eb CID 1214210: mod_ssml - resource leak when parsing SSML 2014-05-15 11:31:04 -04:00
Chris Rienzo d055f5b6df CID 1214263: mod_ssml - remove unused pointer value 2014-05-15 11:12:06 -04:00
Michael Jerris d8d58fde63 CID:1214141 Buffer not null terminated 2014-05-15 14:26:29 +00:00
Michael Jerris 1b0bdaf85e CID:1214212 Resource leak in voicemail_list 2014-05-15 14:11:39 +00:00
Michael Jerris 4e888a282c CID:1214196 Dereference null return value, if we hit this condition, something very bad has happened, we should never have the private not set if we get to the hangup hook, log error instead of crashing 2014-05-15 14:09:38 +00:00
Michael Jerris d2884ac5a6 CID:1214211 Resource leak 2014-05-15 13:58:08 +00:00
Michael Jerris 0469db0305 CID:1214200 Dereference null return value 2014-05-15 13:47:24 +00:00
Michael Jerris 92c6f3abc5 CID:1214192 Dereference after null check, don't crash when no file name passed on file open 2014-05-15 13:37:26 +00:00
Michael Jerris 179e07c649 CID:1214219 Resource leak 2014-05-15 13:30:39 +00:00
Michael Jerris 07b6bba68b CID:1214209 Resource leak, don't leak event populated by switch_channel_get_variables 2014-05-15 13:22:51 +00:00
Michael Jerris 452d7a3793 CID:1214163 Unchecked return value, check return value of switch_ivr_play_file and bail out if it fails 2014-05-15 13:18:58 +00:00
Michael Jerris 7c72e94a67 CID:1214158 Buffer not null terminated 2014-05-15 12:42:49 +00:00
Michael Jerris 68825ff4f1 CID:1214220 Resource leak 2014-05-15 12:41:09 +00:00
Michael Jerris 619b31e1e8 CID:1214140 Buffer not null terminated, make sure hostname is always null terminated 2014-05-15 12:38:41 +00:00