Commit Graph

642 Commits

Author SHA1 Message Date
Anthony Minessale 18c429f66f refactor and cleanup more cid stuff 2013-04-05 15:29:57 -05:00
Anthony Minessale 83fc8ddf3a endless cid fun 2013-04-05 08:29:16 -05:00
Anthony Minessale a1999ad62a flush on answer for inbound only 2013-04-04 13:46:46 -05:00
Anthony Minessale 69c3c7d8e2 FS-5257 --resolve you seem to be setting sip_secure_media on an inbound leg, this is not correct. This patch should auto-correct that but also beware that the variable has changed to rtp_secure_media after this commit 2013-04-02 20:05:46 -05:00
Anthony Minessale 2207b87769 do some more caller-id cleanup 2013-04-01 23:03:14 -05:00
Anthony Minessale 262aed0ed1 remove debug code 2013-03-29 22:12:54 -05:00
Anthony Minessale aca9257f93 tweaks for caller id in certian uuid_bridge situations 2013-03-28 22:17:28 -05:00
Brian West b8b7176086 remove debug line left in by accident 2013-03-27 22:19:58 -05:00
Anthony Minessale 861c3e3ccc add switch_core_get_variables and allow execute_on funcs to see global vars too 2013-03-27 14:54:01 -05:00
Anthony Minessale 4e812bb263 FS-5169 --resolve 2013-03-13 10:37:44 -05:00
Anthony Minessale 50e7a09eca FS-4709 this is the right way to do this part 2013-02-26 15:32:19 -06:00
Anthony Minessale aa89eab58f FS-4709 --resolve, not adding the change to switch_rtp I want to have that log line there, don't make vanity changes mixed in with code changes 2013-02-26 11:49:17 -06:00
Anthony Minessale 28680c5e58 fix callstate stuff to behave right on outbound calls 2013-02-23 12:55:58 -06:00
Anthony Minessale ee7dd033fd fix race condition in state thread 2013-02-22 17:46:54 -06:00
Anthony Minessale d4f8a79299 try to improve audio stream sync 2012-11-28 23:12:35 -06:00
Anthony Minessale c7c528cd7c FS-4867 --resolve 2012-11-26 13:52:06 -06:00
Anthony Minessale 6f2976298f FS-4836 ok try this 2012-11-15 13:16:50 -06:00
Anthony Minessale 057861867e FS-4836 not quite 2012-11-15 13:14:08 -06:00
Anthony Minessale 73f022873b FS-4836 try this 2012-11-15 12:54:40 -06:00
Anthony Minessale b39a2cbb8b put running_state in the channel event rather than the state so presence events reflect the current state of the channel and not the one that was possibly changed during the last state 2012-11-08 14:13:05 -06:00
Anthony Minessale f1e16ccbfa only track calls once they have been answered 2012-10-24 12:33:13 -05:00
Jeff Lenk a8ee444ab9 FS-4748 --resolve 2012-10-22 09:24:45 -05:00
Anthony Minessale 03d702fabc FS-4676 --resolve 2012-10-09 13:50:11 -05:00
Anthony Minessale 07ed03c458 FS-4625 --resolve 2012-09-20 09:57:58 -05:00
Anthony Minessale 9a193a9cd2 add hold_events variable with start and stop times for each hold 2012-09-12 16:36:17 -05:00
Anthony Minessale c2893801cb add timestamps for on and off hold times to put in xml cdrs 2012-09-07 18:17:57 -05:00
Anthony Minessale 8c6b8edfea FS-4542 --resolve ok if this causes any problems it should lead us back to this commit 2012-08-17 14:07:20 -05:00
Anthony Minessale cc351ca004 revert 2012-08-16 12:09:19 -05:00
Anthony Minessale 42bf44de51 FS-4539 please test this and post new logs if necessary 2012-08-16 11:56:55 -05:00
Anthony Minessale bb69310259 FS-4079 FS-4540 please update to this version 2012-08-15 22:51:41 -05:00
Anthony Minessale 293429f78d add api-expansion to switch.conf.xml and fsctl api_expansion command to control allowing apis to be expanded via variable expansion 2012-07-27 18:53:04 -05:00
Anthony Minessale 696fb9c28b expand vars in hold music variable 2012-07-26 13:17:39 -05:00
Anthony Minessale 293516be59 FS-4370 --resolve 2012-07-10 22:44:11 -05:00
Anthony Minessale f3a49366a1 FS-4331 please test and post a new log if necessary 2012-07-03 08:05:41 -05:00
Anthony Minessale 60bb3595fd FS-4313 --resolve 2012-06-26 11:34:24 -05:00
Anthony Minessale 75aab0ee6c put presence data in state events 2012-06-01 13:21:12 -05:00
Anthony Minessale 8bb55ed4bf abstract out originate_signal_bond to a function to avoid confustion and regressions 2012-05-29 13:10:15 -05:00
Travis Cross 23f8967c32
add enhanced zrtp passthrough (zrtp passthru) mode
ZRTP passthrough mode allows two ZRTP-capable clients to negotiate an
end-to-end security association through FreeSWITCH.  The clients are
therefore able to be certain that the FreeSWITCH instance mediating
the call cannot eavesdrop on their conversation.

