Commit Graph

436 Commits

Author SHA1 Message Date
Anthony Minessale bf20f52452 add execute_on_post_originate and api_on_post_originate to run on chosen newly originated channels vs execute_on_originate which runs on all candidates 2012-07-05 12:34:09 -05:00
Anthony Minessale dca6e2bb8e FS-4359 --resolve 2012-06-28 12:12:44 -05:00
Anthony Minessale f685e4c504 allow ep_codec_string to draw from absolute_codec_string before the profile prefs 2012-06-01 10:06:28 -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 092a0f8b5f FS-4194 --resolve 2012-05-07 13:09:51 -05:00
Anthony Minessale b43fa94551 FS-4192 --resolve found the problem, this might also fix your intercept bug 2012-05-07 10:05:56 -05:00
Anthony Minessale 7f76b67f5d FS-4191 --resolve 2012-05-07 08:17:41 -05:00
Anthony Minessale 64d4d9ea57 add pickup endpoint and app to dptools add pickup/keyname to forked dial, then route a call to call app pickup(keyname) to have your channel return from originate. sub to pickup+keyname or presence map the pickup proto to use on blf 2012-05-04 18:59:34 -05:00
Anthony Minessale 940636588c FS-4166 2012-04-30 17:51:31 -05:00
Anthony Minessale ae23edad9c FS-4111 --resolve 2012-04-18 14:49:00 -05:00
Ken Rice c5554eb939 Copyright date update. 2012-04-18 11:52:02 -05:00
Anthony Minessale 456b07eb8b FS-4125 --resolve you should really switch to {} when you know you have one dial string but i'll add this as a convienence 2012-04-17 16:51:40 -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
Anthony Minessale 995ae2621c FS-3769 --resolve 2012-04-10 16:17:16 -05:00
Anthony Minessale d4116bb615 FS-4098 try this patch and see if you get the new error, it may mean the file is not seekable or has been deleted 2012-04-10 10:15:15 -05:00
Anthony Minessale 0b992a2bd2 FS-4089 --resolve 2012-04-09 12:35:26 -05:00
Anthony Minessale 973a39e07f FS-4049 revert 2012-03-28 14:28:05 -05:00
Anthony Minessale 80b18bb266 FS-4049 2012-03-28 13:41:48 -05:00
Anthony Minessale fb1d45b4bb FS-4049 try this 2012-03-28 12:43:13 -05:00
Anthony Minessale 2c8ca5cfdb add sync 2012-03-27 18:48:16 -05:00
Anthony Minessale 46810f58d3 FS-4049 try this 2012-03-27 13:08:49 -05:00
Anthony Minessale e31a35a7be FS-3973 --resolve we can go with this for now and ponder the other problem for later 2012-03-09 11:43:37 -06:00
Marc Olivier Chouinard 6d7ab6e230 FS-3765 --resolve 2011-12-16 14:08:26 -05:00
Marc Olivier Chouinard e081e8045e FS-3321 --resolve 2011-12-15 12:16:41 -05:00
Anthony Minessale 4e014c4915 FS-3688 refactor of cancel handling code in bridge 2011-12-07 17:42:52 -06:00
Anthony Minessale f41020a625 FS-3727 --resolve 2011-11-29 08:28:10 -06:00
Anthony Minessale 4ce8f5e28e FS-3688 some more general changes during proxy media 2011-11-28 13:38:05 -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 3a121a1bff FS-3675 --resolve incorrect fix in 5dd463532c 2011-11-10 10:07:19 -06:00
Anthony Minessale 522c0d5325 FS-3675 --resolve 2011-11-09 10:07:54 -06:00
Anthony Minessale 43ca3ee81a FS-3634 the call is not bridged yet so we need to take more action, try this patch 2011-11-02 08:54:03 -05:00
Anthony Minessale bad5964b94 FS-3589 --resolve 2011-10-24 08:47:08 -05:00
Anthony Minessale d9b096b44d FS-3555 --resolve 2011-09-15 11:42:55 -05:00
Anthony Minessale 2e9724d2ec pass cancel_cause into enterprise_originate 2011-09-01 12:37:58 -05:00
Anthony Minessale c3ceebf0bf FS-3528 --resolve 2011-08-29 10:31:46 -05:00
Anthony Minessale 21482f011c FS-3521 --resolve that was not a git diff, anyway i would prefer to not feed null to this function by practice because its the sign o f a bigger problem so I added an assert so we can tell if it happens again and protected against it from where its actually happening because NULL destination is not acceptable 2011-08-25 08:46:40 -05:00
Anthony Minessale 329033ee86 FS-3506 --resolve 2011-08-25 08:27:23 -05:00
Jeff Lenk 605091609d FS-3515 remove duplicate code 2011-08-23 11:20:04 -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 9d98d49f05 add emulation for asterisk DIALSTATUS magic var 2011-08-10 08:38:55 -05:00
Marc Olivier Chouinard 38e3f5fe16 switch_ivr_originate: export variables were broken since b946ee94 4 aug 2011 2011-08-09 03:09:19 -04:00
Anthony Minessale dee0f54026 FS-3483 --resolve 2011-08-04 09:50:23 -05:00
Anthony Minessale 2eae19e63f FS-3484 --resolve 2011-08-04 09:38:45 -05:00
Anthony Minessale b946ee94b2 update call_uuid stuff 2011-08-04 01:04:21 -05:00
Anthony Minessale f8c029a191 auto populate global origination_caller_id_name/number from effective_caller_id_name/number in enterprise originate 2011-06-29 15:57:59 -05:00
Anthony Minessale bf7895278e revert 2011-06-15 10:29:07 -05:00
Anthony Minessale 25604d60d5 FS-3326 revert 68c389d 2011-06-15 10:10:37 -05:00
Travis Cross f25085e06b lower log-level of failed ivr_originate
ivr_originate can fail due to causes such as NO_ANSWER and
ATTENDED_TRANSFER.  It seems excessive to log these normal events
with LOG_ERROR.  Lowering to LOG_NOTICE.
2011-06-06 17:54:17 +00:00
Anthony Minessale 68c389df46 FS-3326 --resolve ok thx 2011-06-03 09:45:07 -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
Moises Silva ba76388cb2 fix missing ringback silence calculation spot in switch_ivr_originate 2011-05-26 02:23:34 -04:00
System Administrator 7eaef23955 Merge remote branch 'fsorig/master'
Conflicts:
	src/mod/applications/mod_commands/mod_commands.c
	src/mod/endpoints/mod_portaudio/mod_portaudio.c
	src/mod/endpoints/mod_portaudio/pablio.c