Importantly, this capability is maintained across multiple FreeSWITCH
hops.  If widely deployed, this enables a global network architecture
where two people can speak securely with strong cryptographically
protected authentication and confidentiality.

With this commit we implement a zrtp-passthru mode that handles all
the details of the negotiation intelligently.  This mode can be
selected by setting the boolean parameter inbound-zrtp-passthru in the
sofia profile.  This will also force late-negotiation as it is
essential for correctly negotiating an end-to-end ZRTP security
association.

When an incoming call with a zrtp-hash is received and this mode is
enabled, we find the first audio and the first video zrtp-hash in the
SDP and store them as remote values on this channel.  Once a b-leg is
available, we set the local zrtp-hash values on that channel to the
remote zrtp-hash values collected from the a-leg.

Because zrtp-passthru absolutely requires that the channels negotiate
the same codec, we offer to the b-leg only codecs that the a-leg can
speak.  Once the b-leg accepts a codec, we will force that choice onto
the a-leg.

If the b-leg sends us zrtp-hash values in the signaling, we store
those as remote values on the b-leg and copy them to the local values
on the a-leg.

At this point, each leg has the zrtp-hash values from the other, and
we know we can do ZRTP passthrough mode on the call.  We send the
b-leg's zrtp-hash back to the a-leg in the 200 OK.

We then enable UDPTL mode on the rtp streams for both the audio and
the video so that we don't interfere in the ZRTP negotiation.

If the b-leg fails to return a zrtp-hash in the signaling, we set up a
ZRTP security association with the a-leg ourselves, if we are so
equipped.  Likewise, if the a-leg fails to send a zrtp-hash in the
signaling, we attempt to set up a ZRTP security association ourselves
with the b-leg.

The zrtp-passthru mode can also be enabled in the dialplan by setting
the boolean channel variable zrtp_passthru.  If enabled in this
manner, we can't force late-negotiation, so the user would need to be
sure this is configured.

If ZRTP passthrough mode is not enabled in either manner, this change
should have no effect.

Channel variables for each of the various zrtp-hash values are set,
though it is anticipated that there is no good reason to use them, so
they may be removed without warning.  For checking whether zrtp
passthrough mode was successful, we provide the channel variable
zrtp_passthru_active which is set on both legs.

Though not implemented by this commit, the changes here should make it
more straightforward to add correct zrtp-hash values to the signaling
and verify that correct hello hash values are received when FreeSWITCH
is acting as a terminating leg of the ZRTP security association.

A historical note...

This commit replaces the recently-added sdp_zrtp_hash_string method,
commit 2ab1605a88.

This prior method sets a channel variable from the a-leg's zrtp-hash,
then relies on the dialplan to export this channel variable to the
b-leg, where it is put into the SDP.

While it was a great start and wonderful for testing, this approach
has some drawbacks that motivated the present work:

 * There's no good way to pass the zrtp-hash from the b-leg back to
   the a-leg.  In fact, the implementation seems to send the a-leg's
   zrtp-hash back to the originating client in the 200 OK.  This is
   not correct.

 * To support video, we'd need to have a separate dialplan variable,
   and the dialplan author would need to deal with that explicitly.

 * The API is problematic as it requires the dialplan author to
   understand intricate details of how ZRTP works to implement a
   correct dialplan.  Further, by providing too fine-grained control
   (but at the same time, not enough control) it would limit our
   ability to make the behavior smarter once people started relying on
   this.