2011-05-26 00:13:12 -04:00
System Administrator 294a57fbcb allow -1 as silence generation divisor to specify only zeroes silence 2011-05-25 23:16:24 -04:00
Anthony Minessale fae95433e2 FS-3303 --resolve this was an edge case between fail_on_single_reject and group_confirm 2011-05-18 16:10:46 -05:00
Anthony Minessale 4c4bf59e45 FS-3246 --resolve all [] {} and <> can be stacked and override the delim per set <><^^:>{}{^^:}{^^;}[][^^:] 2011-04-14 17:50:48 -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 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 233d3164be wait 2011-03-13 18:43:34 -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
Mathieu Rene 8cb2bad004 Fix segv 2011-03-09 19:02:19 -05:00
Anthony Minessale 70700617d3 add execute_on_originate var '<app> <arg>' to run in origination thread or '<app>::<arg>' to run async. also originating_leg_uuid variable to show the uuid of the originating leg on an outbound channel 2011-01-20 13:52:00 -06:00
Anthony Minessale cc06fdb5fa FS-2992 2011-01-17 10:41:01 -06:00
Anthony Minessale 1b91f811bd more 2011-01-12 19:34:19 -06:00
Anthony Minessale 138fdc83c6 more from last commit 2011-01-12 18:06:01 -06:00
Anthony Minessale a10125b8c3 add origination_channel_name var for {} to choose the channel name value 2011-01-12 17:48:49 -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 f79f9766ba don't let inherit_codec work when we have ep_codec_string set and the B-leg codec is not in that list since it will lead to failure 2010-12-31 11:59:33 -06:00
Anthony Minessale 5b752c54a7 fix ignore_early_media=ring_ready 2010-12-22 15:53:24 -06:00
Anthony Minessale 1b1dea0206 FS-2879 2010-12-20 20:19:36 -06:00
Anthony Minessale 8f452bc519 cid logic changes for calle[re] 2010-12-17 14:35:53 -06:00
Anthony Minessale 00046ee0f2 FS-2933 2010-12-15 20:59:42 -06:00
Anthony Minessale 8b0421ff68 add new function to check when messages need parsing to improve performance on parsing messages during originate 2010-11-30 09:49:12 -06:00
Anthony Minessale ed5266d3ca don't parse events for b legs from a leg thread in case they are using a monolothic python script as a group_confirm exec over socket to send it messages while the call is ringing 2010-11-29 15:34:27 -06:00
Marc Olivier Chouinard 025c82e76f ivr_enterprise_originate: Fix export of variable from the originator channel to the called channels 2010-11-11 20:21:35 -05:00
Anthony Minessale e0c37c1f6e allow process_import to specify a prefix 2010-11-05 18:20:09 -05:00
Anthony Minessale 08d2ea9d96 update 2010-10-26 13:43:21 -05:00
Jeff Lenk be43052c50 fix build 2010-10-25 14:54:13 -05:00
Anthony Minessale cd736a1c77 fix fail_on_single_reject 2010-10-25 13:03:06 -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 54bf657502 FSCORE-631 2010-09-24 12:29:23 -05:00
Anthony Minessale cfa30468e8 sprinkle digit_timeout into switch_ivr_read and switch_ivr_play_and_get_digits and the higher level variants 2010-09-23 18:37:45 -05:00
Anthony Minessale 46c6650a94 pass originate flags into session_request so we can selectivly skip throttling 2010-08-26 12:19:49 -05:00
Anthony Minessale bfe3128838 FSCORE-631 2010-07-15 21:09:48 -05:00
Michael Jerris cae9129f0a dup off the right caller profile 2010-07-06 11:32:04 -04:00
Anthony Minessale 21edf395ca de-ass 2010-07-01 15:19:40 -05:00
Anthony Minessale 1fba654845 fix parse err in originate code 2010-07-01 14:21:44 -05:00
Anthony Minessale 9c7fb0d4ca support stacked [] pairs in origiante 2010-06-30 20:09:06 -05:00
Anthony Minessale ff1a52ab18 add call_uuid 2010-06-25 13:25:13 -05:00
Anthony Minessale 8d0c81103e add call_uuid var 2010-06-24 17:28:20 -05:00
Rupa Schomaker 0e8a26f840 sync changes in branch rupa_limit 2010-06-19 07:49:34 -05:00
Anthony Minessale a0c641aeb7 MODSOFIA-59 (part 2) 2010-06-18 16:53:02 -05:00
Jeff Lenk 091952cab7 fix trivial compile errors under windows 2010-06-17 12:52:20 -05:00
Anthony Minessale 3c688a95f8 MODENDP-310 2010-06-15 15:48:12 -05:00
Anthony Minessale 3fbd9e2150 MODAPP-433 2010-06-11 11:08:51 -05:00
Anthony Minessale 2cc59f1ed4 FSCORE-615 2010-06-02 21:57:30 -05:00
Anthony Minessale 4c20b020fc allow monitor_early_media and ignore_early_media to work for hmmhesays 2010-06-02 17:31:55 -05:00
Anthony Minessale f41fbbc05b fix typo that generated null video codecs in inherit_codec 2010-06-01 12:10:50 -05:00
Anthony Minessale 468956e109 FSCORE-603 2010-05-04 11:24:35 -05:00