2012-05-24 20:39:03 +00:00
Anthony Minessale 1cfd145c17 add support for variable expander to recognize 717 vars as specificly globals 2012-05-24 13:07:26 -05:00
Anthony Minessale bbdcd33bde performance tweaks for sip message parsing and event system 2012-05-17 20:10:53 -05:00
Travis Cross 0709cc6f1b make log message relevant even if FS doesn't have ZRTP 2012-05-16 02:50:13 +00:00
Travis Cross 7e193ed382 Revert "disable these options if zrtp isn't enabled"
Brian and I talked about this and concurred on the reversion here.
Part of the point of the ZRTP pass-through mode code is that it allows
two legs to have a ZRTP-enabled call even if FS doesn't have ZRTP.

This reverts commit f0aa4ab390.
2012-05-16 02:41:24 +00:00
Brian West f0aa4ab390 disable these options if zrtp isn't enabled. 2012-05-15 21:05:04 -05:00
Anthony Minessale e54ab070f4 put presence-data in events 2012-05-10 12:15:30 -05:00
Ken Rice c5554eb939 Copyright date update. 2012-04-18 11:52:02 -05:00
Anthony Minessale f9b3266720 endless recursion loop protection to go with new recursive variable expansion feature 2012-04-12 07:23:08 -05:00
Anthony Minessale 385a92cec7 add origination_nested_vars=true to allow vars within vars in originate strings e.g. [originate {origination_nested_vars=true,TEST=,var=,recur=W00t}user/1004 3000] will end up as w00t 2012-04-11 15:30:37 -05:00
root 277c1141c4 a few perf tweaks 2012-04-04 17:20:35 -05:00
Anthony Minessale 6138fc8753 FS-4038 can you try this 2012-04-02 16:03:45 -05:00
Anthony Minessale 8618e22c9d FS-4053 try this 2012-03-30 14:24:50 -05:00
Anthony Minessale 2ab1605a88 ZRTP passthru mode code for phil 2012-03-29 18:37:15 -05:00
Anthony Minessale 67b65f95d0 FS-4038 --resolve 2012-03-29 12:13:59 -05:00
Anthony Minessale 303de52bad FS-3794 more fun 2012-02-14 18:59:37 -06:00
Anthony Minessale 80050b5b27 FS-3794 sekil can you test this one 2012-02-01 19:32:29 -06:00
Anthony Minessale 19d49e2075 fix edge case endless loop that can get a channel stuck 2012-01-11 12:05:16 -06:00
Anthony Minessale 755be33022 add list support for which vars/api to expand in httapi 2012-01-09 12:47:47 -06:00
Jeff Lenk 24288832b1 FS-2216 partial with renaming 2012-01-08 14:19:16 -06:00
Marc Olivier Chouinard e081e8045e FS-3321 --resolve 2011-12-15 12:16:41 -05:00
Anthony Minessale 0bf2a0e975 fix strange race moc experienced in uuid_bridge 2011-12-07 15:14:08 -06:00
Anthony Minessale 9ecf187dd9 use the non-signal checking version of switch_channel_up/down in the core 2011-11-18 13:18:04 -06:00
Anthony Minessale bc968ca8ad fix queued dtmf on channels with no timer issue 2011-11-14 12:37:45 -06:00
Anthony Minessale 7e393be5ae WTF 2011-11-09 14:52:05 -06:00
Anthony Minessale ff7432d945 FS-3680 --resolve 2011-11-09 13:53:07 -06:00
Anthony Minessale e04f9ba9fe move the thing that passes proto_specific_hangup_cause to the core and prefix it with last_bridge_ and also log last_bridge_hangup_cauuse for good measure 2011-11-09 13:52:43 -06:00
Anthony Minessale c285db5473 set DP_REGEX_MATCH_1 .. DP_REGEX_MATCH_N to preserve captures into arrays 2011-11-02 10:58:45 -05:00
Anthony Minessale 51c2281191 FS-2877 FS-2831 FS-2823 FS-3469 some of the patch from 2877 refactored a bit to be more centralized to sip and some other stuff added on, please test 2011-10-21 20:00:34 -05:00
Anthony Minessale 1bf97fa7ba add some more reporting data to logs 2011-10-11 15:13:23 -05:00
Jeff Lenk 77c01bc4b7 fix warnings 2011-09-16 12:34:51 -05:00
Anthony Minessale d9ce90d7b9 FS-3570 generate side 2011-09-16 11:41:25 -05:00
Anthony Minessale 4cb49fbaa0 fix some minor internal dtmf issues 2011-09-13 16:19:00 -05:00
Anthony Minessale fba22dc7e9 don't parse signals in the set_running_state function to avoid livelock situation 2011-09-02 16:59:59 -05:00
Anthony Minessale 996b304019 add xferext command to sendmsg parser so you can send a list of instructions to a channel and build and extension and transfer to it from esl 2011-08-31 19:30:58 -05:00
Anthony Minessale b426ec0bfa FS-2217 --resolve this looks ok and is probably useful 2011-08-25 09:27:39 -05:00
Anthony Minessale d43af04e93 fix races in bypass media regarding channel signalling that may cause answer to be skipped 2011-08-19 16:25:32 -05:00
Anthony Minessale 850f2e3cff FS-3510 --resolve make all instances of execute_on_X uniform with api_on_X and support both prefix vars as before and usage of arrays to push several exexute_on or api_on records into one variable 2011-08-18 09:11:45 -05:00
Anthony Minessale c269a58ac5 FS-3045 --resolve 2011-08-17 19:30:15 -05:00
Anthony Minessale f2b66d3d85 update log 2011-08-17 17:25:56 -05:00
Anthony Minessale e2a4fb11ab FS-3396 --resolve 2011-08-10 07:59:03 -05:00
Anthony Minessale 885203a461 add event header 2011-08-04 22:32:06 -05:00
Anthony Minessale 3e2c662a88 clean up originator/ee profile so the right one is prevelant in events 2011-08-04 17:20:02 -05:00
Anthony Minessale b946ee94b2 update call_uuid stuff 2011-08-04 01:04:21 -05:00
Anthony Minessale c16c74d9c0 update show calls to show both 1 legged calls and bridged calls, also show bridged_calls for previous behaviour of show calls 2011-08-01 14:43:03 -05:00
Anthony Minessale 0fc8050cbc display update 2011-07-31 22:14:06 -05:00
Anthony Minessale 0521886de8 use rwlock for global vars to reduce contention 2011-07-12 20:36:42 -05:00
Anthony Minessale 3cbae3fbd8 FS-3413 --resolve 2011-07-12 09:41:02 -05:00
Marc Olivier Chouinard b0e0dd2280 switch_channel: When in a dialplan hunt and we have a custom caller_profile, ${destination_number} and other variable kept the previous value of the original dialplan parsing. This correct this so it take the custom created caller_profile for that hunt 2011-07-08 23:57:54 -04:00
Anthony Minessale f1ee225cb1 push out signal data into its own queue system 2011-07-08 12:52:18 -05:00
Anthony Minessale 9cf44f3a5e fix campon to play music even on first run and cancel faster 2011-07-06 16:45:36 -05:00
Anthony Minessale 1d12519d0b only parse messages from channel_ready when its a session calling channel ready on itself not when another thread calls it 2011-07-05 15:29:18 -05:00
Anthony Minessale cad68d53f5 don't parse events in channel_ready during hold 2011-07-05 11:05:33 -05:00
Anthony Minessale 676ef8085b add last_hold_time and hold_accum vars for cdr data 2011-06-27 13:27:52 -05:00
Anthony Minessale 94148095b8 parse events and messages in channel_ready 2011-06-27 11:32:52 -05:00
Anthony Minessale 5db3a9b071 move channel_create event to init state to allow more info to be gathered 2011-06-24 10:52:18 -05:00
Anthony Minessale 8decee307b FS-3358 please test and close if it works 2011-06-20 13:21:20 -05:00
Anthony Minessale c6268da50c enable recursion for scoped variables so applications that exec more apps will preserve the scope, the most recent app will mask variables just during the duration of that app 2011-06-16 09:43:32 -05:00
Anthony Minessale b2c3199f65 add scoped channel variables (%[var=val,var2=val2] blocks valid in any app data field and will only last for that one app execution) 2011-06-15 13:03:45 -05:00
Daniel Swarbrick 8d8e5a23a6 Mask remote party identity in SIP presence if channel var presence_privacy=true 2011-06-07 13:58:12 +02:00
Jeff Lenk 5923f71a84 more code analysis mostly trivial except string formating changes 2011-06-01 22:36:19 -05:00
Anthony Minessale 7bbbb9ccc5 add vars: flip_record_on_hold to make the recording flip to the other leg on hold, record_check_bridge to make recording the same file on the opposite leg of a bridge considered a duplicate attempt and record_toggle_on_repeat to make repeat recording the same file toggle the recording off 2011-05-31 22:22:18 -05:00
Anthony Minessale 37064511e4 fix bug from the *cough* FRICKING MAILING LIST WHERE IT SHOULD NOT HAVE BEEN REPORTED FROM *cough* 2011-05-31 09:53:39 -05:00
Anthony Minessale c1c759526d add arrays to event headers and chanvars 2011-05-25 15:42:36 -05:00
Anthony Minessale 8764a046c6 allow creation of arbitrary profile vars 2011-05-13 15:29:40 -05:00
Anthony Minessale 7d7e09a92c FS-3296 --resolve there is not much contention on this but it probably could use a mutex 2011-05-13 08:43:45 -05:00
Anthony Minessale a13064101f 3280 --resolve missed a spot 2011-05-02 10:37:05 -05:00
Anthony Minessale 81ec7555f8 FS-3280 --resolve doh 2011-04-29 12:37:36 -05:00
Anthony Minessale bd471fc6a9 add bridged timestamp and hangup_complete_with_xml=true to add xml_cdr to the body of hangup_complete events 2011-04-28 13:46:39 -05:00
Anthony Minessale f8835a817b FS-3271 --resolve 2011-04-27 09:48:28 -05:00
Anthony Minessale bf107c6f0f FS-3269 --resolve 2011-04-26 09:43:22 -05:00
Anthony Minessale 73279f01bf FS-3166 --resolve 2011-04-22 16:43:29 -05:00
Anthony Minessale a4ed829db8 fix race in sla 2011-04-15 14:22:53 -05:00
Anthony Minessale 6a70fa4c4d fix another regression from 27c6d1111c this probably broke the mad boss extension 2011-04-04 17:43:05 -05:00
Anthony Minessale b42fdd1cf3 fix regression from 27c6d1111c 2011-04-04 16:51:30 -05:00
Anthony Minessale ef17574193 do this slightly safer so we don't have the mutex locked when we exec the app 2011-04-01 19:46:54 -05:00
Anthony Minessale 27c6d1111c add execute_on function so you can have execute_on_answer_1 execute_on_answer_2 execute_on_answer_3 etc 2011-04-01 17:39:27 -05:00
Anthony Minessale 3ad4ae0a54 fix null printf 2011-03-30 15:10:45 -05:00
Anthony Minessale d5ef86d778 introduce new say_string method of doing say and use it in mod_say_en as an example. try: eval ${say_string en.gsm en current_date_time pronounced ${strepoch()}} from the cli with this patch. We can do more to centralize the say things and go back and apply it to other langs, using this method you can set the desired file ext as well which I think is a bounty.... 2011-03-29 19:55:35 -05:00
Anthony Minessale 88a6ac2ff4 FS-3170 this was specific to the user channel which is not a real channel in every sense of the word as it has no running thread or any usable state changes so this new line of code in 233d3164be to wait for the state machine to stabalize before returning from originate caused an issue with user/ channels 2011-03-21 12:01:51 -05:00
Anthony Minessale 24a972925b pass header in X-FS headers on attended transfer CID update to indicate specific situation to flip callee/caller id when targeting a 1 legged call 2011-03-11 13:00:55 -06:00
Anthony Minessale 59f6654e96 send another presence event on calls that were cancelled from LOSE_RACE to fix winnable race in Broadsoft SCA 2011-03-10 22:02:45 -06:00
Anthony Minessale 8758d2f71d FS-3141 2011-03-10 10:47:26 -06:00
Anthony Minessale f33e9c6ede FS-2966 I already fixed this in the wait_for_state, so i copied the same fix to wait_for_state_timeout, the lua one needed a similar call to wait for the state to change to avoid a race, both of you should be fixed with this patch 2011-03-02 20:50:33 -06:00
Anthony Minessale bc397ab600 FS-2971 2011-02-25 10:55:47 -06:00
Marc Olivier Chouinard 3fd7b8f267 switch_channel: Add CS_NONE and correct variable name 2011-02-13 18:04:17 -05:00
Anthony Minessale 4ae8282e6c fix possible bad pointer in global vars (please test) 2011-02-02 15:43:26 -06:00
Anthony Minessale d72cde9b76 only execute execute_on_[answer|media|ring] async when its expressed in app::arg form vs 'app arg form' 2011-02-01 13:39:36 -06:00
Anthony Minessale 4b941542a3 fix out of place parens in logic test 2011-01-27 10:34:05 -06:00
Anthony Minessale b262f44ce2 add temp_hold_music var that is only valid until you transfer the call and finishing touches on bind meta to A-D 2011-01-05 18:58:56 -06:00
Anthony Minessale 27869d7a26 add bind meta on A-D and refactor 2011-01-05 17:53:27 -06:00
Anthony Minessale 96ac90adce reduce warnings to debug 2011-01-05 16:57:00 -06:00
Anthony Minessale 181b543b0c add auto-jitterbuffer-msec param and auto-disable the jitterbuffer when briding to another channel who also has a jitterbuffer so both legs will disable during a bridge 2011-01-05 16:25:14 -06:00
Brian West 3734f4cd44 bump copyright date and fix some email and typos from diego. 2011-01-05 10:09:04 -06:00
Anthony Minessale 8f452bc519 cid logic changes for calle[re] 2010-12-17 14:35:53 -06:00
Anthony Minessale 9db4a8265c tweak on calle[re] id 2010-12-16 16:03:05 -06:00
Anthony Minessale 93cc3dc556 normalize tests for outbound channels to use switch_channel_direction instead of testing for CF_OUTBOUND 2010-12-15 20:59:42 -06:00
Anthony Minessale ef4a4ed034 run execute_on_answer on_media _on_ring apps async 2010-11-30 11:01:54 -06:00
Anthony Minessale 180f58a677 FS-2851 2010-11-17 12:17:27 -06:00
Anthony Minessale 93c2ed941a silent recovery 2010-10-13 16:17:43 -05:00
Anthony Minessale fdba0e07fa make parens optional on functions as vars ${foo(bar)} is now the same as ${foo bar} 2010-10-08 15:59:22 -05:00
Anthony Minessale 1d921b1cfa improve dmachine stuff some more 2010-10-08 13:50:15 -05:00
Brian West e7cafae29d tweak 2010-10-05 09:59:23 -05:00
Anthony Minessale 4aa9a83898 refactor export code and add new bridge_export app which is like export but exports across when one channel bridges another 2010-10-01 17:26:12 -05:00
Anthony Minessale 633f193dae add bitrate patch from moc with some extra stuff for late neg mode 2010-09-29 16:52:43 -05:00
Anthony Minessale 4e567a28a2 fix logic in app flags 2010-09-15 18:57:54 -05:00
Anthony Minessale 977a8ad7ce add origination_caller_profile to log all attempted calls for a paticular leg 2010-09-08 13:19:56 -05:00
Anthony Minessale a62e2cf7bc presence tweaks 2010-08-23 17:02:15 -05:00
Anthony Minessale 7f075c0c28 more presence tweaks 2010-08-19 12:09:30 -05:00
Anthony Minessale c44a097156 doh 2010-08-17 19:26:28 -05:00
Anthony Minessale 5f763d0d1b fix caller id fields in show channels show calls etc 2010-08-17 17:26:36 -05:00
Anthony Minessale 44450cb013 fix some small mem leaks 2010-07-23 00:37:08 -05:00
Anthony Minessale 09c1815c42 change channel app_flags to be realm specific and default old version to use __FILE__ as the realm name to avoid cross fire between apps using app flags 2010-07-22 14:37:34 -05:00